Code: Select all
convert infile.png -shave 1%x1% -resize 50% -quality 75 -filter Cubic +repage -deskew 40% +repage -unsharp 5.0+0.50+0.0 -white-threshold 88% -fuzz 10% -trim outfile.png
However, converting all the files into a PDF produces some blank pages within the PDF when using the default PDF reader (Document Viewer 2.32.0) in Ubuntu 10.10.
When I use Adobe Reader 9 (linux), all the pages are viewable and there are no issues. But, I primarily need to view the PDF on my ipad using the GoodReader app, which shows some blank pages like the Document Viewer app in Ubuntu. Only Adobe Reader 9 displays the PDF correctly with no blank pages.
This is how I use convert to create the PDF:
Code: Select all
convert *.png -density 288 out.pdf
(1) If I don't process the scanned PNGs and instead just directly convert the raw PNG files into a PDF (no shaving, resizing, threshold, trim, etc).
(2) If I process the PNGs to produce smaller/cleaner PNGs, convert them all to PPM format, and then produce a PDF (results in larger PDF than if I were to use PNG format images)
(3) If I use gscan2pdf to import the process PNGs and save them as a PDF (my goal is have the processing and PDF generation entirely command line)
So my guess is that something is happening to the processed PNGs that produces blank pages in the final PDF. If I use the unprocessed PNGs to create the final PDF, there are no issues (but the PDF size is in the GB range).
Please help, thanks!