how to extract a vector figure from pdf

I have a question. I inserted my figure into my pdf file using latex in this way: I first created a vector figure using inkscape. Then I converted it to the pdf format and then included it to pdf using latex. Right now, using this generated PDF, I want to extract the previous svg figure. How can I extract it ?

BTW: I tried illustrator and also inkscape. However both required too many manual operations. I prefer the one which will take the pdf as input and output the svg figure. enter image description here


You could try this:

inkscape yourFile.pdf --export-plain-svg=yourFile.svg

It will take the first page of the PDF and all the default import options.

You could also try pdf2svg to export svg file from pdf.

pdf2svg <input.pdf> <output.svg> [<pdf page no. or "all" >]

man pdftocairo

NAME
       pdftocairo  - Portable Document Format (PDF) to PNG/JPEG/PDF/PS/EPS/SVG 
       using cairo

 SYNOPSIS
       pdftocairo [options] PDF-file [output-file]

Make sure that the required libraries listed above are available on your system.

sudo apt-get install python-poppler python texlive-extra-utils texlive

Now easily use :

pdftocairo -svg SomePDFfile.pdf

But if the pdf file contains more than single page you have then to explode then extract:

FIRST split this multipage pdf into its single pages

pdftk file.pdf burst

then use pdftocairo to convert any pdf page into svg

for f in *.pdf; do pdftocairo -svg $f; done

some contents from here