在 Acrobat 和 Adobe Reader 上拼合 PDF 图章

问题描述 投票:0回答:1

我有一个脚本可以压平定制的 PDF 图章。它在 Adobe Acrobat 上运行良好,但是当我复制图章并尝试与 Adobe Reader 一起使用时,图章不会变平。

图章的动态部分适用于 Acrobat 和 Reader,但不适用于拼合部分。

了解为什么这不起作用?我怀疑最后四行代码需要一些调整,但不确定如何调整。

if ((event.source.forReal)&&(event.source.stampName =="#lacers-stamp3")) {
if(identity.name == ""){
this.getField("name").value = "By: "+identity.loginName;
} else {
var first = identity.name.split(" ");
this.getField("name").value = "By: "+first[0]+" ("+identity.loginName+")";
 
};
this.getField("date").value = "On: "+ util.printd("mm/dd/yy hh:MM tt", new Date());

if(app.alert(
"The received by and date fields have been populated already.\n Is this document ready for LACERS approval?\n\nIf yes, select 'Ok' and the PDF will register your login automatically. \nOtherwise, select 'Cancel' and the field will remain blank so that it can be 'signed' at a later time using the PDF signature tool.\n\nIf you have any questions, please reach out to ASO.",2,2,  "Ready to apply LACERS' approval?")!==4){
this.getField("name-date").value = "";
}
}
app.setTimeOut("",250);

if(event.source.forReal && event.source.stampName == "#lacers-stamp3"){
 global.docToFlatten = event.source.source;
 app.setTimeOut("global.docToFlatten.flattenPages()", 500)
};````
javascript pdf adobe acrobat
1个回答
0
投票

如评论中所确认,现在作为答案。

Reader 不允许展平项目。你对此无能为力。我想到的唯一解决方法(除了使用 Acrobat 之外)是将表单数据提交给一个实用程序,该实用程序执行服务器端填充并可以(单独)展平字段。

© www.soinside.com 2019 - 2024. All rights reserved.