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.

Mon Apr 14, 2025 12:08 pm

Hi,

I notice some problem during conversion of word docx to pdf.
I am currently using nuget package "Spire.Docfor.NETStandard" Version="13.1.4".

In a result pdf there is empty page between tables but in word file they are one after the other, also in word table headers are set to show on every page, but they are not.
Some time headers stay alone on one page separated from data rows on next page

Georgi17
 
Posts: 13
Joined: Wed Jul 31, 2024 7:47 am

Tue Apr 15, 2025 7:26 am

Hello,

Thanks for your inquiry.
To help us investigate your issue more accurately, please provide us with your word file and the converted pdf file. You can upload them to the attachment or send them to this email [email protected]. Thanks in advance.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 732
Joined: Mon Dec 27, 2021 2:23 am

Wed Apr 16, 2025 11:07 am

Hello,
I send you as attached files my word template file and my code of C#.

Tank you in advance!
Last edited by Georgi17 on Wed Apr 16, 2025 11:27 am, edited 2 times in total.

Georgi17
 
Posts: 13
Joined: Wed Jul 31, 2024 7:47 am

Wed Apr 16, 2025 11:13 am

With this code
Code: Select all
tbl.AutoFit(AutoFitBehaviorType.AutoFitToWindow);
after filling table i managed to remove empty pages between header an data and between tables, but headers still not presented on every new page.

Georgi17
 
Posts: 13
Joined: Wed Jul 31, 2024 7:47 am

Thu Apr 17, 2025 3:40 am

Hello,

Thanks for your reply.
Sorry, I can't run the code you provided directly. To simplify the problem, you can send me the word file filled with data. I will directly convert it to PDF to verify whether the problem you mentioned.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 732
Joined: Mon Dec 27, 2021 2:23 am

Thu Apr 17, 2025 7:35 am

Hello,

Sorry, the mistake is mine.
I send you again revised code and template.

Georgi17
 
Posts: 13
Joined: Wed Jul 31, 2024 7:47 am

Thu Apr 17, 2025 8:38 am

Hello,

It seems that when the height of the data rows in the table is dynamic, the header wrapping breaks. With the same height of the data rows, everything works.

Georgi17
 
Posts: 13
Joined: Wed Jul 31, 2024 7:47 am

Fri Apr 18, 2025 9:43 am

Hello,

Thanks for more information.
After investigation, we found that when directly loading your Word file and saving it as a new file, the "Allow row to break across pages" option for table rows is automatically unchecked, and this setting currently cannot be controlled via code. This is likely the cause of the abnormal table pagination. We verified that after manually checking this option for the rows filled with data in Microsoft Word, the paging effect returned to normal. The issue has been logged in our tracking system with the ticket SPIREDOC-11220, and our development team will address it as soon as possible. We will keep you updated on the progress. We sincerely apologize for any inconvenience caused.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 732
Joined: Mon Dec 27, 2021 2:23 am

Tue Jun 03, 2025 7:33 am

Hello,

Thank you for your patience.
We have released the latest Spire.Doc Pack (hot fix) Version: 13.5.11, which fixes the issue SPIREDOC-11220. To achieve the effect you want, you need to cancel the "Repeat Header Rows" setting in the third row of the table. I uploaded the complete test code to the attachment, please refer to it for testing after updating.
Website Link:https://www.e-iceblue.com/Download/download-word-for-net-now.html
Nuget: https://www.nuget.org/packages/Spire.Doc/

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 732
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.Doc