wkhtmltopdf 的其他设置?
我正在使用 wkhtmltopdf (当前使用 perl 和命令行版本)将一些文档转换为 pdf。是否可以更改“PDF 制作者”、“PDF 版本”和“快速 Web 查看”字段?当前默认值分别为“wkhtmltopdf”、“1.4 (Acrobat 5.x)”和“否”。我在维基页面上没有看到任何内容
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通过命令行传递以下内容以查看支持的功能:“ --extended-help”
不确定是否支持这些特定参数。
Pass the following with the command line to see supported features: " --extended-help"
Not sure if those specific params are supported or not.
我最近修补了 wkhtmltopdf 以支持附加标志,并且添加参数来更改这些标志将非常容易。不过,我不认为它们目前受到支持。
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 制作者:不。大多数应用程序都希望人们知道特定的应用程序生成了 PDF。
PDF 版本:没有,但是很简单。文件开头的版本号实际上只是出于礼貌。你到底想做什么?很可能你并不真正需要它。生成的 PDF 不会仅仅因为 PDF 声称是这个版本或那个版本而自动获取任何功能。它只是真正被使用,以便打开较新 PDF 的查看者可以说“我不支持这个版本,有些东西可能无法工作”之类的话。因为无论如何一切都会正常工作(除非有人碰巧拥有非常旧版本的 Acrobat/Reader),所以我没有看到这个问题。
快速网络视图:不,而且绝对不平凡。 “快速网络视图”意味着显示 PDF 第一页所需的所有内容都被排序到文件的前面,并且有各种“提示”告诉下载 PDF 的应用程序可以在哪里找到这个或那个。这不仅仅是一面旗帜,远远不是一面旗帜。
零为三。对不起。
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.