Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

Pasted here for your convenience:


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


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


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.