png to pdf conversion without change to source png?

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
TomC
Posts: 2
Joined: 2015-09-21T11:30:14-07:00
Authentication code: 1151

png to pdf conversion without change to source png?

Post by TomC »

Apologies if this is asked and answered or perhaps trivial. I'm relatively new to IM and am still getting up to speed on the application and this forum.

Question:

Can IM force a png to pdf conversion that doesn't scale the image? Or in fact alter it in any material way?

Background:

My goal is to enable a user of an ebook to print a page and have it look identical to the original png image.

I'm struggling to prevent Acrobat Pro from scaling images when I convert the pngs to pdf.

The pngs are 1 bit scans at 1200dpi and have been processed in Photoshop CS5. The high resolution is used to maintain the quality of the illustrations (ca. 1900 engraved cuts, unscreened) as much as possible.

Everything I've tried so far results in the images being slightly scaled up and ruining the clarity of the illustrations.

Thanks for any suggestions.

Tom
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: png to pdf conversion without change to source png?

Post by snibgo »

Sure. It just works, for me, with IM 6.9.1-6. If you are having problems, perhaps you are on an old version?

A sample of what goes wrong would also help.

The following works for me:

Code: Select all

f:\web\im>%IM%convert -size 2400x3600 gradient: -density 1200 -units pixelsperinch  p.png

f:\web\im>%IM%convert p.png p.pdf

f:\web\im>pdfimages -list p.pdf

page   num  type   width height color comp bpc  enc interp  object ID x-ppi y-ppi size ratio
--------------------------------------------------------------------------------------------
   1     0 image    2400  3600  gray    1   8  image  no         8  0  1200  1200 8948B 0.1%
Adobe reader reports that p.pdf is, as expected, 2x3 inches.
snibgo's IM pages: im.snibgo.com
TomC
Posts: 2
Joined: 2015-09-21T11:30:14-07:00
Authentication code: 1151

Re: png to pdf conversion without change to source png?

Post by TomC »

Thanks for the fast response.

Turns out the pdfs were converted fine and my problem was all related to printing from Adobe Acrobat. I fixed the issue by making sure the print settings in AA were set to "print as image" at 1200 dpi. Duh!

Thanks again,

Tom
Post Reply