Free Support Forum - aspose.com

Preserve bookmarks after merge of pdfs

I've 3 pdfs containing bookmarks.

I merge the 3 files but I loose the bookmarks of the second and thirth files.

Is it possible to preserve all the bookmarks at the right place?

Thanks in advance

Jean-Marie

My code:

Dim pdfDocument1 As New Document("doc1.pdf")

Dim pdfDocument2 As New Document("doc2.pdf")

Dim pdfDocument3 As New Document("doc3.pdf")

pdfDocument1.Pages.Add(pdfDocument2.Pages)

pdfDocument1.Pages.Add(pdfDocument3.Pages)

pdfDocument1.Save("output.pdf")

I use the 7.8.0.0 version of the aspose.pdf.dll

Hi Jean,


Thanks for your inquiry. I've managed to reproduce the issue at my end and logged it as PDFNEWNET-35109 in our bug tracking system for further investigation and resolution. You will be notified via this thread as soon as it is resolved.


Sorry for the inconvenience faced.

<span style=“font-size:10.0pt;line-height:115%;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:Calibri;mso-ansi-language:EN-US;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA”>

<span style=“font-size:10.0pt;line-height:115%;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:Calibri;mso-ansi-language:EN-US;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA”>
Best Regards,

Hi Jean,


Thanks for your patience.

In order to copy Bookmarks when concatenating PDF files, please try using the following code snippet.

[C#]

var pdfDocument1 = new Document(“c:/pdftest/Doc1
(1).pdf”
);<o:p></o:p>

var pdfDocument2 = new Document("c:/pdftest/doc2 (2).pdf");

var pdfDocument3 = new Document("c:/pdftest/doc3 (1).pdf");

pdfDocument1.Pages.Add(pdfDocument2.Pages);

pdfDocument1.Pages.Add(pdfDocument3.Pages);

foreach (OutlineItemCollection item in pdfDocument2.Outlines)

pdfDocument1.Outlines.Add(item);

foreach (OutlineItemCollection item in pdfDocument3.Outlines)

pdfDocument1.Outlines.Add(item);

pdfDocument1.Save(“c:/pdftest/Concatenate_output.pdf”);

The issues you have found earlier (filed as PDFNEWNET-35109) have been fixed in Aspose.Pdf for .NET 8.0.0.


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