Expand my Community achievements bar.

Merging annotations in PDF using Assembler Service

Avatar

Former Community Member

Hi all,

I want to merge Annotations in pdf. For that, I am using Assembler service. DDx is as below:

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">

  <PDF result="resultDoc">

    <PDF source="originalPDF"/>

    <Comments source="commentsXFDF"/>

  </PDF>

  <?ddx-source-hint name="originalPDF"?>

  <?ddx-source-hint name="commentsXFDF"?>

</DDX>

Above DDX is not working for pdfs, which are not created by Adobe(related products).  Sample Input pdf producer is "Dalim Software Applications"

Error logs are as below:

2013-10-01 00:14:21,675 WARN  [com.adobe.internal.ddxm.ddx.pdf.PDFResult] (http-0.0.0.0-8080-4) DDXM_W10001: Could not update metadata on resultDoc.pdf.

com.adobe.internal.pdfm.metadata.MetadataException: PDFM_S10004: Metadata operation "releaseMetadata/commit" failed for document "resultDoc.pdf" due to an int

ernal error ....

Caused by: com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidDocumentException: CosName expected, found class com.adobe.internal.pdftoolkit.core.cos.CosString , invalid obj number: 0, dict key: /Trapped

.....

2013-10-01 00:14:21,681 ERROR [com.adobe.internal.ddxm.Executive] (http-0.0.0.0-8080-4) DDXM_S00001: Failed to assemble result named resultDoc

com.adobe.internal.pdfm.DocumentException: ALC-ASM-S01-004: Failed to convert content for originalPDF.

Caused by: com.adobe.internal.pdftoolkit.core.exceptions.PDFUnableToCompleteOperationException: Error during commit of XMP data to PDF document.

Caused by: com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidDocumentException: CosName expected, found class com.adobe.internal.pdftoolkit.core.cos.CosString , invalid obj number: 0, dict key: /Trapped

I tried to validate metadata of the input pdf using http://www.pdflib.com/knowledge-base/xmp-metadata/free-xmp-validator/and the result is as follows:

XMP data is  invalid

Reason: XMP metadata: Description of extended property 'xmpMM:OriginalDocumentID' missing in embedded extension schema 'xmpMM' description

Now, if actual cause of the issue is invalid xmp data, then How can I deal this types of pdfs.

Is there any tool to repair xmp data or any thrid party library to merge all types of annotations (like text comments, stamps, file attachments , ..)  in pdf.

Please suggest

4 Replies

Avatar

Level 3

You can try to pass the 3rd party PDF through optimize operation, or try to convert it to PS and then back to PDF/

that usually repackages the file as a LiveCycle produced PDF, with all the meta data required to identify it as a valid PDF by LiveCycle.

Avatar

Former Community Member

Thank you,

We are having problem with GeneratePDF.

We will verify and let you know

Avatar

Level 3

I'm assuming that you tried to optimize the PDF first and then merge it right ?

the other option could be convert to PS and then again PS to PDF, this also tends to repackage the PDF as per adobe standards at times.

If none of these work, try to open the 3rd party PDF in Acrobat and save it.

Now attempt the assembly.

if all options fail, can you host this file somewhere and share the link, so that i can give it a shot.

~Sidharth