Hi
I've noticed that if you add attachments into an existing PDF file using Aspose.PDF.Facades (7.4.0.0), not all of the attachments will open in the resulting PDF if they are not added with their descriptions in alphabetic order.
{
Aspose.Pdf.Facades.PdfContentEditor _pdfEditor = new Aspose.Pdf.Facades.PdfContentEditor();
_pdfEditor.BindPdf(@"C:\Aspose\BrokenPDFAttachment\Pdf1.pdf");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 1.JPG", @"A");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 2.JPG", @"B");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 3.JPG", @"C");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 4.JPG", @"D");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 5.JPG", @"E");
_pdfEditor.Save(@"C:\Aspose\BrokenPDFAttachment\outputOK.pdf");
}
{
Aspose.Pdf.Facades.PdfContentEditor _pdfEditor = new Aspose.Pdf.Facades.PdfContentEditor();
_pdfEditor.BindPdf(@"C:\Aspose\BrokenPDFAttachment\Pdf1.pdf");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 1.JPG", @"B");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 2.JPG", @"A");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 3.JPG", @"D");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 4.JPG", @"C");
_pdfEditor.AddDocumentAttachment(@"C:\Aspose\BrokenPDFAttachment\image 5.JPG", @"E");
_pdfEditor.Save(@"C:\Aspose\BrokenPDFAttachment\outputNotOK.pdf");
}
The file outputok.pdf has working attachments, whilst the file outputnotok.pdf has 2 that open and 2 that do not.