Error error on extracting of XML attachments
General-Purpose PDF Library for Java and .NET
Status: Beta
Brought to you by:
stechio
Hi, I'm new in this forum. I use the PDFClown in my project in order to extract every attachments, possibly include in a PDF and got an error on some special ZUGFeRD PDFs (PDFs with a XML meta datas inside).
I think I found the error, anyway I can extract the attachment now (after fixing), there is the point (FullFileSpecification.cs):
/*
Gets the embedded file associated to the given key.
/
private EmbeddedFile GetEmbeddedFile(PdfName key)
{
PdfDictionary embeddedFilesObject = null;
try
{
// Leo, 27.08.2021
embeddedFilesObject = (PdfDictionary)BaseDictionary[PdfName.EF].Resolve();
//embeddedFilesObject = (PdfDictionary)BaseDictionary[PdfName.EF];
}
catch(Exception ex)
{
}
if(embeddedFilesObject == null)
return null;
return EmbeddedFile.Wrap(embeddedFilesObject[key]);
}