本文整理了Java中com.itextpdf.text.pdf.PdfWriter.addJavaScript()
方法的一些代码示例,展示了PdfWriter.addJavaScript()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PdfWriter.addJavaScript()
方法的具体详情如下:
包路径:com.itextpdf.text.pdf.PdfWriter
类名称:PdfWriter
方法名:addJavaScript
[英]Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.
[中]使用此方法在文档级别添加JavaScript操作。当文档打开时,所有这些JavaScript都会运行。
代码示例来源:origin: com.itextpdf/itextpdf
/**
* Use this method to adds a JavaScript action at the document level.
* When the document opens, all this JavaScript runs.
* @param code the JavaScript code
*/
public void addJavaScript(final String code) {
addJavaScript(code, false);
}
/**
代码示例来源:origin: com.itextpdf/itextpdf
/**
* Use this method to adds a JavaScript action at the document level.
* When the document opens, all this JavaScript runs.
* @param name The name of the JS Action in the name tree
* @param code the JavaScript code
*/
public void addJavaScript(final String name, final String code) {
addJavaScript(name, code, false);
}
代码示例来源:origin: com.itextpdf/itextg
/**
* Use this method to adds a JavaScript action at the document level.
* When the document opens, all this JavaScript runs.
* @param name The name of the JS Action in the name tree
* @param code the JavaScript code
*/
public void addJavaScript(final String name, final String code) {
addJavaScript(name, code, false);
}
代码示例来源:origin: com.itextpdf/itextg
/**
* Use this method to adds a JavaScript action at the document level.
* When the document opens, all this JavaScript runs.
* @param code the JavaScript code
*/
public void addJavaScript(final String code) {
addJavaScript(code, false);
}
/**
代码示例来源:origin: stackoverflow.com
PdfWriter writer = stamper.getWriter();
writer.addJavaScript(Utilities.readFileToString(RESOURCE));
代码示例来源:origin: com.itextpdf/itextpdf
/**
* Use this method to add a JavaScript action at the document level.
* When the document opens, all this JavaScript runs.
* @param code the JavaScript code
* @param unicode select JavaScript unicode. Note that the internal
* Acrobat JavaScript engine does not support unicode,
* so this may or may not work for you
*/
public void addJavaScript(final String code, final boolean unicode) {
addJavaScript(PdfAction.javaScript(code, this, unicode));
}
代码示例来源:origin: com.itextpdf/itextpdf
/**
* Use this method to add a JavaScript action at the document level.
* When the document opens, all this JavaScript runs.
* @param name The name of the JS Action in the name tree
* @param code the JavaScript code
* @param unicode select JavaScript unicode. Note that the internal
* Acrobat JavaScript engine does not support unicode,
* so this may or may not work for you
*/
public void addJavaScript(final String name, final String code, final boolean unicode) {
addJavaScript(name, PdfAction.javaScript(code, this, unicode));
}
代码示例来源:origin: com.itextpdf/itextg
/**
* Use this method to add a JavaScript action at the document level.
* When the document opens, all this JavaScript runs.
* @param code the JavaScript code
* @param unicode select JavaScript unicode. Note that the internal
* Acrobat JavaScript engine does not support unicode,
* so this may or may not work for you
*/
public void addJavaScript(final String code, final boolean unicode) {
addJavaScript(PdfAction.javaScript(code, this, unicode));
}
代码示例来源:origin: com.itextpdf/itextg
/**
* Use this method to add a JavaScript action at the document level.
* When the document opens, all this JavaScript runs.
* @param name The name of the JS Action in the name tree
* @param code the JavaScript code
* @param unicode select JavaScript unicode. Note that the internal
* Acrobat JavaScript engine does not support unicode,
* so this may or may not work for you
*/
public void addJavaScript(final String name, final String code, final boolean unicode) {
addJavaScript(name, PdfAction.javaScript(code, this, unicode));
}
代码示例来源:origin: cn-cerc/summer-mis
writer.addJavaScript("this.print({bUI: true, bSilent: true,bShrinkToFit:true});", false);
内容来源于网络,如有侵权,请联系作者删除!