开发者

additional settings for wkhtmltopdf?

开发者 https://www.devze.com 2023-01-08 17:02 出处:网络
I am开发者_如何转开发 converting some docs to pdf using wkhtmltopdf (currently using perl and the command line versions). Is it possible to change the \"PDF Producer\", \"PDF Version\" and \"Fast Web

I am开发者_如何转开发 converting some docs to pdf using wkhtmltopdf (currently using perl and the command line versions). Is it possible to change the "PDF Producer", "PDF Version" and "Fast Web View" fields? The current defaults are "wkhtmltopdf", "1.4 (Acrobat 5.x)", and "No", respectively. I didn't see anything in the wiki page


Pass the following with the command line to see supported features: " --extended-help"

Not sure if those specific params are supported or not.


I patched wkhtmltopdf to support an additional flag recently, and it would be quite easy to add parameters to change those. I don't believe they are supported currently, though.


PDF Producer: Nope. Most apps want folks to know that particular app generated the PDF.

PDF Version: Nope, but trivial. The version number at the beginning of the file is just a courtesy really. What exactly are you after with this? Chances are you don't really need it. The PDF generated isn't going to acquire any features automagically just because the PDF claims to be this version or that. It's only really used so a viewer opening a newer PDF can say something like "I don't support this version, some stuff might not work". Because everything will work regardless (unless someone happens to have a VERY old version of Acrobat/Reader), I don't see the issue.

Fast Web View: Nope, and decidedly non-trivial. "Fast Web View" means everything needed to display the first page of the PDF is sorted to the front of the file, and there are various "hints" on where an app downloading the PDF can find this or that. It's not just a flag, not by a long stretch.

Zero for three. Sorry.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号