I recently stumbled on wkhtmltopdf and have found it to be an excellent tool for on-the-fly conversion from html to pdf in the browser.
A typical usage (in Windows) woul
Just a correction to the answer provided by Nenotlep. As Jigar noted (in a comment to Nenotlep's answer), Nenotlep's command results in quotation marks preceding and following the actual text. On my system (Windows 10) this command is the correct solution:
echo ^magical ponies^
| "C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe" - test.pdf
The echo
command needs no quotation marks - but, if you do not put the text between quotation marks, the <
and >
characters need to be escaped (by ^
).
Another way to try out is writing the text into a temporary file, which - on Windows - might even be faster as some sources state:
echo ^magical ponies^
> temp.txt
"C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe" - test.pdf < temp.txt
(This can also be written in one line: just put an &
between the two commands.)