File attachments are removed during saving to PDF/A 2-b

Hi Aspose,

I have an issue with processing document’s file attachments. I have PDF/A 2-b document with PDF/A 1-b and 2-b attachments. Some of them attached to a place on a page, some of them attached to a document itself.
After converting document to PDF/A 2-b format using Aspose.PDF, files, attached to a document itself, are removed from document.

Code snippet to replicate issue:

new Aspose.Pdf.License().SetLicense(<license file>);            
var document = new Aspose.Pdf.Document("PDF-A 2-b with document attachments.pdf");
document.Convert(new MemoryStream(), PdfFormat.PDF_A_2B, ConvertErrorAction.Delete);
document.Save("PDF-A 2-b with document attachments converted.pdf");

Issue replicated on Aspose.PDF Sample PDF document: PDF-A 2-b with document attachments.pdf (39.0 KB)

Best regards,
Alex Shloma


Thanks for contacting support.

We have converted your document into PDF/A-2b format using Aspose.PDF for .NET 19.3 and achieved attached output.
out_pdfab.pdf (38.2 KB)

In attached output, we were able to open PDF attachments which were attached to images placed on page. Also, other attachments which were attached to document itself, were accessible. Could you please check the output in your environment and share your feedback if we have misunderstood the issue. We will further proceed accordingly.


The “out_pdfab.pdf” is not PDF/A file. Neither Adobe nor Foxit shows notification that file is PDF/A compliant.

Can you please provide code snippet that you used to convert sample file to PDF/A-2b format.

I used following code

document.Convert(new MemoryStream(), PdfFormat.PDF_A_2B, ConvertErrorAction.Delete);



Earlier we used ConvertErrorAction.None while converting the document. However, we have been able to reproduce missing attachments issue while using ConvertErrorAction.Delete option during conversion. We have logged it as PDFNET-46172 in our issue tracking system for the sake of correction. As soon as we have some definite updates regarding issue resolution, we will let you know. Please spare us little time.

We are sorry for the inconvenience.