Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have PDF file with layer masks (i.e. transparencies) and I need to extract transparent layers of images.

When I use pdfimages to extract images - both .jpgs and .pngs have same white non-transparent background. ImageMagick's convert a.pdf image-%04d.png outputs single non-layered file.

Any help would be appreciated.

share|improve this question

3 Answers 3

Take a look at this: Remove text information from a PDF?

Pasted here for your convenience:

Openoffice

Install the PDF Import Extension from Oracle into your Extension Manager for OpenOffice and you will be able to open and edit your PDF files inside of OpenOffice Draw. Which will create all the elements (text, lines, drawings, etc.) and you will be able to remove those that you don't wish. A screenshot is here:

enter image description here

Gimp

If you prefer to handle your pdf pages as layers and edit'em as images, then you can right click the PDF file and choose "Open with GIMP Image Editor", the "Import from PDF" dialog will show after opening gimp and will allow you to choose which pages you wish to edit with several options as shown in the next screenshot.

enter image description here

After which you will also be able to edit those pages as shown in this screenshot:

enter image description here

Good luck!

share|improve this answer

I think the layer masks are part of the PDF and not part of the images. You can however using some PDF library obtain masking details and then use some other image processing library or tool to apply those masks on the extracted images.

share|improve this answer

Scribus will also make a good attempt at opening pdf files for editing. YMMV depending on how the pdf has been created. I often have to stitch together multiple images chopped up in "retrieved" pdfs.

Also, AFAIK, jpegs don't support transparency and the majority of pdfs that I encounter have had the images embedded as jpeg.

I only hope that the transparent images you're after are actually svg graphics. If so you should be very successful with Scribus.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.