Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Merge two xdps and make a pdf in AEM Forms

Avatar

Level 3

Hi Team,

 

Here is my use case : There is one address fragment (xdp1) and there is one main form xdp2. Want to merge xdp1 into xdp2 and generate a pdf after merging. How do we do that in AEM Forms? Thank you !

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
3 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Level 3

Hi,

 

I want to use @reference AssemblerService

 

assemblerService.invoke(ddxDocument, mapOfDocuments, aoSpec);

but I am getting below error :

java.lang.ClassCastException: class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl cannot be cast to class com.adobe.aemfd.docmanager.Document (com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl is in module java.xml of loader 'bootstrap'; com.adobe.aemfd.docmanager.Document is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @796cec8d)

 Any help here?

 

-Kirti Khatri

Avatar

Level 3

Also Getting below error now :

 

java.io.IOException: Error of type 'javax.jcr.RepositoryException' thrown on attempting operation 'CONNECT' on URL 'crx://<DDX xmlns='http://ns.adobe.com/DDX/1.0/'

Avatar

Community Advisor

Hi @KirtiKhatri94 

 

Did you try to add log debuggers and see where it's getting failed/throwing exception.

1. Is this exception occurs while merging XDP files/ while creating PDF?

2. Did you try to save merged XDP and see whether it's merged properly or not?

 

 

Avatar

Level 3

Hi Siva,

 

I am using below DDX :

 

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<XDP result="GeneratedDocument.xdp">
<XDP source="map.xdp"/>
<XDP source="directions.xdp"/>
</XDP>
</DDX>

 

Trying to merge two xdps which I have kept in dam. 

 

I am getting below error :

 

java.io.IOException: Error of type 'javax.jcr.RepositoryException' thrown on attempting operation 'CONNECT' on URL 'crx://<DDX xmlns='http://ns.adobe.com/DDX/1.0/'

Avatar

Community Advisor

Hope you're following the steps mentioned here. 

https://help.adobe.com/en_US/AEMForms/6.1/ProgramLC/WS624e3cba99b79e12e69a9941333732bac8-7fba.2.html 

Also,Are you trying to connect AEM though external service? 

Is it possible to share the sample code here? 

 

Avatar

Level 3

Its resolved !! but How do we give coordinates so that fragment should come at correct position in main form?

Avatar

Level 3

For Resolving below issue:

java.io.IOException: Error of type 'javax.jcr.RepositoryException' thrown on attempting operation 'CONNECT' on URL 'crx://<DDX xmlns='http://ns.adobe.com/DDX/1.0/'

 

I kept http://ns.adobe.com/DDX/1.0/ in Schemas and DTDs inside Languages & Frameworks inside settings in intellij and then built my maven code.

Avatar

Level 3

Hi,

How do we give fragment name in ddx that needs to be merged in main xdp ?

Is there any enhancements in Assembler service in any of the service pack?

Because getting below error even when passing the right fragment name in ddx: 

Caused by: com.adobe.fd.assembler.client.AssemblerException$ClientException: PDFM_S28003: XFA Assembly unable to assemble required XFA Fragment