Loosing data when converting PDF to PDF-A

Hi, in some cases, pdf content is being lost when we convert pdf-documents to PDF-A.

I am attaching a file that looses fields after conversion.

Please let me know if there is a solution for this.Förfrågan (1).pdf (232.4 KB)

Regards,
Stefan

@tefan57
Please attach the source file and the code you are using.

pdfDocument = new Document(sourceName);
		pdfDocument.removeMetadata();
		pdfDocument.flatten();			
		pdfDocument.convert(logFileName, PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
		pdfDocument.save(targetName);
        pdfDocument.close();

@tefan57
I checked with library version 23.5 and didn’t notice any discrepancies. (used the attached code for the Förfrågan (1).pdf file).
Compare.png (93.9 KB)
Please indicate in the figure the fragment that does not match.
What version of the library and what development environment are you using?

Hi,

Yes, using version 23.4 solved the issue, thank you!

However, adding page stamps to the same pdf using 24.3 does not work:

PdfFileStamp fileStamp = new PdfFileStamp();

        // Open Document
        fileStamp.bindPdf(sourceName);

        // Create stamp
        Stamp stamp = new Stamp();
        stamp.setStampId(1); //draft watermark has id = 1, used by JBS_RemoveDraftWatermark
        stamp.bindLogo(new FormattedText(text, java.awt.Color.BLACK, null, FontStyle.Helvetica,
                EncodingType.Winansi, true, 8));
        stamp.setOrigin(600, 48);
        stamp.setRotation(90.0F);
        stamp.setBackground(false);

        // Add stamp to PDF file
        fileStamp.addStamp(stamp);

        // Save updated PDF file
        fileStamp.save(targetName);

        // Close fileStamp
        fileStamp.close();

Regards,
Stefan