Extract xml from PDF in kids-array

Hi,

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
Document(sFile);

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);

fstream.Close();


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,

Oliver



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.

Hi,

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

Kind regards,
Oliver