Save as PDF and Bookmarks

Hi

When I save a workbook as a PDF document, is there an option that creates a bookmark for each worksheet I have? If not, any other way to do it?

Hi,

Could you elaborate and explain what do you mean by bookmark and how do you create in MS Excel. Is the bookmark feature related to Adobe Acrobate for .pdf file? If so, please contact to Aspose.Pdf team. If not, Could you post your template excel file (in which you have created the bookmarks), output .pdf file with sample code here.

Thank you.

Hi

Bookmarks are a feature of PDF files that lets the user quickly jump from one section to another (much like a table of content).

I would like that each worksheet could become a bookmark (using the worksheet name).

I know that Aspose.PDF supports it because this simple test generates bookmarks:

Dim pdf1 As Pdf = New Pdf()

Dim sec1 As Section = pdf1.Sections.Add()

Dim heading1 As Heading = New Heading(pdf1, sec1, 1)

Dim segment1 As Segment = New Segment(heading1)

heading1.Segments.Add(segment1)

heading1.IsAutoSequence = True

segment1.Content = "this is heading of level 1"

sec1.Paragraphs.Add(heading1) 'please make sure all properties are set before Add

Dim heading2 As Heading = New Heading(pdf1, sec1, 2)

Dim segment2 As Segment = New Segment(heading2)

heading2.Segments.Add(segment2)

heading2.IsAutoSequence = True

segment2.Content = "this is heading of level 2"

sec1.Paragraphs.Add(heading2) 'please make sure all properties are set before Add

Dim heading3 As Heading = New Heading(pdf1, sec1, 1)

Dim segment3 As Segment = New Segment(heading3)

heading3.Segments.Add(segment3)

heading3.IsAutoSequence = False

heading3.LabelWidth = 60

heading3.UserLabel = "bullet1"

segment3.Content = "this is bullet style 1"

sec1.Paragraphs.Add(heading3) 'please make sure all properties are set before Add

pdf1.IsBookmarked = True

pdf1.BookMarkLevel = 1

pdf1.Save("c:\temp\test.pdf")

Hi,

I don't find any way to create bookmarking in excel file. So, I think you should use Aspose.Pdf APIs to create the bookmarks on your specified location in the output generated pdf file. You'd better use bookmarking apis after you have done the conversion (excel2pdf) for your need. For getting the worksheets name, you may utilize Aspose.Cells api e.g., Worksheets[index].Name property to get the worksheet names in the source template excel file. Since I am not very familiar with Aspose.Pdf APIs so for futher reference, you may take help from Aspose.Pdf team if required.

Thank you.

Do you have any sample code that does something like that?

Hi,

This question is answered at:

http://www.aspose.com/Community/Forums/113484/Aspose.Cells-save-as-PDF-creating-bookmarks/ShowThread.aspx#113484

Thanks.