EmbeddedFiles cannot open all attachments

Hello Aspose,

I’m using the following code to add three .txt file attachments to an existing PDF, I can only open the second attachment. Output PDF file is attached.

Regards, Paul

License license = new License();
license.SetLicense("Aspose.Pdf.lic");

license.Embedded = true;

const string filename = @"C:\Temp\EmbeddedAttachments\test.pdf";

using (Document document = new Document(new FileStream(filename,
FileMode.Open, FileAccess.ReadWrite)))
{
    document.EmbeddedFiles.Add(new FileSpecification(@"C:\Temp\EmbeddedAttachments\Test1.txt", "Test1.txt"));
    document.EmbeddedFiles.Add(new FileSpecification(@"C:\Temp\EmbeddedAttachments\Test2.txt", "Test2.txt"));
    document.EmbeddedFiles.Add(new FileSpecification(@"C:\Temp\EmbeddedAttachments\Test3.txt", "Test3.txt"));

    document.Save(Path.ChangeExtension(filename, ".output.pdf"));
}

Hello Paul,


Thanks for using our products

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-33629. We will investigate this
issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

The issues you have reported earlier (filed as PDFNEWNET-33629) have been fixed in Aspose.Pdf for .NET 8.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.