Compaq DECprint Supervisor (DCPS) for OpenVMS
User's Guide


Previous Contents Index


Chapter 11
Using Layup to Modify Printed Documents

11.1 Specifying Layup Options in Print Jobs

Layup is a printing system feature that allows you to map logical pages to physical sheets. The page layout adjustments you can make include specifying the number of pages to print on each sheet of paper, setting margins, and using borders around pages.

Page layup adjustments can be specified in two ways. You can include layup options directly in the PRINT command line, or you can include a layup definition file in the print job.

11.1.1 Specifying Layup in the Print Job

You can include a layup definition file in the print job using the following command format:


$ PRINT file-name.PS/PARAMETERS=LAYUP_DEFINITION=layup_file

In the PRINT command line, include the name of the layup definition file for layup_file, but do not include the file type .LUP.

You can directly specify one or more layup options in the PRINT command by including them in the LAYUP_DEFINITION parameter as shown here:


$ PRINT/PARAMETERS=(LAYUP="(NOBORDERS)",NUMBER_UP=2)

This command is useful for disabling borders when using the NUMBER_UP parameter. When you provide layup options directly using the LAYUP_DEFINITION parameter, you must include the quotation marks and the parentheses to distinguish the options from a layup definition file name.

The layup options are listed in Table 11-1.

Table 11-1 Layup Definition File Options
Layup Option Operation Performed Reference
ALTERNATE Exchanges a pair of margins on alternate sheets. Section 11.1.2
BORDERS Draws a border around each page. Section 11.1.3
FIRSTPAGE Specifies the first page spot (print location) where a page will be printed. Section 11.1.4
GRID Sets the number of page spots on a sheet in columns and rows. (This option overrides NUMBER_UP.) Section 11.1.5
MARGINS= t,b,l,r Sets the margins for a sheet, where t is the top margin, b is the bottom margin, l is the left margin, and r is the right margin. Pages are scaled to fit within the margins. Section 11.1.6
PAGEORDER Specifies the order in which pages appear on a sheet. Section 11.1.7
PAGESPERSHEET Sets the number of pages that will print per sheet, no matter how many page spots are set by NUMBER_UP. Section 11.1.8

The following sections describe the layup options in more detail. Section 11.2.1 includes some sample layup definition files.

11.1.2 Specifying Margin Alternation

The ALTERNATE option lets you exchange a pair of margins on alternate sheets. This option is useful to prepare a job for double-sided copying.

Table 11-2 describes the values that can be supplied to the ALTERNATE option.

Table 11-2 ALTERNATE Option Values
Value Result
LEFT Left and right margins alternate.
RIGHT Left and right margins alternate.
none Same behavior as LEFT.
TOP Top and bottom margins alternate.
BOTTOM Top and bottom margins alternate.

If you specify ALTERNATE with no option values, the left and right margins alternate.

Margin alternation is part of the default processing for print jobs with the following print parameters:

Margin alternation is not performed as part of the default processing for print jobs with the following print parameters:

If you omit /PARAMETERS=SIDES from the PRINT command, the margin alternation processing depends on the printer hardware (refer to your printer owner's manual).

11.1.3 Specifying and Omitting Borders

The BORDERS option draws a border around each page. Borders are useful for differentiating pages when you are printing a job using PRINT/PARAMETERS=NUMBER_UP. (If you use NUMBER_UP, the default is to draw borders.) You can turn off the borders using the NOBORDERS option.

Borders are drawn around actual pages only, not around all page spots. This feature allows you to distinguish between blank pages in a document and nonexistent pages. Figure 11-1 shows four pages printed on a sheet without the borders option. The command is:


$ PRINT/PARAMETERS=(NUMBER_UP=4,"LAYUP_DEFINITION=(NOBORDERS)") MYFILE.MEM

Figure 11-2 shows the same pages printed with borders, which is the default action for print jobs with NUMBER_UP. The command is:


$ PRINT/PARAMETERS=NUMBER_UP=4 MYFILE.MEM

Figure 11-1 NUMBER_UP =4 Without Borders


Figure 11-2 NUMBER_UP =4 With Borders


11.1.4 Specifying the First Page Spot to Use

The FIRSTPAGE option specifies the first page spot (that is, location) where a page will be printed.

You must specify a value to FIRSTPAGE. The value is the number of the page spot on which to print the first page. Page spots are numbered starting at 1. The value supplied to FIRSTPAGE must be less than or equal to the value supplied to NUMBER_UP. You cannot specify NOFIRSTPAGE.

The default is to use the first page spot on a sheet.

The FIRSTPAGE option affects only the first sheet of the print job. All other sheets begin printing at page spot 1.

The FIRSTPAGE option is useful for specifying how to print pages when you need to preview the layout of pages for documents with right and left pages. Without the FIRSTPAGE option, pages are printed at all the page spots. You can use FIRSTPAGE to print your layout in a way that reflects the right and left pages.

Figure 11-3 shows how pages are printed when the NUMBER_UP value is 8 and the FIRSTPAGE value is not specified. For example:


$ PRINT/QUEUE=PS$A10/PARAMETERS=NUMBER_UP=8 MYFILE.PS

Note that the last page printed on the first side is a left page.

Figure 11-3 NUMBER_UP =8 Without FIRSTPAGE


Figure 11-4 shows how pages are printed when NUMBER_UP=8 and FIRSTPAGE=2 are both used. For example:


$ PRINT/QUEUE=PS40$A10/PARAMETERS=(NUMBER_UP=8,"LAYUP_DEFINITION=(FIRSTPAGE=2)") MYFILE.PS

As this figure shows, the last page printed is a right page.

Figure 11-4 NUMBER_UP =8 With FIRSTPAGE


11.1.5 Specifying the Page Grid

Instead of using the NUMBER_UP parameter in the PRINT command to specify the maximum number of page spots on a sheet, you can use the GRID option in a layup definition file.

The GRID option takes two values. The first value is the number of columns in the grid, the second is the number of rows. The product of the two values cannot exceed 100.

The grid is interpreted in relation to the pages, not the sheet. As with NUMBER_UP, the orientation of the pages is independent of the sheet orientation. Thus, you can print pages with portrait orientation, but you hold the sheet in landscape to read them.

The following example specifies that the pages will print 6-up, in a grid of two columns across and three rows down:


Grid = 2, 3 

11.1.6 Specifying Sheet Margins

The MARGINS option sets the margins of the sheet on which you are printing. This option takes four values. The values set the top, bottom, left, and right margins for a sheet. The numbers are interpreted as printer's points. (There are 72 points to an inch.)

Always specify the values for sheet margins in the following order: top, bottom, left, and right. Sheet margins are independent of whether the page is portrait or landscape orientation. Positive values move toward the center of the page; negative values move away from the center of the page.

When you print using a layup definition file that uses the MARGINS option, the page is scaled to fit on the area of the sheet that is left when margins are subtracted. Therefore, the size of text and graphics may be changed on the printed document to fit the margins you specify. When pages are scaled, the aspect ratio (relationship of page height to page width) is preserved. Where there is space left, it is equally divided on both sides of the page (see Figure 11-5).

Figure 11-5 Usable Sheet Area With MARGINS Option


If you specify the MARGINS option but do not specify any values, layup uses a value of 36 for all four margins. If you specify NOMARGINS, the software uses the value 0 for all four margins.

The default margin setting is a 36-point margin (a half inch) on all sides.

The following example creates a wide left margin:


$ PRINT/QUEUE=PS40$A10/PARAMETERS=("LAYUP_DEFINITION=(MARGINS=10,10,60,10)") MYFILE.TXT

This example sets the margins as follows:
Top margin 10 points
Bottom margin 10 points
Left margin 60 points
Right margin 10 points

11.1.7 Specifying the Order of Page Spots to Use

The PAGEORDER option sets the order in which the pages appear on the sheet, that is, the reading order of the pages.

You must supply a value to PAGEORDER. Table 11-3 describes the eight values that can be used. The default page order is RightDown.

Table 11-3 PAGEORDER Option Values
Value Description
RightDown Pages are ordered left to right, top row first, then moving down.
LeftDown Pages are ordered right to left, top row first, then moving down.
RightUp Pages are ordered left to right, bottom row first, then moving up.
LeftUp Pages are ordered right to left, bottom row first, then moving up.
DownRight Pages are ordered top to bottom, left column first, then moving right.
DownLeft Pages are ordered top to bottom, right column first, then moving left.
UpRight Pages are ordered bottom to top, left column first, then moving right.
UpLeft Pages are ordered bottom to top, right column first, then moving left.

Figure 11-6 shows how pages are printed with each PAGEORDER value in landscape orientation.

Figure 11-6 PAGEORDER Options (Landscape Orientation)


Figure 11-7 shows how pages are printed with each PAGEORDER value in portrait orientation.

Figure 11-7 PAGEORDER Options (Portrait Orientation)


11.1.8 Specifying the Number of Pages to Print on Each Side of a Sheet

The NUMBER_UP parameter to the PRINT command determines the maximum number of pages you can print for each sheet. The PAGESPERSHEET option in a layup definition file specifies how many pages are actually printed on a sheet.

Because NUMBER_UP determines the number of page spots, it also determines the layout of the page spots on the sheet. PAGESPERSHEET determines only the range of page spots to use, not their layout.

You must supply a value to PAGESPERSHEET, and the value must be less than the value supplied to NUMBER_UP. You cannot specify NOPAGESPERSHEET.

The default is to use all the page spots on a sheet.

For example, assume you have a layup definition file called SIXPAGES.LUP that contains the following line:


PagesPerSheet = 6 

To print a file called MYFILE.TXT, use the following command:


$ PRINT/PARAMETERS=(LAYUP_DEFINITION=SIXPAGES,NUMBER_UP=8) MYFILE.TXT

Even though this command provides eight page spots for each sheet, the job prints with six pages on a sheet, leaving the other two page spots blank.

11.2 Creating Layup Definition Files

You can create the layup definition files that you need, include options to specify the margins, page placement, and borders, and then ask your system manager to copy the file into a directory defined by the systemwide logical name DCPS$LAYUP.

When you create a layup definition file with selected layup options, follow these rules:

Some examples of layup definition files are provided with the DECprint Supervisor software and are described in Section 11.2.1.

11.2.1 Sample Layup Definition Files

The first three layup definition files in this section are included with the DECprint Supervisor software. They are located in the directory SYS$COMMON:[SYSHLP.EXAMPLES.DCPS].

11.3 Layup Error Notification

Errors in layup definition files are returned with the identification BADLAYDEF. To display the error messages on your terminal, use the /NOTIFY qualifier in the PRINT command line. To print or keep error messages, use the MESSAGES parameter to the PRINT/PARAMETERS command. Error messages use the following format:


%DCPS-W-BADLAYDEF, condition on line line-number in layup definition 

The condition describes the problem and line-number is the line number in the layup definition file on which the error occurred. See Section A.3 for the text and explanation of the messages generated by errors in a layup definition file.


Previous Next Contents Index