Hi,
I am using ghe latest 7.2.0.0 version of Aspose.PDF and seem to be getting a problem whereby attachments included in a PDF cannot be viewed when Security is applied to the created PDF.
I see that this was raised a while back and a hot fix issued, but the problem seems to have re-appeared.
Using the code below (from one of the examples) including the RED line makes the attachment unreadable.
Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Generator.Section sec1 = pdf1.Sections.Add();
sec1.Paragraphs.Add(new Aspose.Pdf.Generator.Text("hello world"));
FileStream fstream;
fstream = new FileStream(@"c:\testimages\Harris_side fence view pt.JPG", FileMode.Open);
Aspose.Pdf.Generator.DocumentAttachment DocStreamAttachment = new Aspose.Pdf.Generator.DocumentAttachment();
pdf1.DocumentAttachments.Add(DocStreamAttachment);
DocStreamAttachment.DocumentAttachmentStream = fstream;
DocStreamAttachment.DocumentAttachmentContentType = "jpeg";
pdf1.Security = new Aspose.Pdf.Generator.Security();
pdf1.Save(@"c:\testimages\test.pdf");
fstream.Dispose();