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

Free Support Forum - aspose.com

PDFA_3_A to PDFA_3_U does not work

I try to convert a PDF document that is PDFA_3_A to PDFA_3_U with aspose.pdf for java:

doc = new Document(path)
format = PdfFormatConversionOptions(7)
doc.format(format)

It returns false. What is going wrong?

@josnext

I request you to try the following code from Convert PDF File to PDF/A article. Please share your source file if you notice any issue.

        // Open document
        Document pdfDocument = new Document(_dataDir + "PDFToPDFA.pdf");

        // Convert to PDF/A compliant document
        // During conversion process, the validation is also performed
        pdfDocument.convert("file.log", PdfFormat.PDF_A_3U, ConvertErrorAction.Delete);

        // Save output document
        pdfDocument.save(_dataDir + "PDFToPDFA_out.pdf");

@mudassir.fayyaz

Thanks!
Yes that one works better. But is important to save the file first before converting further. Because version and pdfFormat is not the same to get a pdf with version 1.7 and format A_3U it must sometimes be converted 2 times. When the file is not properly saved after the first conversion it might fail the second conversion.
For privacy reasons it is difficult to find pdf-documents that I can share. Sorry.

@josnext

We need a sample file and the code reproducing the issue. The above code can convert any PDF format file to PDF_A_3U without needing to convert it 2 times.

@mudassir.fayyaz

Sometimes we need a second conversion because the PDF documents must be validated against 2 conditions: version 1.7 and format A_3U.
In the standard routine we handle pdf docs generated by (Aspose) Word, but in many cases our clients have other pdf files that can be any version and any format. So they have to be checked and if necessary reformatted to the right version and format.
So we ran into a document with version 1.4 and format A_3U. If converted to version 1.7 and saved, the document was not PDF-A compliant anymore. doc.getPdfFormat() -> 12.
Unfortunately I cannot create a Pdf-file that can reproduce this and I’am not allowed to give the original client document because of privacy reasons.

@josnext

We need the source PDF file and the code to reproduce and investigate the issue. I can mark this topic as private or you can share it privately with us using Private Message option.

@mudassir.fayyaz

I’m sorry to say that my superiors won’t give permission to share these documents. They concern a will and are stricktly private and are not our property.
I tries to reproduce a similar pdf but i didn’t succeed so far.
When I’m able to reproduce this issue I will let you know.

@josnext

Please let us know once the data is ready. We will proceed further with investigation on our end.