We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bookmarks disappeared after merge of pdf files

I have a solution where i take a random number of pdf files and merge into one file. the source pdf files contains bookmarks but there are no bookmarks in the final pdf file. From the documentation I gather that it should be possible to keep bookmarks? <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Yesterday I upgraded the aspose.pdf component to 8.8.0.0 to ensure that I am using the most resent version but that did not change anything.

Am I mistaken when I think it should be possible to keep bookmarks? Is there a limit to the size of the pdf files or…?

Any help would be appreciated.

Below is the code snippet I am using to merge the files so you can see if it is the methodology I am using that is wrong.

Path(s) to pdf files are stored in an array named pdfFiles (as mentioned the number changes all the time)

‘and the files are merged like this:

Dim doc As New Document()

Dim doc1 As Document

For i As Integer = 0 To pdfFiles.Count - 1

doc1 = New Document(pdfFiles(i))

doc.Pages.Add(doc1.Pages)

Next

‘and the final file is saved:

doc.Save([path where files goes])

Hi Hans,


Thanks for your inquiry. I have tested the scenario with your source code using Aspose.Pdf for .NET 8.9.1 and found that merged file keeps bookmark of first file and loses bookmarks of all other files. So logged issue as PDFNEWNET-36444 in our issue tracking system for further investigation and resolution. We will notify you via this forum thread as soon as issue is resolved.

Moreover, as a workaround you can use Facades package for concatenation. It retains the bookmarks of source files.

Please feel free to contact us for any further assistance.

Best Regards,

Hi Tilal Ahmad

thanks for replying so fast.

When making the solution I did look at the facades way of concatenating files but descided not to use it because it looked like that would imply finding number of pages in each pdf file and I worried that I could run into performance issues. Sometimes the file merge has to process rather large files. Do you know if this something that i do not have to worry about?

br

Hans Jørgen

Hi Hans,


Thanks for your feedback. My apologies for sharing wrong documentation link please check following updated documentation link, it does not need to count page numbers. Hopefully it will help you to accomplish the task. However we will keep you updated about the original issue resolution progress.


Please feel free to contact us for any further assistance.

Best Regards,

Hi Tilal Ahmad

Thanks for the link. that approach does make it a lot more simple to change my solution to utilise facades for mergeing files.

Do you have any idea of when it can be expected that the aspose.pdf will support keeping the bookmarks when concenating doing it the way I am using in my original code? I have to descide whether to change my solution or wait for the updated version of aspose.pdf

br

Hans Jørgen

bispen:
Do you have any idea of when it can be expected that the aspose.pdf will support keeping the bookmarks when concenating doing it the way I am using in my original code? I have to descide whether to change my solution or wait for the updated version of aspose.pdf
Hi Hans,

Thanks for sharing the feedback.

As we recently have been able to notice this issue, so development team requires little time to investigate and figure out the reasons of this problem. However, as soon as we have made some definite progress towards its resolution, we would be more than happy to update you with the status of correction.

6 years later. Any update? I notice bookmarks are still not kept in the additional PDFs…

@jsierks

Regretfully, the issue is not yet resolved. The issue was logged under free support and it has low priority. However, we will surely let you know as soon as it is resolved. Please spare us some time.

We are sorry for the inconvenience.