How to extract vectors from a PDF file?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Over a Mysterious Island
--
Chapters
00:00 How To Extract Vectors From A Pdf File?
00:33 Accepted Answer Score 72
01:38 Answer 2 Score 35
02:42 Answer 3 Score 0
02:55 Thank you
--
Full question
https://superuser.com/questions/302045/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#pdf #vectorgraphics
#avk47
ACCEPTED ANSWER
Score 72
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:
Image from here.
You can then edit the vectors and process as you like.
General documentation is available on the Inkscape website. Details about PDF importing can be found here:
- PDF in Importing other File Formats — Inkscape Beginners' Guide 1.0 documentation
- Time for action — importing a PDF into Inkscape – O'Reilly's book Inkscape by Bethany Hiitola, chapter 3
Note that on Linux it like requires X11. There is also a native Windows version.
Alternatively, you may want to give Adobe Illustrator a go (paid software).
ANSWER 2
Score 35
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 eps2eps
command:
$ eps2eps myimage.eps myimage-bb.eps
I've tested this and it works great. However, personally, I find it easier to just use Inkscape.
ANSWER 3
Score 0
You can use Affinity Designer (paid, not a subscription, you have to pay for every major version), which is available for Windows and Mac.