我正在尝试在 pdf 创建过程中添加一些 JS 以节省一些时间。我的目标是基本上单击一个按钮生成 PDF 并打印它。
现在我有:
var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.full;
this.print(pp);
唯一的问题是我不知道如何设置打印份数。我想传递一个变量并打印那么多份。问题是我真的找不到任何讨论此类中的方法的文档。
最佳答案
我知道,这个问题已经很老了。但我也在寻找解决方案。我发现here ,它应该与以下内容一起使用:
//no of copies
var n = 3;
var pp = this.getPrintParams();
//here is the magic
pp.NumCopies=eval(n);
this.print(pp);
对我来说,这是与 tcpdf 和 Adobe Reader 一起使用的。
关于javascript - 如何设置份数 getPrintParams(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13771741/