Page 1 of 1

PDF conversion problems ...

Posted: 2019-07-14T01:56:51-07:00
by lsces
Occasionally in the past I've had thumbnails for pdf files for which the background has turned to black. I resorted to manually generating the thumbnails until the " -background White -layers flatten" fix sorted this but a recent file has given me ALL the pages flattened into the one image. Obviously all I'm trying to get is the first page with a white background as a thumbnail when uploading a pdf. I can bodge things and upload a single page pdf before manually copying over the full document, but there must be an easier way ... or is there some way to tidy the pdf itself instead?

Re: PDF conversion problems ...

Posted: 2019-07-14T04:15:01-07:00
by snibgo
To get just the first page, append "[0]" to the pdf name, eg:

Code: Select all

magick in.pdf[0] out.jpg

Re: PDF conversion problems ...

Posted: 2019-07-14T05:41:21-07:00
by lsces
I've worked out how to add that to the source file string but it's not making any difference. the library code is using convert '$source' '$thumb' and I've added the ; -background White -layers flatten ' between the file strings, and I have [0] inside the '' wrapper for the source file ? This is the problem trying to fix other peoples code :( But can you point me to a manual page which shows the [0] option?

Re: PDF conversion problems ...

Posted: 2019-07-14T05:55:39-07:00
by snibgo

Re: PDF conversion problems ...

Posted: 2019-07-14T06:57:56-07:00
by lsces
Turns out the problem is with the version of ghostscript running on suse Leap 15.0 ... 9.26a is supposed to fix the page select fault but I had to update to the 9.27 to avoid it and now things are working. Need to update 2 more servers as well now :(

Re: PDF conversion problems ...

Posted: 2019-07-14T11:12:27-07:00
by fmw42
GS 9.27 is also reported to have some issue. I would suggest downgrading to 9.23, 9.24, or 9.25