l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
November 4: Social gathering
Next Installfest:
TBD
Latest News:
Oct. 10: LUGOD Installfests coming again soon
Page last updated:
2006 Nov 16 15:38

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] scaling PDF with lp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] scaling PDF with lp



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>.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.