×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Top and Left margin values

Top and Left margin values

Top and Left margin values

(OP)
Hi all,

I'm trying to place my top and left margins for the minumum value that the A4 paper supports (0.42cm x 0.42 cm). However, this point (0,0) is shifted a little bit for down and rigth.

I'm using the pcl command related to Vertical Cursor Position (in decipoints) and Horizontal Cursor Position (in decipoints) setting zero for both value fields like: "&a0H &a0V".

Follows below the full commands in pcl:

%-12345X@PJL ENTER LANGUAGE = PCL
E
&l26A&l0H&s0C&l0O&a0H&a0VJOAO FELIPE SOUZA
E
%-12345X

any idea?

regards
mauro


 

RE: Top and Left margin values

An analysis of your print stream shows:

CODE

Sequence          Data / Interpretation
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
<Esc>%-12345X     Universal Exit Language (UEL)
                  Comment: Switch language to PJL
@PJL ENTER LANGUAGE = PCL
                  Warning: incorrectly terminated
                  Comment: Switch language to PCL
<Esc>E            Printer Reset
<Esc>&l26A        Page Size: A4
<Esc>&l0H         Paper Source: Unchanged (eject page)
<Esc>&s0C         End-of-Line Wrap: Enable
<Esc>&l0O         Orientation: Portrait
<Esc>&a0H         Cursor Position (decipoints): Horizontal
<Esc>&a0V         Cursor Position (decipoints): Vertical
JOAO FELIPE SOUZA
<Esc>E            Printer Reset
<Esc>%-12345X     Universal Exit Language (UEL)
                  Comment: Switch language to PJL

Note that the PJL statement should be terminated by a LineFeed character (optionally preceded by a Carriage Return character).

RE: Top and Left margin values

Following a 'set orientation' sequence, the cursor is moved to the left edge of the logical page at the top margin cursor position.

The 'set cursor position' commands set the cursor relative to the current margins.

------------------------------------------------------------

The top of the logical page coincides with the top of the physical sheet.
The left edge of the logical page is about 4mm inbard of the left edge of the physical sheet for most paper sizes.

These values are subject to some variation (typically +- 1.5mm) between printers (or even trays).

Some printers offer (via front panel menus or equivalent) the ability to adjust registration settings.

------------------------------------------------------------

The Left Margin command (<esc>&a#L) sets the left margin to the left edge of the specified # column.

The first column within a line is column 0, which is located at the left edge of the logical page.

The Horizontal Motion Index (HMI) setting (typically reset via font selection) defines the distance between columns.

------------------------------------------------------------

The Top Margin command (<esc>&l#E) designates the number (#) of lines between the top of the logical page and the top of the text area.

Default = 1/2 inch down from top of logical page.

The Vertical Motion Index (VMI) setting (reset via the 'set line spacing' or 'set VMI' sequences) defines the distance between lines.

 

RE: Top and Left margin values

I must eb getting old (I am!) - I mistakenly stated that "... 'set cursor position' commands set the cursor relative to the current margins ...".

They are actually relative to the logical page.

i.e. absolute motion always specifies the distance to move referenced from the top margin at the left bound of the logical page (0,0).

So if your &a0H&a0V sequences should set the Current Active Position (CAP) to (approximately) (6mm, 0mm) on the physical page (subject to registration variations).

Note that this is within the 'unprintable region' (having margins of about 4mm on all edges), so text and other markings at this position may be clipped.

Note also that when printing text, the 'baseline' is usually assumed to be 75% of the current VMI down from the CAP.
The default VMI is usually equivalent to 6 lines-per-inch.

RE: Top and Left margin values

... oh dear! I was almost right the first time!

The cursor position (0,0) is at the intersection of the left edge of the logical page and the current top margin position.

With A4 Portrait paper, and the default top margin, this equates to (0.237, 0.500) inches, or (6.01, 12.7) millimetres, relative to the physical sheet.

... subject to those registration inaccuracies.

RE: Top and Left margin values

To read all about PCL page control yourself (as I'm not having a good day of it trying to explain bits!), the following link provides a brief history of the PCL language, and links to the PCL Technical Reference manual, and also to other PCL5 & PJL manuals:

http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpl04568

Be aware that some of the manuals (in PDF format) are multi-megabyte downloads.

Part 1 of the PCL5 Technical Reference Manual (bpl13210) describes logical pages, unprintable areas, cursor positioning, margins, etc.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close