Friday, August 14, 2015

Extract a (vector) figure from a pdf

In Linux (Mint 17) a (semiautomatic) trick that worked for me is, first extract the page with the desired vector figure using pdftk:

$ pdftk book.pdf cat 51 output page.pdf

in this case, the page 51 from the file book.pdf is extracted into the file page.pdf
Then using Inkscape, it is possible to open the file page.pdf, select the figure, copy and paste it in a new window, then save it as a new pdf (as a vector image), ready to be included in LaTeX!

No comments: