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 = newDocument(sFile);
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 = newDocument(sFile);
EmbeddedFileCollection efc = pdfDoc.EmbeddedFiles;
FileSpecification fs = efc[1];
byte[] fileContent = newbyte[fs.Contents.Length];
fs.Contents.Read(fileContent, 0, fileContent.Length);
FileStream fstream = newFileStream(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