Converting PDF to image results in hidden differences

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?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PDF to image results in hidden differences

Post by fmw42 »

that is pnmraw not pngraw

With respect to pngalpha, are you converting multiple pages in one pdf or multiple pdf files. I was under the impression that the former could not be done. Perhaps, if that is what you did, then a newer version of GS may have fixed that issue.
User avatar
discretiongrove
Posts: 13
Joined: 2013-02-19T01:20:09-07:00
Authentication code: 6789

Re: Converting PDF to image results in hidden differences

Post by discretiongrove »

Wow, I did not notice that the next reply is on a new page. pnmraw huh? I'll try that one.

Actually I'm converting PDFs to multiple images. The PDF contains more than 2 pages.
I'm not really Stephen Malkmus.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PDF to image results in hidden differences

Post by fmw42 »

Let me know if you get multiple pages that keep your transparency using pngalpha when saving to png or tif. If it works, then something new has been added to GS.

pnmraw I believe refers to NetPBM formats. see http://netpbm.sourceforge.net/
User avatar
discretiongrove
Posts: 13
Joined: 2013-02-19T01:20:09-07:00
Authentication code: 6789

Re: Converting PDF to image results in hidden differences

Post by discretiongrove »

Hey there, I'll be doing some other tasks now so I'd go back here once I have some free time again.

I just came here to confirm to you that both PNG and TIFF has their transparency retained when converting the PDFs. You've done lots for me, this is the least I can do(hey, thanks! :) ).

Here's the PDF I used:
http://kosovo.ohchr.org/repository/docs ... sample.pdf

Here's the setting:
Image

Here's the PNG output:
Image

Here's the TIFF outputs:
Image
Image

I am unfamiliar with the TIFF format and was surprised to see just one generated file with a huge file size but when I opened it the file has navigation arrows like a PDFs and when I navigated I saw that the transparencies where there.

By the way, I tried it one time before I did the stuff above and I saw I had pnmraw on my delegates.xml file and it generated the image files with their transparencies on just like pngalpha.

Thanks a bunch man! I'd probably come back when I work on this again and try your last advice. God bless!
I'm not really Stephen Malkmus.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PDF to image results in hidden differences

Post by fmw42 »

It would be nice to know what version of Ghostscript you are using.
User avatar
discretiongrove
Posts: 13
Joined: 2013-02-19T01:20:09-07:00
Authentication code: 6789

Re: Converting PDF to image results in hidden differences

Post by discretiongrove »

According to my installation it's 9.05. When I open the console it says "GPL Ghostscript 9.05 (2012-02-08)".

Update: Interesting, this site http://pages.cs.wisc.edu/~ghost/ has GS up unto 9.02, Sourceforge has 9.05 as the latest version(so I think that's where I downloaded it) but there's even a latest version which is 9.07 in Sourceforge and Google Code. Then the official Ghostscript page lists 9.07 as the latest version http://www.ghostscript.com/download/.
I'm not really Stephen Malkmus.
Post Reply