convert pbm -> tiff -> tiffcp -> tiff2pdf . Getting 5mm page
-
26-05-2021 - |
Question
I usually scan multi-page files, and I'm using an easy way.
for f in ???\.pbm; do
convert -compress Group4 $f ${f%pbm}tiff;
done;
tiffcp *\.tiff o.tiff;
tiff2pdf o.tiff -o o.pdf
But this way I can get good TIFF and really bad PDF.
Here are outputs of identify
:
(similar for each page)
Image: o.tiff
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 1248x1649+0+0
Resolution: 72x72
Print size: 17.3333x22.9028
Image: o.pdf
Format: PDF (Portable Document Format)
Class: DirectClass
Geometry: 17x23+0+0
Resolution: 72x72
Print size: 0.236111x0.319444
I tried to use density settings on all steps, but nothing helped me. Anybody knows where the mistake is?
Solution
In the tiff2pdf
step, try to use this command:
tiff2pdf -p A4 -F -o o.pdf o.tiff
-p A4
: Force the PDF to use ISO A4 page size (you can also useletter
orlegal
).-F
: Force TIFF to fill the page completely.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow