RE: [SLUG] PDF to TIFF to scale

From: Eben King (eben1@tampabay.rr.com)
Date: Mon Dec 13 2004 - 17:01:30 EST


On Mon, 13 Dec 2004, Steven Buehler wrote:

> > -----Original Message-----
> > From: slug@nks.net [mailto:slug@nks.net] On Behalf Of Levi Bard
> > Sent: Monday, December 13, 2004 11:51 AM
> > To: slug@nks.net
> > Subject: Re: [SLUG] PDF to TIFF to scale
> >
> > On Mon, 13 Dec 2004 10:02:31 -0500, Mario Lombardo
> > <mario@alienscience.com> wrote:
> > > I'm doing the following conversions to achieve a PDF --> TIFF to scale.
> > > It's with 24x36" paper. The final image must be to scale.
> > >
> > > pdftoppm -mono /the/pdf/document.pdf /the/resultant/PBMdocument.pbm
> > > mogrify -format tiff -compress Group4 PBMdocument.pbm
> > >
> > > The final TIFF image ends up 150% bigger. It actually occurs with
> > > pdftoppm. I have no idea why.

My guess is that .p[bgp]m does not store resolution, and so mogrify takes a
default resultion, probably 72 dpi.

> > Is tiff one of those formats that has the print resolution embedded in
> > it?

I'm pretty sure at least one variant of TIFF does.

> > If not, try adjusting the image resolution with mogrify.

Even if so, if my hypothesis is correct, you need to do so.

> Why not just use 'convert pbmdocument.pdf pbmdocument.tif'?

I vote for that, as it has the highest probability of retaining the original
resolution.

> Or, 'pdf2ps pbmdocument.pdf; convert pbmdocument.ps pbmdocument.tif' ?

You may be able to supply "-" to pdf2ps, to avoid writing an intermediate
file to disk. You'd still have to store the resolution somewhere. If this
is a conversion you do several times, I'd recommend writing a script to
parse the pdf's resolution, and then supply it to mogrify.

-- 
-eben      ebQenW1@EtaRmpTabYayU.rIr.OcoPm      home.tampabay.rr.com/hactar
An ASCII character walks into a bar and orders a double. "Having a bad day?"
asks the barman. "Yeah, I have a parity error," replies the ASCII character.
The barman says, "Yeah, I thought you looked a bit off." -- Skud

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:41:17 EDT