Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

1 Answer 1

up vote 2 down vote accepted

I've never tried pdf2xml, but browsing through its files on SourceForge, I found, 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 -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.