proc qdevice out=printers; printer _all_; run; proc print data=printers; var name desc; where nametype contains "Printer"; run;
filename registry temp; proc printto log=registry; run; proc registry list keysonly levels=1 startat="core\printing\prototypes"; proc printto; run; data protypes; keep prototype; infile registry; length line $256; input line $256.; if substr(line,1,1) = "[" then do; prototype = substr(line,2,length(line)-2); output; end; run; proc print label; label prototype = "Prototype"; run;
proc qdevice;
printer printer-name;
run;
15 proc qdevice; 16 printer gif; 17 run; Name: GIF Description: Graphics Interchange Format RGB Color/Alpha Blending Type: Universal Printer Registry: SASHELP Prototype: GIF rgba Default Typeface: Cumberland AMT Font Style: Regular Font Weight: Medium Font Height: 8 points Maximum Colors: 16777216 Visual Color: True Color Color Support: RGBA Destination: sasprt.gif I/O Type: DISK Data Format: Other Height: 6.25 inches Width: 8.33 inches Ypixels: 600 Xpixels: 800 Rows(vpos): 50 Columns(hpos): 114 Left Margin: 0 inches Minimum Left Margin: 0 inches Right Margin: 0 inches Minimum Right Margin: 0 inches Bottom Margin: 0 inches Minimum Bottom Margin: 0 inches Top Margin: 0 inches Minimum Top Margin: 0 inches XxY Resolution: 96x96 pixels per inch Compression Method: None Font Embedding: Never
Uses the Universal Printing
PDF printer.1
|
|
1You must have |
options nodate nonumber; ods printer printer=svgview file='orientation.svg' style=Ocean; title 'Demonstration of Page Orientation Changes in a Document'; footnote 'PROC SGPLOT in Landscape Orientation'; options orientation=landscape; proc sgplot data=sashelp.class; vbar age; run; options orientation=portrait; footnote 'PROC PRINT in Portrait Orientation'; proc print data=sashelp.class; run; options orientation=landscape; footnote 'PROC SGSCATTER in Landscape Orientation'; proc sgscatter data=sashelp.cars; matrix mpg_city enginesize horsepower / diagonal=(histogram kernel); run; options orientation=portrait; footnote 'PROC MEANS in Portrait Orientation'; proc means data=sashelp.cars n mean; var mpg_city enginesize horsepower; run; ods printer close;
PCL5c1
|
||
1PCL4 and PCL5 Universal Printers support only monochrome printing. |
options obs=5 nodate; ods html close; ods pdf; proc print data=sashelp.demographics label style(header)={background=cmyk00ff0000 foreground=k00000000} noobs; var name pop; label name=Country Name pop=Population; title color=kffff0000 'Demographics 2005'; run; ods pdf close; ods html;
ods html close;
ods printer printer=png;
proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
and date <= "01jan2001"d
and stock = "IBM"));
title color=a6495edff "Stock Volume vs. Close";
vbar date / response=volume
datalabel
datalabelattrs=(color=a8a44ff8a size=10);
vline date / response=close y2axis;
run;
title;
ods printer close;
ods html;
options nodate; /* Create the PCT format. */ /* The color variable is a concatenation of calculated */ /* hexadecimal values. */ data _null_ ; call execute('proc format fmtlib ; value pct'); max=10000; maxloop=255; do i=1 to maxloop by 10; color='RGBA'||put(((maxloop)/(maxloop+i)*200),hex2.) ||put(((maxloop)/(maxloop+i)*235),hex2.) ||put(((maxloop)/(maxloop+i)*255),hex2.)||'95'; from=max; to=(max+3000); max=max+3000; /* Create salary ranges of $3000.00 equal to the calculated RGBA color value.*/ call execute(put(from,best.)||'-'||put(to,best.)||'='||quote(color)); end; /* Create RGBA values for missing values and values outside the salary ranges. */ call execute('.="RGBAF7F5F0480" other="RGBAFF2A2A88"; run;'); run; data staff; infile datalines dlm='#'; input Name $16. IdNumber $ Salary Site $ HireDate date7.; format hiredate date7.; datalines; Capalleti, Jimmy# 2355# 21163# BR1# 30JAN09 Chen, Len# 5889# 20976# BR1# 18JUN06 Davis, Brad# 3878# 19571# BR2# 20MAR84 Leung, Brenda# 4409# 34321# BR2# 18SEP94 Martinez, Maria# 3985# 49056# US2# 10JAN93 Orfali, Philip# 0740# 50092# US2# 16FEB03 Patel, Mary# 2398# 35182# BR3# 02FEB90 Smith, Robert# 5162# 40100# BR5# 15APR66 Sorrell, Joseph# 4421# 38760# US1# 19JUN11 Zook, Carla# 7385# 22988# BR3# 18DEC10 ; run; ods html close; ods pdf file='outpdf.pdf'; proc print data=staff noobs label style(HEADER)={background=rgbac7eafe95 fontstyle=italic} style(DATA)={foreground=black}; var name IdNumber ; var salary /style(DATA)={background=pct.}; label IdNumber='Employee Number' salary='Salary in U.S. Dollars'; format salary dollar7.; title 'Generated Colors for the Variable Salary'; run; ods pdf close;
501 options nodate; 502 503 /* Create the PCT format. */ 504 /* The color variable is a concatenation of calculated */ 505 /* hexadecimal values. */ 506 507 data _null_ ; 508 call execute('proc format fmtlib ; value pct'); 509 max=10000; 510 maxloop=255; 511 do i=1 to maxloop by 10; 512 color='RGBA'||put(((maxloop)/(maxloop+i)*200),hex2.)||put(((maxloop)/(maxloop+i)*235), 512! hex2.) 513 ||put(((maxloop)/(maxloop+i)*255),hex2.)||'95'; 514 from=max; 515 to=(max+3000); 516 max=max+3000; 517 518 /* Create salary ranges of $3000.00 equal to the calculated RGBA color value.*/ 519 call execute(put(from,best.)||'-'||put(to,best.)||'='||quote(color)); 520 end; 521 522 /* Create RGBA values for missing values and values outside the salary ranges. */ 523 call execute('.="RGBAF7F5F0480" other="RGBAFF2A2A88"; run;'); 524 run; NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
NOTE: CALL EXECUTE generated line. 1 + proc format fmtlib ; 1 + value pct 2 + 10000-13000="RGBAC7EAFE95" 3 + 13000-16000="RGBABFE1F495" 4 + 16000-19000="RGBAB8D9EB95" 5 + 19000-22000="RGBAB2D1E395" 6 + 22000-25000="RGBAACCADB95" 7 + 25000-28000="RGBAA6C3D495" 8 + 28000-31000="RGBAA1BDCD95" 9 + 31000-34000="RGBA9CB7C795" 10 + 34000-37000="RGBA97B2C195" 11 + 37000-40000="RGBA93ADBB95" 12 + 40000-43000="RGBA8FA8B695" 13 + 43000-46000="RGBA8BA3B195" 14 + 46000-49000="RGBA879FAC95" 15 + 49000-52000="RGBA849BA895" 16 + 52000-55000="RGBA8097A495" 17 + 55000-58000="RGBA7D93A095" 18 + 58000-61000="RGBA7A909C95" 19 + 61000-64000="RGBA778C9895" 20 + 64000-67000="RGBA74899595" 21 + 67000-70000="RGBA72869195" 22 + 70000-73000="RGBA6F838E95" 23 + 73000-76000="RGBA6D808B95" 24 + 76000-79000="RGBA6B7D8895" 25 + 79000-82000="RGBA687B8595" 26 + 82000-85000="RGBA66788395" 27 + 85000-88000="RGBA64768095" 28 + .="RGBAF7F5F0480" other="RGBAFF2A2A88"; NOTE: Format PCT has been output. 28 + run; NOTE: PROCEDURE FORMAT used (Total process time): real time 0.03 seconds cpu time 0.01 seconds 525 526 data staff; 527 infile datalines dlm='#'; 528 input Name $16. IdNumber $ Salary 529 Site $ HireDate date7.; 530 format hiredate date7.; 531 datalines; NOTE: The data set WORK.STAFF has 10 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 542 ; 543 run; 544
545 /* Close the HTML destination and open the PDF destination.*/ 546 /* Format the header background using an RGBA color. */ 547 /* Use the PCT. format to format the salary variable. */ 548 549 ods html close; 550 ods pdf file='outpdf.pdf'; NOTE: Writing ODS PDF output to DISK destination "c:\public\mySASPrograms\outpdf.pdf", printer "PDF". 551 proc print data=staff noobs label 552 style(HEADER)={background=rgbac7eafe95 fontstyle=italic} 553 style(DATA)={foreground=black}; 554 var name IdNumber ; 555 var salary /style(DATA)={background=pct.}; 556 label IdNumber='Employee Number' salary='Salary in U.S. Dollars'; 557 format salary dollar7.; 558 title 'Generated Colors for the Variable Salary'; 559 run; NOTE: There were 10 observations read from the data set WORK.STAFF. NOTE: PROCEDURE PRINT used (Total process time): real time 0.03 seconds cpu time 0.03 seconds 560 ods pdf close; NOTE: ODS PDF printed 1 page to c:\public\mySASPrograms\outpdf.pdf. 561 ods html; NOTE: Writing HTML Body file: sashtml7.htm