I creating a new pdf file by merging a couple of pfd files.. some of these files already have bookmarks.. when I merge them I am losing the bookmarks on the new file.. how can I merge and keep the bookmarks on the new created file?
Thank You.
I creating a new pdf file by merging a couple of pfd files.. some of these files already have bookmarks.. when I merge them I am losing the bookmarks on the new file.. how can I merge and keep the bookmarks on the new created file?
Thank You.
Hi,
Hi,
Hi,
string[] filesToMerge = documentList.ToArray<string>();
Aspose.Pdf.Facades.PdfFileEditor pdfEditor = new Aspose.Pdf.Facades.PdfFileEditor();
pdfEditor.Concatenate(filesToMerge, inPathFile);
// add bookmarks
Aspose.Pdf.Facades.PdfBookmarkEditor bmEditor = new Aspose.Pdf.Facades.PdfBookmarkEditor();
bmEditor.BindPdf(inPathFile);
Aspose.Pdf.Facades.PdfContentEditor contentEditor = new Aspose.Pdf.Facades.PdfContentEditor();
contentEditor.BindPdf(tempfile);
contentEditor.ChangeViewerPreference(Aspose.Pdf.Facades.ViewerPreference.PageModeUseOutlines);
contentEditor.Save(inPathFile);
contentEditor.Close();
Adding new bookmarks works just fine but the existing bookmarks from the merged files dissapera
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for the sample code.
To re-generate your issue at our end, we need your source PDF files which you are using for concatenation. This will help us identify your issue soon.
Sorry for the inconvenience,