Expand my Community achievements bar.

SOLVED

How to create a PDF/A document after the user fills out the form in Acrobat?

Avatar

Level 6

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!

1 Accepted Solution

Avatar

Correct answer by
Employee

@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:

  • the command as you show does not work in XFA forms. It would have to be 
    myDoc = event.target;
    myDoc.saveAs("..","..");
  • But even when you use the correct way to address the document it will not work because of the error
    NotAllowedError: Security settings prevent access to this property or method. 

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.

View solution in original post

7 Replies

Avatar

Employee Advisor

@nowackem 

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.

Avatar

Correct answer by
Employee

@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:

  • the command as you show does not work in XFA forms. It would have to be 
    myDoc = event.target;
    myDoc.saveAs("..","..");
  • But even when you use the correct way to address the document it will not work because of the error
    NotAllowedError: Security settings prevent access to this property or method. 

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.

Avatar

Employee

Yes, this is specific to AcroJS only. won't work with XFA forms. For XFA forms, "Convert to PDF/A" service can be used.

Avatar

Level 6

@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!

Avatar

Employee

@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.

Avatar

Level 6

Ok, I'm starting to see now. I will need to ask our IT peeps about this. Thank you for following up.