We would like to script a button for the user to click that utilizes File > Save as Other > Archivable PDF (PDF/A) after they fill out the form in Acrobat.
I would also like to know how to make that command actually work with a dynamic PDF. I get an error when I navigate to that command and try to use it so Im wondering if Archivable PDF option is even available in LiveCycle Designer created forms.
Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
@Mayank_Tiwari on first look it sounded good and I wasn't aware of that option - I learned something about AcroJS...
But for @nowackem this is probably not going to help. Here is why:
SaveAs is considered a trusted function which can only be executed as part of an external javascript file which must be installed with every user running Acrobat/Reader.
I am not sure if this is even possible in Designer created Forms but you can make a webservice call to Forms server for such conversions from Acrobat following this helpdoc. I see that the GeneratePDF service supports direct REST invocation and you may have to tweak the output file format.
I will wait for the experts to comment on this one, but in case you don't want to use Forms Server then i don't think it's possible OOTB unless user saves the form manually.
Try this:
this.saveAs("/c/temp/test.pdf","com.callas.preflight.pdfa");
Reference doc: https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript/
@Mayank_Tiwari on first look it sounded good and I wasn't aware of that option - I learned something about AcroJS...
But for @nowackem this is probably not going to help. Here is why:
SaveAs is considered a trusted function which can only be executed as part of an external javascript file which must be installed with every user running Acrobat/Reader.
Yes, this is specific to AcroJS only. won't work with XFA forms. For XFA forms, "Convert to PDF/A" service can be used.
@Mayank_Tiwari and @Kosta_Prokopiu1 unless I did something wrong, I tried to take an XFA form and convert it using a "Convert to PDF/A" service and it did not work. I got an error when opening back up in Acrobat after conversion. So I guess this is not going to work especially when I needed a button for the user to click and we cant rely on them using another link to convert manually even if it did work. Thank you again for trying to help, both of you!
@nowackem , do you run AEM Forms Server? If so and if the server is visible to the users, one could submit the PDF and convert it with AEM Forms services. It is also possibel to submit the data only and render a PDF/A version of the form on the server to be placed in some archive, etc...
Without such server functionality, out of itself, the PDF cannot be converted to PDF/A just like that.
Ok, I'm starting to see now. I will need to ask our IT peeps about this. Thank you for following up.
Views
Likes
Replies
Views
Likes
Replies