I want to save a single web page (or section of a webpage) as a vector graphic in my latex document.
How can I save a webpage as a vector image?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI want to save a single web page (or section of a webpage) as a vector graphic in my latex document.
How can I save a webpage as a vector image?
Use wkhtmltopdf as Giles suggests above in a comment. It uses webkit to render your page as a vector PDF from the command line.
(I'm promoting this to a top level answer since this jewel is likely to go unnoticed in the mess of comments).
I suppose you mean a single web page, not a whole web site!
Perhaps you could print to a PDF file from your browser, and either \includegraphic
the PDF file, or convert it to *.eps
or *.svg
using some utilities?
Of course, the problem with printing is you'll get output that looks like it was meant to be printed. Normally that's what you want after all...
If you go into your browser's print settings, you can instruct it to print background colors and images, and turn off header / footer text - that's the easy part. However, it won't get around anything the page itself does to improve the printed output: for instance, Wikipedia has a custom set of styles that are used when printing, to remove superfluous text and graphics (the header, sidebar, edit/expand links, etc).
You might prefer something like this: https://addons.mozilla.org/en-US/firefox/addon/save-as-pdf/
A project, that seems to cover this use-case seems to be the project WebVector, that uses CSSBox as rendering engine: http://cssbox.sourceforge.net/webvector/
This uses WebKit and saves it as PDF, which could may be more accurate: http://wkhtmltopdf.org/
Try this service. Creates a vector PDF from a website as you see it in the browser. https://lomotoh.com/ (I am affiliated with this site)