Hi Support Team.
We are planning to buy the GroupDocs.Conversion Developer OEM License shortly and want to generate bookmarks in the PDF based on the headings in the Word-File. Can you please show us, how we can do this as it is mentioned as a feature?
Thanks for your appreciated help.
Sascha
We are investigating this scenario. Your investigation ticket ID is CONVERSIONNET-5537.
@Sascha_Feuz
There is a property BookmarkOptions
in WordProcessingLoadOptions
class. Take a look at the code below:
// Load options for the Word processing document.
var loadOptions = new WordProcessingLoadOptions();
// Set the maximum number of heading outline levels to be loaded.
// This will load up to 3 levels of headings in the document.
loadOptions.BookmarkOptions.HeadingsOutlineLevels = 3;
// Set the maximum number of expanded outline levels to be loaded.
// This will load up to 3 levels of expanded outlines in the document.
loadOptions.BookmarkOptions.ExpandedOutlineLevels = 3;
// Load the Word document.
FluentConverter.Load("Sample_Document_with_Headings.docx")
// Apply the load options to the document.
.WithOptions(loadOptions)
// Convert the document to PDF format.
.ConvertTo("Sample_Document_with_Headings.docx.pdf")
// Apply default options for PDF conversion.
.WithOptions(new PdfConvertOptions())
// Perform the conversion.
.Convert();
Attached are source and target files.zip (1.1 MB).