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

Free Support Forum - aspose.com

PDF: attached files shows as "0,00 bytes" and modified field shows "Unknows"

Good day,

I attached files using the following code:

    public static void AddAttachment(string source, string dest, string[] attachments)
    {
            Document pdfDocument = new Document(source);

            foreach (string attachment in attachments)
            {
                FileSpecification fileSpecification = new FileSpecification(attachment, Path.GetFileName(attachment));          
                
                pdfDocument.EmbeddedFiles.Add(fileSpecification);
            }

            pdfDocument.Save(dest);
    }
}

Adding the attachments works, but when reviewing the attachments within the pdf, the size field is shown as “0,00 Bytes” and the Modified field is shown as “Unknown”.

Do you have a workaround so I can get theses fields to appear as they should?

I am already aware that you have ticket PDFNET-44604 logged, but it starts to be really dated and it seems that no resolution as been found or at the least, published.

Kind regards.

@fgirard

Yes, the ticket PDFNET-44604 is quite old and was logged for the same issue that you described. Unfortunately, it could not get resolved. However, we have increased its priority to next level after recording your concerns and will surely let you know as soon as some workaround is available or this issue is fixed. We apologize for your inconvenience.

1 Like