Copy link to clipboard
Copied
Hi All,
Am looking for a JavaScript script to import comments from a different PDF document using the "Import Data File" option in Adobe Acrobat Pro. The script I have works to open the dialog box, but it does not allow for the selection of PDF files or import comments from a different file. This isn't the whole process. Prior to this, there is a resizing of the documents is step 1, which I have worked on and it is working fine.
Kindly help me out to open the dialog box from comments section "Import Data File..."
var cPathToFile = "/path/to/your/comments.fdf";
// Replace with the actual path to your FDF/XFDF file
this.importAnFDF(cPathToFile);
Copy link to clipboard
Copied
First, you don't need a script for any of this.
Next, you'll notice that when you select the "Import Data File" option from the drop down menu in the Comment Toosl, it displays a FileOpen dialog for selecting a file. And the file type that it wants is "fdf". this is the only type of file that can contain comments.
So, you have to save the comments from the other file into an FDF. This is done from the same menu with the "Export All to Data File..." option.
Copy link to clipboard
Copied
Thank you for your response. I want to create using the guided action in Acrobat to streamline our workflow. Specifically, I need to automate the following steps:
Automating these steps would significantly enhance our productivity, as we handle a large volume of documents regularly in the pharmaceutical industry. Your guidance on how to proceed would be greatly appreciated.
Looking forward to your support.
Copy link to clipboard
Copied
There are a couple of ways to transfer comments from one PDF to another using an automation script.
In both cases, both the source PDF and the destination PDF have to be open in Acrobat.
Method #1: Export comments from the source to an fdf file. Then import the fdf into the target PDF.
Use the doc.exportAsFDF and doc.importAnFDF functions
Method #2: Loop through all the annotations on the source PDF. Acquire a "properties" object from each annotation and use it to re-create the annotation on the target PDF.