cancel
Showing results for 
Search instead for 
Did you mean: 

pdftops setting margins

 
SOLVED
Go to solution
ABC Unix
Frequent Advisor

pdftops setting margins

So when I convert a pdf file to ps and print it, pdftops automatically sets the printable area for the pdf file to the paper size. Since my printer doesn't do edge-to-edge printing, that means anything outside the printers ability doesn't print.

I'm basically looking for a way to scale a legal sized pdf file so that everything prints. I've played with the psImageableArea option in xpdf but I can't seem to get it to work properly.

Does anyone have any experience setting margins/print area with xpdf/pdftops?

Thanks!
5 REPLIES
sangilak
Trusted Contributor

Re: pdftops setting margins

Hi,


I assume you have set 'psPaperSize' to legal? And, although the default should be already set to 'yes', have you looked at 'psShrinkLarger'?

'psImageableArea llx lly urx ury' should indeed do the trick, with:
- llx = x-coordinate of lower left of printable area
- lly = y-coordinate of lower left of printable area
- urx = x-coordinate of upper right of printable area
- ury = y-coordinate of upper right or printable area
(origin being the lower left of the page)

Unfortunately I do not have exact numbers that you could try...


sangilak
ABC Unix
Frequent Advisor

Re: pdftops setting margins

When I set psPaperSize to legal it overrides whatever I put in psImageableArea (same with paper height/width) and I made sure psShrinkLarger was working as expected by default.

I tried putting the following numbers in psImageableArea:
"0 0 792 1008" which *should* set the printable area to the exact same size as a legal sized paper, but the pdf doesn't print anywhere near what I expected. The lower left corner of the pdf text ends up about 2 inches in from the bottom left corner of the page and it writes all the way off the right side. it almost seems like it's trying to print the pdf in letter size centered on the legal page.
sangilak
Trusted Contributor
Solution

Re: pdftops setting margins

Hi,


My understanding is that you need to set the 'psPaperSize' to legal. This will set the size of the page (so basically the outside of the paper).

With the 'psImageableArea' you will set the actual area where the "image" (so basically your print) will appear.

So what you have to do (I think at least) is to set the 'psPaperSize' to legal and set the 'psImageableArea' to something like:
"88 144 524 864"

This will ensure a margin of 88 left and right from the "imageable area" and a margin of 144 on the top and bottom.

The above numbers will most likely have to be tweaked to get a perfect match, as I just pulled these numbers out my hat...


sangilak


PS: I think that Legal is 1008 by
612 and not 1008 by 792.
ABC Unix
Frequent Advisor

Re: pdftops setting margins

Right you are, setting the paper size to legal and then using "0 10 612 1008" worked perfectly. Thanks!
ABC Unix
Frequent Advisor

Re: pdftops setting margins

see above