我正在使用 wkhtmltopdf.exe 来生成 PDF 文件并且它工作正常。现在我需要设置显示布局(单页 View 、两页 View )以在 adobe reader 中打开。我无法在文档中找到它。
我想确定要么不可能,要么我们有任何相同的设置。
请指教。
最佳答案
单独使用 wkhtmltopdf 是不可能的。此工具只会将您的 HTML 转换为标准 PDF。
您正在寻找的是一个附加工具,它可以设置显示首选项,然后您可以在创建 PDF 后运行它。例如,您可以使用 PDF::API2 Perl 包(免费)。
控制 PDF 的查看首选项。
页面模式选项:
-fullscreen
Full-screen mode, with no menu bar, window controls, or any other window visible.
-thumbs
Thumbnail images visible.
-outlines
Document outline visible.
Page Layout Options:
-singlepage
Display one page at a time.
-onecolumn
Display the pages in one column.
-twocolumnleft
Display the pages in two columns, with oddnumbered pages on the left.
-twocolumnright
Display the pages in two columns, with oddnumbered pages on the right.
这应该使您能够实现目标。
关于.net - 我们可以使用 wkhtmltopdf.exe 为 pdf 设置显示布局吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22779295/