
Universal Printing
What Is Universal Printing?
Universal Printing is a system that provides both interactive and batch printing
capabilities to create variety of document and graphic output formats. For example, you
can use Universal Printing to create HTML, PDF, documents, and PNG, GIF, and SVG
graphics. For a complete list of supported document and graphic types, see Table 15.1 on
page 220.
Universal Printing enables you to define printers and print previewers, and to set options
to control the printed output. In addition to creating the various document and graphic
output types, you can send output to a printer.
Windows Specifics
By default, the Windows operating environment uses Windows printing and not
Universal Printing. For more information about using Universal Printing under
Windows, see “Setting Up the Universal Printing Interface and the Default Printing
Environment” on page 219.
SAS routes all printing through Universal Printing services. All Universal Printing
features are controlled by system options, thereby enabling you to control many print
features, even in batch mode. For more information about these system options, see
“System Options That Control Universal Printing” on page 254.
Note: Before the introduction of Universal Printing, SAS supported a utility for print
jobs known as Forms. Forms printing is still available if you select File ð Print
Setup from the menu in the windowing environment. Then check the Use Forms
check box. This turns off Universal Printing menus and functionality. For more
information, see “Forms Printing” on page 262.
Setting Up the Universal Printing Interface and the Default Printing
Environment
Universal Printing in UNIX and z/OS
Universal Printing is enabled when SAS starts in the UNIX and z/OS operating
environments. No further action is required.
Universal Printing in Windows
Under Windows, Windows printing is enabled when SAS starts. To use Universal
Printing in Windows, you must set the UNIVERSALPRINT system option to enable the
Universal Printing environment, menus, and dialog boxes, and to set up the printing
defaults. If you use the SAS windowing environment, you can also use the
UPRINTMENUSWITCH system option to enable the print commands on the File menu.
These options can be set only in a SAS configuration file or at start-up. You cannot
enable or disable Universal Printing menus and dialog boxes after SAS starts.
Include the following system options when you start SAS:
-uprint -uprintmenuswitch
UPRINT is an alias for the UNIVERSALPRINT system option.
Universal Printing 219

If you start SAS with only the UPRINT option, you need to close the HTML destination,
which is open by default. Use the PRINTERPATH= option to specify the output format
type. Then, use an ODS PRINTER statement and ODS PRINTER CLOSE statement
around the code that you want to execute. Here is an example:
ods html close;
options printerpath=pdf;
ods printer;
proc print data=sashelp.class;
run;
ods printer close;
Return to the Default Printer
When you use the PRINTERPATH= system option to specify a printer, the print job is
controlled by Universal Printing. To return to the default Universal Printer (the
PostScript printer) set the PRINTERPATH= option to a null value (double quotation
marks with no space between them):
options printerpath="";
In Windows, when Universal Printing is not enabled, setting PRINTERPATH= to a null
value returns printing to Windows printing.
Universal Printing Output Formats
In addition to sending print jobs to a printer, you can also direct output to external files
that are widely recognized by different types of printers and software programs. You can
use Universal Printing to produce the following commonly recognized file types.
Table 15.1 Available Print Output Formats
Type Full Name Description
GIF Graphics
Interchange
Format
An image format designed for the online transmission and
interchange of graphic data. The format is widely used to
display images on the World Wide Web because of its smaller
size and portability.
EMF Enhanced
Metafile Format
A metafile format that is a collection of graphic drawing
commands, configuration properties, and graphic objects to
create true color, scalable, device-independent graphics.
Applications that support EMF run on Windows. Universal
Printing currently supports EMF, EMFPlus, and EMFDual
levels of the metafile format. The EMF Universal Printer uses
the EMFPlus level of metafile formatting, which is the default
EMF printer.
PCL Printer Control
Language
Developed by Hewlett-Packard as a language that applications
use to control a wide range of printer features across a number
of printing devices. Universal Printing currently supports
PCL4, PCL5, PCL5e, and PCL5c levels of the language.
220 Chapter 15 • Printing with SAS
Get SAS 9.4 Language Reference, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.