DOCX to PDF Conversion: Option to create bookmarks

Hello Team,

We are using the GroupDocs.Conversion 22.6.0 NuGet Package for .NET.
I’m currently testing the GroupDocs.Conversion functionality and I want to convert a DOCX file to a PDF with automatically created bookmarks for every heading. There is such an option when you convert a DOCX to a PDF in Word: image.png (1.9 KB).

I couldn’t find an option to do this with GroupDocs.Conversion.
In the feature list of GroupDocs.Conversion there is a point about bookmarks, so I think there is probably an option to do so.
image.png (4.8 KB)

Now my question: Is there such an option? And if yes, how can I do it?

Thanks for your response :slight_smile:

1 Like

@chillmau

We are investigating this scenario. Your investigation ticket ID is CONVERSIONNET-5346.

1 Like

Hello Team,

Are there any news of the bookmark feature?
I need at least one feedback from the team, so that I can consider buying the license.

Thanks for your response :slightly_smiling_face:

This feature is not supported by the API.

Thanks for the answer.

Can you tell me what the feature “Specify Bookmark Level” means? I think this could be the feature that im searching.

I’ve found the feature here: C# .NET Document Conversion API | Convert PDF Word Excel PPTX HTML Images
image.png (74.8 KB)

Thanks for your response :slight_smile:

@chillmau

We are looking into this scenario. we’ll notify you in case of any update.

A post was split to a new topic: Generate bookmarks in the PDF based on the headings in the Word

Do you have any updates on this case?
We bought the license already and would like to know what this feature really can do. I didn’t find any documentation for this feature and I would really like to know what this feature can do exactly.

Thanks for your answer.

@chillmau

This ticket is still under investigation.

In the meantime I was able to make this work. My DOCX Headings now are being converted to PDF bookmarks with the following code:

        // Initialize a new instance of LoadOptions
        var loadOptions = new WordProcessingLoadOptions();

        // Initialize a new instance of WordProcessingBookmarksOptions
        var bookmarksOptions = new WordProcessingBookmarksOptions
        {
            // Set the BookmarksOutlineLevel
            HeadingsOutlineLevels = 9 // Set the level as per your requirement
        };

        // Set the WordProcessingBookmarksOptions to the LoadOptions
        loadOptions.BookmarkOptions = bookmarksOptions;

        // Convert to PDF
        using (var converter = new Converter(sourcePath, () => loadOptions))
        {
            var convertOptions = new PdfConvertOptions();
            convertOptions.PdfOptions.FormattingOptions.PageMode = PdfPageMode.UseNone;
            converter.Convert(outFileName, convertOptions);
        }
1 Like

@chillmau

Good to know that.