Converting PDF to PDF/A-1b

Hi,

I am trying to convert a PDF to PDF/A-1b format but it looks like it is not working. I am using Acrobat XI pro to verify the PDF format ( Screenshot attached ).

Here is the Code:

        string completePath = "sample.pdf" ;
        string newPath = "result.pdf";
        Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(completePath);

        Aspose.Pdf.PdfFormatConversionOptions pdfConvert = new Aspose.Pdf.PdfFormatConversionOptions(Aspose.Pdf.PdfFormat.PDF_A_1B);

        pdfDocument.Convert(pdfConvert);

        // Save output document
        pdfDocument.Save(newPath);

Please let me know
Thanks
Imranpdf_convert_outcome.jpg (139.3 KB)

@imran.khan1

I have tested the scenario on my end and I was unable to notice the issue. I have tested it with one of my sample PDFs while using below code snippet with Aspose.Pdf for .NET 17.11 on my end. PDF compliance.jpg is a screenshot for your kind reference.

Document doc = new Document(dataDir + "input-PDF_A_1B.pdf");
doc.Convert(new MemoryStream(), PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
doc.Save(dataDir + "output-PDF_A_1B.pdf");

Please share your source and output PDF file if the issue persists. So that we may proceed further to help you out.

Can you please try with the code I sent ?

or is anything wrong with that ?

Also, will your code work for all the PDF formats mentioned on the following page or something else needs to be done ?

@imran.khan1,

We recommend our clients to share all details of the use case, including source PDF, code and details of the problematic behavior. We have tried your code with the latest version 17.11 of Aspose.Pdf for .NET API and could not replicate this error in our environment. Kindly send us your source PDF, we will test this scenario with your PDF document and then share our findings with you.

@imran.khan1,

Yes, it will work with all listed PDF formats. If you come across any problem, then please post all details of the use case here in this forum. We will assist you appropriately.

Thanks for your help. Really appreciate your timely response .