2

I'm trying to use unpaper to process some PDFs that I have.

But unpaper only seems to process the first page everytime. I'm using Mac OS X Yosemite. Here's my process:

I scan in the document in PD using Preview.app. Then, I convert the .pdf file to .pnm by using this ImageMagick command:

convert -density 150 document.pdf -depth 8 document.pnm

After conversion, I run unpaper on the document:

unpaper document.pnm output.pnm

and convert the output back to PDF

convert output.pnm output.pdf

However, the output.pdf will only have the first page processed by unpaper, and the rest are not even present in the output.

It's not ImageMagick that loses the pages, since running

convert document.pnm test.pdf

Outputs a PDF file with all of the pages. Any ideas?

0

If your PDF indeed is a multi-page document, your output file will not be named document.pnm. Instead, you will have multiple output files, one per PDF page. They will be named document-1.pnm, document-2.pnm, etc.

Hence, your further processing has to take this into account...

Finally, whenever you are prepared to convert your PNMs back to PDF, run this command:

convert output*.pnm output.pdf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.