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

Free Support Forum - aspose.com

Extract xml from PDF in kids-array


we extract xml-attachments from pdf-files. These attachments are coded as a /Kids-Array (and not as a Names-Array) in the pdf-fle.
With this code:

Document pdfDoc = new

EmbeddedFileCollection efc = pdfDoc.EmbeddedFiles;

FileSpecification fs = efc[1];

byte[] fileContent = new byte[fs.Contents.Length];

fs.Contents.Read(fileContent, 0, fileContent.Length);

FileStream fstream = new FileStream(fs.Name, FileMode.Create);

fstream.Write(fileContent, 0, fileContent.Length);


this works fine!

Many other pdf-tools cannot handle the attachment in the /kids-array.

Is this a feature of Aspose.pdf, that we can rely on in the future, or does it work just by chance, and might be deactivated somtime in the future?

(It did not work in 8.4.0, but works since 9.2.1)

Kind regards,


Hi Oliver,

Thanks for contacting support.

As per my understanding, the attachment is properly being extracted as per your requirements when using one of the recent release versions of Aspose.Pdf for .NET. If the feature is working fine, then it should be working in versions coming forward. Please continue using our API and in case you encounter any issue, please feel free to contact.


this sounds good to me, thank you for the feedback.

Kind regards,