Hello,
I have this simple function that converts a PDF to PDF/A:
using (var document = new Document(source))
{
document.Convert(“ConvertResult.xml”, pdfFormat, ConvertErrorAction.Delete);
document.Save();
}
I would expect the Aspose PDF component to convert the document to valid PDF/A, but it does not. Adobe Preflight gives several errors regarding metadata. Please review the included report and source document.
With kind regards,
Kees de Wit
Hi Kees,
Hello,
Attached you will find the source document.
With kind regards,
Kees de Wit
Hi Kees,
Hi Kees,
I have also performed the PDF to PDF/A_1b conversion using Aspose.Pdf for .NET 10.6.0 where I have used following code snippet and when verifying the PDF/A compliance with pre-flight of Adobe Acrobat XI version 11.0.0, I am unable to notice any issue. For your reference, I have also attached the imaging showing PDF/A compliance result and resultant PDF generated over my end.
[C#]
using (var document = new Document(@"c:/pdftest/40Pagina.pdf"))
{
document.Convert("ConvertResult.xml", Aspose.Pdf.PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
document.Save("c:/pdftest/PDF-A_1b.pdf");
}
Hi Nayyer,
There is a diference between your code and my code. Can you please verify if this code also gives a compliant document?
using (var source = File.OpenRead(“40pagina.pdf”))
{
using (var target = File.Create(“40pagina_pdfa-1b.pdf”))
{
source.CopyTo(target);
using (var document = new Document(target))
{
document.Convert(“ConvertResult.xml”, PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
document.Save();
}
}
}
I have extracted this code from my larger code base and tested it in a seperate project. Your code gives a compliant document accorinding to Adobe preflight, but my code above does not.
Hi Kees,
Thanks for sharing the details.
I have tested the scenario and I am able to reproduce the same problem while using the above-shared code snippet. As per my observations, when trying to save the resultant PDF/A compliance file into the same input PDF file, the PDF/A compliance issues appear. For the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-39151. We will investigate this issue in detail and will keep you updated on the status of a correction,
We apologize for your inconvenience.
The issues you have found earlier (filed as PDFNEWNET-39151) have been fixed in Aspose.Pdf for .NET 16.11.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Kees,
Thanks for your patience.
We have further investigated the earlier reported issue and in order to generate correct output, please try using the following code snippet.
using (var document = new Document(@"c:/pdftest/40Pagina.pdf"))
{
document.Convert("ConvertResult.xml", Aspose.Pdf.PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);
document.Save("c:/pdftest/PDF-A_1b.pdf");
}