Re: Setting Printable Area Size


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Robert G Laurin on February 12, 2018 at 10:33:10:

In Reply to: Setting Printable Area Size posted by Jeff Cinelli on February 11, 2018 at 17:18:47:

You need 4 pieces of information to properly set your margins.

You get the physical size of your paper using PTR.PAGRINFO.PHYSICALSIZE as Physical.Width and Physical.Height
You get the printable area with PTR.GET.PAGEINFO.PRINTABLESIZE as Page.Width and Page.Height
You get the physical offset (position of print area) PTR.PAGEINFO.PHYSICALOFFSET as Offset.Left and Offset.Top

You compute Offset.Right as Physical.Width - (Page.Width + Offset.Left)
You compute Offset.Bottom as Physical.Height - (Page.Height + Offset.Top)

Don't forget to get the TWIPS.Horz and TWIPS.Vert with PTR.PAGEINFO.LOGPIXELS - usually the same

For example if you want a border of 0.25 inch all around:

You set your Margin.Left (aka PtrX1) as Twips * 0.25 - Offset.Left & if < 0, make it 0
You set your Margin.Top (aka PtrY1) as Twips * 0.25 - Offset.Top & if < 0, make it 0

You set the Page.Break as Physical.Height - (Twips * .25 + Offset.Top).
Don't forget to check for remaining space using the Line.Height = (Ptr.Font.Height + Ptr.Font.ExtLeading)

Fun-Fun!!

I also use a left offset of 0.6" for pre-puched paper (3 holes)

And for Letterhead I use Top=1.75, Bottom=0.25, Left=1.00 & Right=0.97"





Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]