Having trouble creating pdf

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
imagetragick
Posts: 2
Joined: 2011-10-24T10:27:52-07:00
Authentication code: 8675308

Having trouble creating pdf

Post by imagetragick »

Hi I've just installed imagemagick for linux but I'm having trouble creating (working) pdf files.
I've need to turn 4 png files into a pdf with 1 file per page, and was trying to do this using

Code: Select all

convert example1.png example2.png example3.png example4.png example.pdf
I have also tried converting 1 image at a time and tested other images and filetypes, I've also tried passing a few different options that search results have brought up, but I always get the same result.
The conversion appears ok, (no errors reported, pdf gets created) but I am unable to open them, I have tried zathura and epdfview but both report the pdfs are broken. Running epdfview in bash gives;

Code: Select all

$ epdfview test.pdf 
Error: May not be a PDF file (continuing anyway)
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
I can open the files in gimp (not that gimp can save as pdf) so the files arent totally corrupt, though when I opened the pdf I'd tried to create with multiple pages gimp only showed the 1st page.
I used imagemagick to reduce the colours in the initial files I wanted to convert and this worked fine so parts of it at least are working.
I cant decide if this is something I'm doing wrong, a dependency I'm missing, or an bug?
imagetragick
Posts: 2
Joined: 2011-10-24T10:27:52-07:00
Authentication code: 8675308

Re: Having trouble creating pdf

Post by imagetragick »

All sorted, I was missing ghostscript.
Post Reply