We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Bookmarks are not saved

Thread ID:

Created:

Updated:

Platform:

Replies:

55645 Feb 1,2007 09:27 PM Feb 5,2007 08:58 AM Windows Forms 3
loading
Tags: PDF
Rblouin
Asked On February 1, 2007 09:27 PM

Hi,
The following code should add a new bookmark to an existing document. However, when I open the saved document in Acrobat 7, no bookmarks appear.

PDFDocument doc = new DFDocument(@"C:\oldfile.pdf");
mark;
IPDFPage page = doc.Pages[1];
IPDFDestination target = doc.CreateDestination(page);
IPDFBookmark mark = doc.Bookmarks.Add("01 Feb 2007", target);

doc.Save(@"C:\newfile.pdf");
doc.Close();

Can you help?

Dhivya K [Syncfusion]
Replied On February 2, 2007 08:44 AM

Hi Rbluoin,

Thank you for your interest in Essential PDF.
Thanks for the code snippet. I was able to reproduce the issue. Currently it is not possible to insert the bookmarks into an existing document. However, as a workaround, we can copy the pages of the existing document and add them in a new PDFDocument object and then add bookmarks for this document.

Here is a sample for your reference:
Bookmarks.zip

Please take a look into it and let me know if it helps you.

Regards,
Dhivya.

Rblouin
Replied On February 2, 2007 11:39 AM

Thanks for your response. However, your code does not preserve bookmarks from the first document. In fact, when you open an existing PDF document, the PDFDocument.Bookmarks property is empty even though there are bookmarks in the document.

This is a bug. Please suggest a work-around.

Richard

Dhivya K [Syncfusion]
Replied On February 5, 2007 08:58 AM

Hi Richard,

Could you please refer the following thread regarding this issue?
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=55721

Thanks,
Dhivya.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;