📜 ⬆️ ⬇️

html pdf do-it-yourself for N <60 seconds

So, you need to make a PDF from some HTML. I often have this need with articles from Wikipedia (formulas there, squiggles; for everything else, W3M is enough). And to launch the browser to do export as or print in pdf, of course, there is no desire for it, and no time, for browsing has a tendency to delay. I want to solve the problem from the console, or without leaving VIM. The solution exists, the commands are:

  firefox -print http://some.url.ru/page.html -printmode pdf -printfile /some/pdf/file.pdf 

This does not work with all firefox builds, but with some it works, for example, with the one that is Portable and under Windows. Yeah :) some hardcore IT pro-heroes generate PDFs by running this particular version via WiNE from PHP scripts.

  midori -s http://some.url.ru/page.html 

Midori is a great thing, if it were not for a huge number of bugs, it would not have been priced.
')
Everything :) Thank you for your attention and successful vectorization.

Source: https://habr.com/ru/post/85923/


All Articles