Hi,
I'm looking at converting the attached document to pdf.
I leveraged the code below with the option CreateWordBookmarksUsingHeadings but unfortunately the Headings are not converted to pdf bookmarks. Is there a way to have the attached document converted to pdf keeping headings as bookmarks in pdf ?
def convert_doc_to_pdf(input_file, output_file):
# Create a Document object and load a Word file
document = Document(input_file)
# Create a ToPdfParameterList object and set options
options = ToPdfParameterList()
options.EmbedFonts = True
options.CreateWordBookmarksUsingHeadings=True
options.AutoFitTableLayout = True
# Save the document to PDF and close it
document.SaveToFile(output_file, options)
document.Close()