convert PNG to PDF now too big !

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
pippardo

convert PNG to PDF now too big !

Post by pippardo »

Hi There !

Please see three files in http://rapidshare.com/files/167568132/sample.rar.

Why 2.pdf is 10 times greater than 1.pdf ? Both are build with:
convert source.png x.pdf

1.pdf is built with IM 6.4.0 Q16 on winXP (dead PC)
2.pdf is built with IM 6.4.6 Q16 on winXP

Bye from Italy !!!
Pippardo
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert PNG to PDF now too big !

Post by magick »

Looks like a bug which we will fix in the next point release. In the mean-time use this command:
  • convert source.png -compress zip source.pdf
pippardo

Re: convert PNG to PDF now too big !

Post by pippardo »

It works. You great !

Tks !
Pippardo
Mazin
Posts: 10
Joined: 2008-11-24T13:30:50-07:00

Re: convert PNG to PDF now too big !

Post by Mazin »

I was just about to come here and post about the same problem. It seems that IM doesn't embed images in PDFs in their native bit depth.

I received a PDF of scans (black and white, 1bit/px). Burst it with pdfimages into PBM. Converted it into PNG (still 1bit/px). Ran "convert *.png pdf.pdf". The resulting PDF was much larger. I burst the new PDF with pdfimages, and I got PPM instead.

Anyways, using "convert *.pbm -compress Group4 something.pdf" worked wonders. Thanks!
Post Reply