Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 a situation where I need to extract images from lots of PDF files and display them on a website. My PDFs have "regular" images as well as lots of graphs.

I used pdf2xml and it pulls out the images in jpeg, ppm, pbm and vec formats. I see the "regular" images being extracted (for the most part) as jpeg/ppm/pbm, but I don't see the graphs being there - and so I am guessing that pdf2xml is storing them as .vec files.

So the question is how to I get my graphs? I used convert that comes with imagemagick to convert .vec to jpeg/png etc but to no avail.

share|improve this question
up vote 2 down vote accepted

I've never tried pdf2xml, but browsing through its files on SourceForge, I found vec2svg-2.py, which appears to be a Python script to convert .vec files to .svg. You should have no difficulty converting SVG to whatever format you need.

python vec2svg-2.py -i file.vec -o file.svg
share|improve this answer
Very good observation ! Seems like it will do the job for me. Thanks ! – user6891 Apr 26 '11 at 2:14

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.