How do you programmatically redact PDF FIles?

前端 未结 4 1043
再見小時候
再見小時候 2021-01-02 22:02

Adobe Acrobat has the ability to redact PDF files (that is, actually remove the information, rather than simply drawing a black box on top of it). I would like to use this f

4条回答
  •  清歌不尽
    2021-01-02 22:22

    Here's a web page that goes through what you need to do. As others mentioned you have to do this in Javascript as that's what Acrobat's native scripting is.

    http://acrobatusers.com/tutorials/2008/07/auto_redaction_with_javascript

    While I use Acrobat regularly I've surprisingly never had a need to script it. I checked the dictionary for it and it looks like you'll have to write Javascript file, save it and then open it with Applescript if that's what you want to do (say as a service).

    tell application "Adobe Acrobat Professional"
       do script "this.info.title;"
    end tell
    

    Here's Adobe's Javascript for Acrobat documentation

    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat9_HTMLHelp&file=JavaScript_SectionPage.70.1.html

提交回复
热议问题