I have a question about PDF bookmarks in Aspose.PDF. I put together some code that uses Aspose.Cells and Aspose.PDF to generate a PDF file with bookmarks. See my question in the Aspose.Cells forum here, http://www.aspose.com/community/forums/addpost.aspx?PostID=572750
I have a question about PDF Bookmarks in Aspose.Cells. I have a simple Aspose.Cells workbook with one worksheet. I am exporting this workbook to a PDF file. The workbook has 100 rows of data in it and I inserted a page break every 25 rows. Immediately following each page break, I put in a PDFBookmarkEntry. My problem involves the behavior of the bookmarks when I open the file in a PDF reader.
Thanks for your posting and using Aspose.Cells.
It is a correct behavior. Bookmarks generated by Aspose.Cells can only navigate to cells, they cannot navigate to any location inside the PDF page. So you cannot move to the very top of the page if there are headers on every page.
As a workaround, you can use Aspose.Pdf to add bookmarks to pages of your PDF.
( http://www.aspose.com/docs/display/pdfnet/Add+a+Bookmark+in+the+PDF+Document )
Is there a way to adjust the bookmarks using Aspose.PDF code, or something else that is not Aspose.Cells?
Yes, I think, you can use Aspose.Pdf for this purpose. See my above post: 572748.
However, I cannot help you with Aspose.Pdf technically. You will have to post in Aspose.Pdf forum to get technical help in this regard.
That mostly works. I put together some code that converts my Aspose.Cells-derived bookmarks to Aspose.Pdf-derived bookmarks. I pasted it below.
Thanks for your posting and using Aspose APIs.
I have asked this question from Aspose.Pdf support team and they provided me the following code to make bookmarks expanded. You can try it at your end and see how the results turn out.
You can do it using ViewPreference
Document pdfDoc = new Document(myDir + “safety_group.pdf”);
Page pdfPage = pdfDoc.Pages.Add();
//pass your pdfDoc to PdfContentEdiot object to set preview preference
PdfContentEditor contentEditor = new PdfContentEditor(pdfDoc);
//change Viewer Preferences
contentEditor.Save(myDir + “safety_group_out1.pdf”);
Are you saying that this line will cause the bookmarks to be expanded?
Hi, I got a response to my other thread, but not an answer. The moderator told me to make this call to expand the bookmarks initially:
the sake of correction, I have logged this requirement in our issue tracking system as PDFNEWNET-37492. We will
investigate this issue in details and will keep you updated on the status of a
We apologize for your inconvenience.