Page 1 of 1

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

Posted: 2010-02-01T03:59:51-07:00
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.

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

Posted: 2010-02-01T09:40:24-07:00
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?

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

Posted: 2010-02-02T07:41:36-07:00
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... :)