JPG to PDF and Paper size
Posted: 2019-04-12T12:32:47-07:00
I have created a Scaner app that uses imagemagick already for other processing. I am trying to add conversions to PDF . I was afraid to use imagemagick in the beginning because it seems there are constant changes that affect command line parameters.
Now I have googled and tried everything I have found for days. Evan soultions that others say work for them , do not work in my case, but then again maybe they did not notice the tiny paper size?
Let me say also, the images all have valid exif data if that makes a difference.
Here is what I am doing:
Scanned images may be of ANY size so by default if I use:
This seems fine and imagemagick creates a reasonable page size similar to the orignal regardless of scan DPI or even mixing scans with different DPIs from my experience so far.
Where I come into a problem is when I scan US Letter size documents and use the same command , It always comes out as A4 page size!
I confirmed that the images do fall inside the pixel bounds of 8.5x11 Inch (US LEtter) @300 DPI or 2550 x 3300 Pixels. Nothing was over that size at 300 DPI.
So I have tried numerous methods to specify output to letter size page. -resize, -page, etc and when I do so I ONLY get output that is the size of a postage stamp in Chrome's PDF viewer. Looking at the document properties in Atril Document viewer Linux I see "Paper Size 26 × 34 mm". Other document viewers confirm this.
I need to work this out if anyone can help.
BTW I also see conflicting information about "PDF resolution" and I think there are many documents that refer to imagemagick older versions. If in fact as seen posted on this site (Imagemagick) there is no "reslution or DPI in a PDF File why does My linux PDF document printer allow me to set this between 300 DPI to 2400 DPI? Maybe this is all misconformed language?
Now I have googled and tried everything I have found for days. Evan soultions that others say work for them , do not work in my case, but then again maybe they did not notice the tiny paper size?
Let me say also, the images all have valid exif data if that makes a difference.
Here is what I am doing:
Scanned images may be of ANY size so by default if I use:
Code: Select all
convert Name_*.jpg PrinternewL600x.pdf
Where I come into a problem is when I scan US Letter size documents and use the same command , It always comes out as A4 page size!
I confirmed that the images do fall inside the pixel bounds of 8.5x11 Inch (US LEtter) @300 DPI or 2550 x 3300 Pixels. Nothing was over that size at 300 DPI.
So I have tried numerous methods to specify output to letter size page. -resize, -page, etc and when I do so I ONLY get output that is the size of a postage stamp in Chrome's PDF viewer. Looking at the document properties in Atril Document viewer Linux I see "Paper Size 26 × 34 mm". Other document viewers confirm this.
I need to work this out if anyone can help.
BTW I also see conflicting information about "PDF resolution" and I think there are many documents that refer to imagemagick older versions. If in fact as seen posted on this site (Imagemagick) there is no "reslution or DPI in a PDF File why does My linux PDF document printer allow me to set this between 300 DPI to 2400 DPI? Maybe this is all misconformed language?