PDF to PNG, how do i select a specific layer.

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
Nacho

PDF to PNG, how do i select a specific layer.

Post by Nacho »

Hello,

I am currently trying to make a derived image script to create PNG files from a PDF file.
The problem is that these pdf files contain 3 layers, one of which i do not want to see in my output file.

example command line:

Code: Select all

convert document.pdf[0] png:derived_image.png
The 3 layers are called:
- BASE (contains image)
- LANG1 (contains text)
- LANG2 (contains text)

Is there any way to select the layers to use in the output file, with IM or GS?
My current output is all the layers at once, which has overlapping text from both LANG layers.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PDF to PNG, how do i select a specific layer.

Post by fmw42 »

the frame selector [#] selects pages from a PDF and not layers. I don't know any way in IM to extract layers. But I am no expert on PDF. Perhaps you can use Ghostscript directly?
Nacho

Re: PDF to PNG, how do i select a specific layer.

Post by Nacho »

Thanks fmw42 for the responce.
I did find de page selecter aswel but nothing about selecting individual layers.
I found no direct answer to my problem in de gs manual, but i'm not giving up so easily... :)
Post Reply