Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Escape! V3.0 - <b>hpphysical()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
hpPhysical()

Causes the placement of text and graphics to be based on either the physical
or logical printer page


Syntax

hpPhysical( <lPhysical> )


Parameters

<lPhysical>
Specifies whether printing will be based on the physical
or logical page.  If .T., printing will be based on the physical page.


Returns

0
Successful.

-17
Invalid parameter type was specified.


Remarks

Due to printer restrictions, as well as standards built into most laser
printers, there is a default margin, appx. 1/4", around each printed page.
For instance, if you specify a string to be printed on line 0, column 0,
the string will appear appx. 1/4" down on the page and appx. 1/4" in
from the left.  This is because default printing on a LaserJet printer
occurs using the logical page.

If, however, you need to do some very specific placement of text or
images on a page, this slight offset can become a real nuisance.  An
example of when printing based on the physical page may be desired is
when creating forms.  With the use of hpPhysical(), if you want a line
drawn across the page 5" down, it will be exactly 5" down.  In fact, once
hpPhysical(.T.) is called, all placement of text, lines, graybars, .PCX
files, or anything else using Escape!'s functions, will be based on the
physical page.  To set the page back to logical, simply specify
hpPhysical(.F.).


Support By

All HP Laserjet Printers


Example

hpConfig()
hpSetFont()
hpPhysical(.T.)         // set to physical page
hpAtSay( 2, 1, 'Printed exactly at 2, 1', 'I')
hpPhysical(.F.)         //set back to logical
hpAtSay( 3, 1, 'Slightly offset by default margin', 'I')

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson