På 2006-11-14, skrev Dylan Beaudette: > Greetings, > > I have some PDF files which were created without respecting the target > printer's hardware-enforced margins of 5mm. I have computed an approximate > scaling ratio 0.91 , used : lp -o scaling=91 ... > > Is there a better way to scale PDF files to fit within a printer's margins? I > am aware of the psresize command, which works well most of the time- but a > more robust approach would be nice when the source ps|pdf file is technically > at letterpaper size, just outside of the allowable margins.
It sounds like you want to scale down the pages based on the known capabilities of the printer, using a general method that can cope with arbitrary input. This procedure is not automated, but does do what you want, if I understand your question correctly: 1. convert the input PDF into postscript using, for ex., pdftops in.pdf step1.ps 2. Use mpage: mpage -m100 -o1 < step1.ps > output.ps where 100 above is the desired margin all around the page in postscript points (72 pspoint = 1 inch). The flag -o1 makes mpage put one input page on each output page and disables the border that mpage adds around the page by default. It should not be too hard to convert the procedure above into an automatic script. I hope this helps! -- Henry House +1 530 753 3361 ext. 13 Please don't send me HTML mail! My mail system frequently rejects it. The unintelligible text that may follow is a digital signature. See <http://hajhouse.org/pgp> to find out how to use it. My OpenPGP key: <http://hajhouse.org/hajhouse.asc>.
signature.asc
Description: Digital signature
_______________________________________________ vox-tech mailing list [email protected] http://lists.lugod.org/mailman/listinfo/vox-tech
