Display 15.30 Sashelp.Class in Enhanced Metafile Format
Creating GIF Images Using Universal Printing
GIF Images in SAS
The Graphic Interchange Format (GIF) is an image format that has been used
extensively on the web. The GIF printer supports RGBA colors, animation,
transparency, and renders fonts using the FreeType engine. The default output size of
800x600 pixels. For a description of the GIF printer, you can either view the printer in
the SAS registry or submit the following QDEVICE procedure and view the output in
the SAS log:
proc qdevice;
printer gif;
run;
The GIF printer does not support multiple page documents. If a procedure creates
multiple pages or if more than one procedure is used in the code for ODS PRINTER
output, only the first page is viewable.
See Also
“Color Support for Universal Printers” on page 227
“Creating Animated GIF Images and SVG Documents” on page 323
Creating GIF Images Using Universal Printing 283
Creating a GIF Image
You can create GIF images using the ODS PRINTER statement. You specify the GIF
Universal Printer either as the value of the PRINTERPATH= system option or as the
value of the PRINTER= option in the ODS PRINTER statement. The following sample
code specifies the GIF Universal Printer as the value of the PRINTER= option in the
ODS PRINTER statement:
ods html close;
ods printer printer=gif;
...more SAS code...
ods printer close;
ods html;
SAS creates a file sasprt.gif in the current directory
Example of Creating a GIF Image Using the ODS PRINTER
Statement
Using the example data set Sashelp.Class and the SGPLOT procedure, the following
ODS PRINTER statement prints the GIF image sasprt.gif in the current directory:
options printerpath=gif papersize=("4in" "4in") nodate;
ods html close;
ods printer;
proc sgplot data=sashelp.class;
reg x=height y=weight / CLM CLI;
run;
ods printer close;
ods html;
Here is the GIF image in the Windows Picture and Fax Viewer:
284 Chapter 15 Printing with SAS

Get SAS 9.4 Language Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.