PDF Portfolio Files

Hi,


We are using EmbeddedFiles property to get the file collection from a PDF Portfolio document and we are saving the individual PDF’s to a location in the order returned by this propertly (using for each AND for int i = 1;…) but the files are not being returned in correct order.
If we open the portfolio PDF in Adobe, it shows the file collection in one order. But when we extract these files using the EmbeddedFiles property and enumeration, we are not getting in the same order.

Please help!

Thanks,
Suresh

Hi Suresh,

Sorry for the inconvenience faced.
While using the latest version of Aspose.Pdf for NET 8.2.0, I’ve managed to reproduce
this issue on my side and logged the issue in our bug tracking system as PDFNEWNET-35573
for further investigation and resolution. I’ve also linked your request to
this issue and you will be notified via this thread as soon as it is resolved.<o:p></o:p>

Please feel free to contact us for
any further assistance. <o:p></o:p>

Best Regards, <o:p></o:p>

Hi, Is there any update to this issue? Please let me know.


Thanks,
Suresh

Hi Suresh,


Thanks for your inquiry. I’m afraid your reported issue is still not resolved and its pending for investigation in queue with other priority tasks. However, I’ve requested the development team to share an ETA at their earliest. We will update you as soon as we get a feedback.

Sorry for the inconvenience faced.

Best Regards,

Hi Suresh,


Thanks for your patience.

In order to correctly add the files to PDF portfolio, please try using the following code snippet.

[C#]

string inPdf1 = “c:/pdftest/3—Offer_shows-zigzags.pdf”;<o:p></o:p>

string inPdf2 = "c:/pdftest/GivesBlankImage.pdf";

string inPdf3 = "c:/pdftest/GivesBlankImageOutput_page1.png";

Document pdf = new Document();

pdf.Collection = new Collection();

pdf.Collection.Add(new FileSpecification(inPdf1, "Attachment File 1"));

pdf.Collection.Add(new FileSpecification(inPdf2, "Attachment File 2"));

pdf.Collection.Add(new FileSpecification(inPdf3, "Attachment File 3"));

pdf.Collection.Add(new FileSpecification(inPdf3, "bla1"));

pdf.Collection.Add(new FileSpecification(inPdf3, "bla2"));

pdf.Collection.Add(new FileSpecification(inPdf3, "bla3"));

foreach (FileSpecification fs in pdf.Collection)

// { Debug.Writeln(fs.Description); }

pdf.Save("c:/pdftest/CorrectPortFolio.pdf");


Please note that with above code snippet, you will see attachments in right order, but if you try to see this attachments via adobe acrobat order will be changed because Acrobat uses default sort by name.

Hi Nayyer,


Thanks for the response. But the issue is, we haven’t created these portfolio PDF files. They were created by some other software (or Actobat) and we are only reading them. While reading, it is expected that the files should be read in the order they were added to the portfolio file. The files include PDF and other formats. But we are not getting the files in the order they were added.
Is there any way we can get the right order or index? OR can we sort the filespecification collection in some specific order (like added date and time)?

Thanks,
Suresh

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


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