简体   繁体   English

在Adobe Pro中复制粘贴动态图章

[英]Copy-paste dynamic stamp in adobe pro

In adobe pro, i have a dynamic stamp that puts in the username + time when the stamp is placed. 在Adobe Pro中,我有一个动态印章,放置印章时会加上用户名+时间。 This gets generated by some javascript that looks something like this: 这是由一些看起来像这样的javascript生成的:

event.value = identity.name + ” at ” + util.printd(“h:MM tt, mmm dd, yyyy”,new Date());

When the stamp gets placed on a document, the field gets filled with the username and time. 当图章放置在文档上时,该字段将填充用户名和时间。 When when someone copy an already placed stamp, and pastes it into another document, it will have the info from that first placed stamp, and its not fresh generated when pasted in a new document. 当某人复制已经放置的图章并将其粘贴到另一个文档中时,它将具有该第一个放置的图章的信息,并且在粘贴到新文档中时不会生成新的信息。 So to make it fraude proof, im looking for some way to make the code run again also when the stamp is placed again through copy-pasting. 因此,为了使其具有防欺诈性,我正在寻找某种方式使通过复制粘贴再次放置图章时再次运行代码。

Is this possible through the javascript ? 这可能通过javascript吗? Maybe build in some check or something ? 也许建立一些支票或什么?

The only way to "rerun" the JavaScript that populates the fields in the stamp is to use JavaScript on the document object, get the annotation, and then delete the AP property of the annot. “重新运行”填充图章中字段的JavaScript的唯一方法是在文档对象上使用JavaScript,获取批注,然后删除annot的AP属性。 This will cause the annotation to regenerate it's appearance which then executes the JavaScript. 这将导致注释重新生成其外观,然后执行JavaScript。

However, if fraud prevention is what you're after, I'd recommend using digital signatures since JavaScript can be turned off, the stamp copied to the new file, then JavaScript turned back on. 但是,如果您要预防欺诈,我建议您使用数字签名,因为可以关闭JavaScript,将图章复制到新文件中,然后再打开JavaScript。 A digital signature field can be copied, but it won't validate in the new file. 可以复制数字签名字段,但不会在新文件中进行验证。

I don't think you can make the stamp regenerate if it is scraped off of one document and placed into another. 我认为如果将邮票从一个文件上刮下来并放入另一个文件中,便无法使邮票再生。 A person knowledgeable enough to do so could as easily scrape off that JavasScript code from the stamp. 有足够知识的人士可以轻松地从戳记中删除该JavasScript代码。

What you could potentially do is immediately after you add the stamp, call the doc.timestampSign method so that the timestamp signature is reasonably and consistently close to stamp's time stamp. 您可能会做的是在添加戳记后立即调用doc.timestampSign方法,以便时间戳记签名合理且始终如一地接近戳记的时间戳。 So that a document that's assembled by scraping the stamp from another document might not have the timestamp, or the information captured in the timestamp signature might be off compared to a valid timestamp signature. 因此,通过从另一文档刮下图章而组装的文档可能没有时间戳,或者与有效的时间戳签名相比,时间戳签名中捕获的信息可能不正确。

In short, it would be the combination of the stamp with the timestamp signature that would validate a document as a counter-fraud measure rather than just the stamp alone. 简而言之,将戳记与时间戳签名相结合将使文档成为一种反欺诈措施,而不仅仅是戳记。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM