我最近偶然发现了wkhtmltopdf并发现它是一个很好的工具,可以在浏览器中从html转换为pdf.
典型用法(在Windows中)将:
wkhtmltopdf.exe --some-option "<div>Some html <b>formatted</b> text</div>" www.host.com/page_to_print.html file.pdf
Run Code Online (Sandbox Code Playgroud)
我的问题是:有没有使用选项<html><head></head><body><h1>This is a header</h1></body></html>代替www.host.com/page_to_print.html?
谢谢你的帮助.