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 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;

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:
PROCLIB.STAFF as a GIF Image