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