PDF conversion problems ...
PDF conversion problems ...
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?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: PDF conversion problems ...
To get just the first page, append "[0]" to the pdf name, eg:
Code: Select all
magick in.pdf[0] out.jpg
snibgo's IM pages: im.snibgo.com
Re: PDF conversion problems ...
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?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: PDF conversion problems ...
On [0] etc, see https://imagemagick.org/Usage/files/#read_mods
snibgo's IM pages: im.snibgo.com
Re: PDF conversion problems ...
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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF conversion problems ...
GS 9.27 is also reported to have some issue. I would suggest downgrading to 9.23, 9.24, or 9.25