HP 800, 700 HP PCL Code Samples, Page Formatting Program Example, Command Line, Action, Comment

Models: 700

1 124
Download 124 pages 26.67 Kb
Page 116
Image 116
14.0HP PCL Code Samples

HP PCL Code Samples

14.0HP PCL Code Samples

The following pages contain PCL code samples that are intended to address some of the most commonly asked support questions. Key among these questions are coding general page for- matting, 4-plane color graphics, and using Configure Raster Data (CRD).

14.1Page Formatting Program Example

The following example is old, but covers the essential page formatting commands. While there is no one best way to write a page formatting program, you can use this example as a starting point. When performed in the order given, the set of commands prints the output shown in the figure at the end of the example.

The example assumes the following formatting objectives:

 

4

Select US Letter size paper

 

 

 

4

Select portrait page orientation

 

 

 

4

Set 3/4 in. top, left, and right margins

 

 

 

4

Set 11/4 in. bottom margin

 

 

 

4

Establish a header centered approximately in the middle of the top margin

 

4

Establish a footer 5/8 inch from the bottom of the paper

 

4

Set line spacing at 8 lpi

 

 

 

 

4

Use Letter Gothic and CG Times typefaces

 

 

 

 

 

 

 

 

 

!

 

No assumption is made as to the status of the configuration switches.

 

 

 

 

 

Command Line,

 

 

 

 

 

Action

 

Command

Comment

 

 

 

 

 

 

 

 

 

 

Reset Printer

 

Esc E

Returns the printer to its default

 

 

 

 

 

 

 

settings.

 

 

* Set Paper Size

 

Esc & l 2 A

Selects U.S. Letter size paper 8 1/2

 

 

 

 

 

 

 

X 11 in.

 

 

* Set Portrait

 

Esc & l 0 O

 

 

 

Orientation

 

 

 

 

 

Enable Perforation

 

Esc & l 1 L

Default top margin is 1/2 in.

 

 

Skip Mode

 

 

 

 

 

Set Line Spacing

 

Esc & l 8 D

8 lpi is used for page length and

 

 

 

 

 

 

 

margin calculations.

 

 

Specify Page Length

 

Esc & l 88 P

11 in. X 8 lpi = 88 lines

 

 

Set Top Margin

 

Esc & l 6 E

3/4 in. margin X 8 lpi = 6 lines

 

 

 

 

 

 

 

 

 

116

HP DeskJet 600, 700, 800, 900 & HP 2000 Series PCL Developer’s Guide

Page 116
Image 116
HP 800, 700 manual HP PCL Code Samples, Page Formatting Program Example, Command Line, Action, Comment