You can create a PDF
file using the ODS PDF or ODS PRINTER statements. You specify the
PDF 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 ODS PDF statement creates output using the PDF universal printer.
Therefore, you do not need to explicitly specify the PDF universal
printer when you use the ODS PDF statement.
Here is some sample
code to create a PDF file. In the first sample, the PDF universal
printer does not need to be specified because the ODS PDF statement
uses the PDF universal printer to create a PDF. In the second sample,
the PDF universal printer is specified as the value of the PRINTERPATH=
system option and the ODS PRINTER statement creates the PDF:
-
ods html close;
ods pdf;
...more SAS code...
ods pdf close;
ods html;
-
options printerpath=pdf;
ods html close;
ods printer;
...more SAS code...
ods printer close;
ods html;
SAS creates a file sasprt.pdf
in the current directory and opens the PDF in the
Results
Viewer window.