We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF/A Signature problem

Hi All,


I have a problem with PDF/A document with two and more signature fields.

1) I have converted PDF generated by JasperReports to PDF/A-3B by Aspose for java 9.3.1
2) I put 3 signature fields to this PDF/A
till this ducoment seams OK

Then we use SignPad (from Contrisys) for signing and when i open the document in Adobe Reader I see errors on first two signatures. The same behavior we receive when we sign the document in Adobe Pro.

Any idea ?

We like to use this library for big project in UNIQA but we need to solve this problem.

Thank you

Jan

Hi all,


any idea ? We need to solve it quickly or we have to use different library.

Please help

Jan

Hi Jan,


We are sorry for the delayed response. We have noticed the issue and logged it as PDFNEWJAVA-34505 in our issue tracking system for further investigation and resolution. We will keep you updated about the issue resolution progress via this forum thread.

Meanwhile, please share your source PDF document and sample code to convert PDF to PDF/A and adding signature fields. It will help us to investigate the issue.

Best Regards,

Thank you.


source_pdf.pdf - The source PDF document generated by the application

doc.validate(_args[0] + “.xml”, PdfFormat.PDF_A_3B);

// Convert to PDF/A3 compliant document
doc.convert(_args[0] + “_log.xml”, PdfFormat.PDF_A_3B, ConvertErrorAction.Delete);

pdfa_pdf.pdf - PDF/A-3B generated by aspose PDF for java (9.3.1)

TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber("Podpis ");

pdfDocument.getPages().accept(textFragmentAbsorber);

TextFragmentCollection textFragmentCollection = textFragmentAbsorber.getTextFragments();

for (TextFragment textFragment : (Iterable) textFragmentCollection) {

for (TextSegment textSegment : (Iterable) textFragment.getSegments()) {
Rectangle rec = new Rectangle(textSegment.getRectangle().getLLX() + 60,
textSegment.getRectangle().getLLY() - 10,
textSegment.getRectangle().getLLX() + 60 + 100,
textSegment.getRectangle().getURY() + 5);

SignatureField sf = new SignatureField(textFragment.getPage(), rec);
// Set the field name
sf.setPartialName(“signature”);
pdf.Border border = new Border(sf);
border.setWidth(1);
border.setDash(new com.aspose.pdf.Dash(1, 1));
sf.setBorder(border);
pdfDocument.getForm().add(sf, textFragment.getPage().getNumber());
}
}

pdfa_with_signature_fields.pdf - siganture fields added by aspose PDF for java (9.3.1)

signer_pdf.pdf - signed by third party application (100% sure that this application works with PDF correctly)


I think that the problem is in PDF/A conversion step. The PDF/A is not correct if I analyze it against the Adobe Pro

Thank you

Jan

Hi Jan,


Thanks for sharing the source document and code. We are looking into it and will update our findings soon.

Best Regards,

Hi Jan,


I have tested the scenario using Aspose.Pdf for Java 9.5.0 using following code snippet and as per my observations, the resultant PDF is PDF/A_3B compliant. For your reference, I have also attached the resultant PDF/A generated over my end.

[Java]

com.aspose.pdf.Document doc = new com.aspose.pdf.Document(“c:/pdftest/source_pdf_converted_PDF_A.pdf”);<o:p></o:p>

System.out.println(doc.validate("c:/pdftest/validate.xml", com.aspose.pdf.PdfFormat.PDF_A_3B));

// Convert to PDF/A3 compliant document

doc.convert("c:/pdftest/_log.xml", com.aspose.pdf.PdfFormat.PDF_A_3B, com.aspose.pdf.ConvertErrorAction.Delete);

doc.save(“c:/pdftest/source_pdf_converted_PDF_A.pdf”);