Expand my Community achievements bar.

Generating tagged PDF/document of record from AEM Forms.

Avatar

Level 4

We have an adaptive form that outputs a document of record. Currently the PDF that is produced by AEM is not tagged at all, i.e. heading, paragraph text etc. tags do not exist in the structure of the PDF.  I found this documentation about how to enable tagging via a custom CXI file, but the ;Services -> Forms' option that is mentioned in this document doesn't exist in AEM 6.5.  Am I just missing where this lives, or is the documentation incorrect?

 

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/forms/administrator-help/co....

7 Replies

Avatar

Level 4

Thank you, but I'm not using AEM Cloud Service, this is an on-prem installation.  

Avatar

Level 4

Thank you. We tried this was well and got an error when AEM tries to generate the DOR. 

 

We prepared a .xci file with the 'config/present/pdf/tagged' property set to '1', uploaded the .xci file to a location in /conf using crx, then updated the path of the .xci file in 'Adaptive Forms and Interactive Communication Web Channel'.

 

Here's what the .xci file looked like:

<?xml version="1.0" encoding="UTF-8"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
   <config xmlns="http://www.xfa.org/schema/xci/3.0/" xmlns:xfa="http://www.xfa.org/schema/xci/3.0/">
      <present> <!--  [0..n]  -->
         <pdf> <!--  [0..n]  -->
            <tagged>1</tagged> <!-- 0|1 -->
         </pdf>
      </present>
   </config>
</xdp:xdp>

 

And here's the start of the error we saw in the logs when attempting to generate the DOR:

08.05.2024 13:54:44.384 *ERROR* [[0:0:0:0:0:0:0:1] [1715201684381] POST /content/forms/af/formNanme/jcr:content/guideContainer.af.submit.jsp HTTP/1.1] com.adobe.aemds.guide.addon.service.impl.GuidePDFSubmitHelperImpl Exception in getting Wrapped Parameter Map For Pdf Submit null
java.lang.NullPointerException: null

 

Avatar

Employee

Please attach full error stack trace. Also what path you're pasting for XCI file?

Avatar

Level 4

I've attached a text file of the errors I receive when trying to generate a DOR with a custom XCI file set.

The path I was using for the custom .xci was /apps/customXCI/forms_noninteractive.xci

It doesn't even seem to be looking at the .xci file.  If I point it at a blank file I get the same error.  

Has anyone else been able to get this feature to work successfully?

Avatar

Level 4

We ended up figuring this out.  The custom .xci must be uploaded via assets.  We were manually adding it via CRX, which caused DOR generation to fail with a null error for some reason. Saving the same exact file in a text editor, uploading it via Assets, then referencing that path in the config worked. PDF's output from adaptive forms are now tagged correctly. The XCI file we used is below:

 

<?xml version="1.0" encoding="UTF-8"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
   <config xmlns="http://www.xfa.org/schema/xci/3.0/" xmlns:xfa="http://www.xfa.org/schema/xci/3.0/">
      <present> <!--  [0..n]  -->
         <pdf> <!--  [0..n]  -->
            <tagged>1</tagged> <!-- 0|1 -->
         </pdf>
      </present>
   </config>
</xdp:xdp>

 


Adobe's documentation on this is definitely lacking. An example or where/how to upload the file would be great, as would examples of actual .xci files with the correct structure.  

Support did advise me that custom .xci files might not yet work with certain submit actions such as 'Send Email' or 'Send PDF via Email'. They thought it would likely only work with the 'Submit an AEM Workflow' submit action. I'm going to be testing this week to confirm.