Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
7.  Print Filter Enhancement With mp Customizing Existing prolog Files and Adding New prolog Files .xpr File Customization STARTCOMMON/ENDCOMMON Keywords  Previous   Contents   Next 
   
 

STARTPAGE/ENDPAGE

The keyword value pairs in this section are bound by STARTPAGE and ENDPAGE keywords. This section contains drawings and heading information that is to be applied for a physical page. A physical page can contain many logical pages, but all the drawing routines that are contained between these keywords are applied only once to a physical page.

The valid drawing entities are LINE and ARC. XDrawLine() and XDrawArc() functions are executed on values of these keywords.

The dimensions within this section are mapped in PROLOGDPI units. Angles are in degrees.

LINE x1 y1 x2 y2

The x/y unsigned coordinates define a pair of points for connecting a line.

ARC x y width height angle1 angle2

x and y are both unsigned integers that represent the arc origin. Width and height are unsigned integers that represent the width and height of the arc.

USERSTRINGPOS x y

Unsigned coordinates represent the position in which the user information is printed on the heading.

TIMESTRINGPOS x y

Unsigned coordinates represent the position in which the time for printing is printed on the heading.

PAGESTRINGPOS x y

Unsigned coordinates represent the position to print the page string for each printed page.

SUBJECTSTRINGPOS x y

Unsigned coordinates represent the position to print the subject in the page.

STARTFORCEDPAGE/ENDFORCEDPAGE

When the -n option is given to mp, all the decorations given within a STARTPAGE/ENDPAGE section do not print. However, everything included within a STARTFORCEDPAGE/ENDFORCEDPAGE section prints even if the -n option is given.

STARTCOLUMN/ENDCOLUMN

All keywords are the same as secribed in "STARTPAGE/ENDPAGE" except that the entries in this section are applied to NUMCOLS times to a physical page.

If NUMCOLS is 3, then the printable area of the physical page is divided into three, and lines, arcs, or heading decorations appear three times per page.

STARTFORCEDCOLUMN/ENDFORCEDCOLUMN

When the -n option is given to mp, all the decorations given within a STARTCOLUMN/ENDCOLUMN section do not print. However, everything included within a STARTFORCEDCOLUMN/ENDFORCEDCOLUMN section prints even if the -n option is given.

Creating a New .xpr File

The following values are the mp(1) program defaults for different keywords if these values are not specified in the .xpr file for the STARTCOMMON/ENDCOMMON section.

ORIENTATION 0
PAGELENGTH 60
LINELENGTH 80
YTEXTBOUNDARY 3005
NUMCOLS 01
HDNGFONTSIZE 120
PROLOGDPI 300
STARTTEXT 135 280
PAGESTRING 0

No default values are needed for the other two sections bound by STARTPAGE/ENDPAGE and STARTCOLUMN/ENDCOLUMN.

When you create a new .xpr prolog file, you need to specify only the values that differ from the default.

To create a page with no decoration, use four logical pages per physical page, in portrait format.

  • STARTCOMMON

  • NUMCOLS 04

  • LINELENGTH 20

  • ENDCOMMON

In this situation, you do not need the other two sections:

  • STARTPAGE/ENDPAGE

  • STARTCOLUMN/ENDCOLUMN

These parameters are not needed if you are not putting decorations on the printed page. All the coordinates are in 300 dpi default unless you are not specifying the PROLOGDPI keyword. If target printer resolution is different, the .xpr file is scaled to fit into that resolution by the program.

When you create a .xpr file, you must know the paper dimensions beforehand. For U.S. paper, 8.5x11 inches, for a printer of resolution 300 dpi, 2550X3300 are the total dimensions. Most printers cannot print from the top left corner of the paper. Instead, they put some margin around the physical paper. That means that even if you try to print from 0,0 the printing won't be in the top left corner of the page. You need to consider this limitation when you create a new .xpr file.

 
 
 
  Previous   Contents   Next