Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Feb 23, 2024 7:04 pm

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()

mbertol4
 
Posts: 6
Joined: Fri Feb 09, 2024 5:23 pm

Mon Feb 26, 2024 3:07 am

Hello,

Thank you for your inquiry.
I have tested the document you provided and was able to replicate the issue you mentioned. Upon investigation, I discovered that you had inquired about the same issue via email and with our colleagues last week. Regarding the matter SPIREDOC-10321, it has not been fully resolved yet, and our development team is currently investigating and working on a resolution. We will keep you informed of any significant updates as they occur.
If you have any further questions or require additional assistance, please feel free to reach out.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.Doc

cron