2017-07-07 70 views
1

尝试使用chrome-remote-interface Node js模块创建pdf。当我尝试将参数传递给printToPDF函数时,我得到的输出与没有参数的输出相同。使用Node js和Google Chrome打印pdf

页号:https://chromedevtools.github.io/devtools-protocol/tot/Page/

查找到printToPDF功能。

我的代码用于打印pdf。

const pdf = await Page.printToPDF({landscape: 'true',displayHeaderFooter: 'true',printBackground: 'true',scale: '1.0',paperWidth: '8.5',paperHeight: '11',marginTop: '0.4',marginBottom: '0.4',marginLeft: '0.5',marginRight: '0.5',pageRanges: ""}); 

回答

0

的问题是,打印到PDF只能从60版这就是为什么它没有工作

支持参数