Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a PDF file with vector images inside it. (I downloaded it from the internet, so I do not have any originals.)

I wish to extract the vectors so that I can overlay them on some other images; use them in print media, or on a website.

How do I extract the specific vectors from the PDF file?

Is there, perhaps, any software which can extract the vectors from a PDF file? (Preferably free.)

share|improve this question
    
@slhck: I meant Vector graphics. I did use Inkscape, and It works as expected. Can you please put your comment as an Answer, so that I can mark it as accepted? –  Devdatta Tengshe Jun 25 '11 at 12:04

2 Answers 2

up vote 16 down vote accepted

You can use Inkscape, which is a free, open source and cross-platform vector graphics application. It will allow you to import the PDF files and select embedded vectors. You can then edit them and process as you like.

Detailed documentation is available on the Inkscape website.

Alternatively, you may want to give Adobe Illustrator a go (paid software).

share|improve this answer
    
The problem with Inkscape, is that it requires X11 and is a pita –  MarcusJ Dec 20 '14 at 17:09

While Inkscape is an awesome way to do it, for those lacking X11, you can also extract individual pages of a PDF into SVG format using the poppler-utils at the command line. For example, to extract just page 30:

$ pdftocairo -f 30 -l 30 -svg  somehugemanual.pdf  myextractedpage.svg

You can then use your favorite vector editor (mine is Inkscape) to isolate the image from the text.

Alternately, if you're a hardcore command-line user, you can extract to EPS (encapsulated postscript) and use sed to hide all the text (which happens to be between BT and ET lines for pdftocairo). Here's how:

$ pdftocairo -f 30 -l 30 -eps  manual.pdf  - | sed '/BT/,/ET/ d' > myimage.eps

And, if you're really insane to avoid using X11, you can even shrink the bounding box of the image from the command line using Ghostscript's epstoeps command:

$ epstoeps myimage.eps myimage-bb.eps

I've tested this and it works great. However, personally, I find it easier to just use Inkscape.

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.