PDF: problem with density

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
CryptKeeper
Posts: 2
Joined: 2011-04-08T22:55:30-07:00
Authentication code: 8675308

PDF: problem with density

Post by CryptKeeper »

I want to split multi-page PDF files so that I get one PDF file per page. But I have problems with the density, I don't know how to correctly specify it.

If I do

Code: Select all

convert file.pdf file%03.pdf
it all works but the output is (by default) 72 dpi which is too little. I've tried

Code: Select all

convert -density 300 file.pdf file%03.pdf
and it works insofar as the output quality is good enough. But the problem is that the output PDFs are mostly white space and the document itself is really small and placed in the lower left corner.

Principally, I could just crop the output image because when I zoom in on the small document in the lower left corner, the quality is good enough. But that can't be the solution.

So how do I correctly specify the density?

BTW: I'm using Mac OS X Leopard and ImageMagick 6.3.3 03/06/07 Q16. That's not the newest version, as I've just noticed, but I've used Unix/Terminal/Bash only for about a month so I was glad to be able to install ANY version of IM...

Thanks in advance.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PDF: problem with density

Post by fmw42 »

I am not sure I can help. But note that IM is not a good tool for converting vector to vector as it rasterizes between. See http://www.imagemagick.org/Usage/formats/#vector
CryptKeeper
Posts: 2
Joined: 2011-04-08T22:55:30-07:00
Authentication code: 8675308

Re: PDF: problem with density

Post by CryptKeeper »

fmw42 wrote:I am not sure I can help. But note that IM is not a good tool for converting vector to vector as it rasterizes between. See http://www.imagemagick.org/Usage/formats/#vector
I tried for a whole afternoon to install pdftk but didn't manage to (I somehow couldn't install cdj).

Do you know any other tools for Terminal (bash) to edit PDFs?

BTW: When I save the output of the commands in the first post to PNG instead of PDF, it works with the density.
Post Reply