Additional PostScript capabilities provided by filters

Additional PostScript capabilities can be provided by filters.

The filters described in Print filters also take advantage of PostScript capabilities to provide additional printing flexibility. Most of these features can be accessed through the mode option (invoked by the -y option) to the lp command. These filters allow you to use several unusual options for your print jobs. The following list describes these options and shows the option to include on the lp command-line for each one:
Item Descriptor
-y reverse Reverse the order in which pages are printed
-y landscape Change the orientation of a physical page from portrait to landscape
-y x=number,y=number Change the default position of a logical page on a physical page by moving the origin
-y group=number Group multiple logical pages on a single physical page
-y magnify=number Change the logical size of each page in a document
-o length=number Select the number of lines in each page of the document
-P num_list Select, by page numbers, a subset of a document to be printed, where num_list is page numbers or page ranges separated by commas (for example, 1,4,6-8,14- prints pages 1, 4, 6, 7, 8, and 14 through the end)
-n number Print multiple copies of a document
Note: If these filters are to be used with an application that creates PostScript output, make sure that the format of the application conforms to the format of the PostScript file structuring comments. In particular, the beginning of each PostScript page must be marked by the comment
  %%Page: label ordinal

where ordinal is a positive integer that specifies the position of the page in the sequence of pages in the document, and label is an arbitrary page label.

For example, you have a file called report2 that has a content type simple (meaning that the content of this file is in ASCII format). You want to print six pages of this file (pages 4 through 9) with two logical pages on each physical page. Because one of the printers on your system (psprinter) is a PostScript printer, you can do this by entering the following command:

lp -d psprinter -T simple -P 4-9 -y group=2 report2

The filter that groups these logical pages will try to position the pages on the physical page to maximize space utilization. Thus, when you specify group=2, the pages will be printed side by side, so that the physical page will be landscape orientation. Landscape mode, which controls the orientation of the logical page rather than the physical page, would cause the logical pages to be positioned one on top of the other when combined with the group=2 option.