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.

Thu Nov 23, 2023 7:08 pm

Hi, I'm having some issues with file conversion from rtf to pdf.

The spacing in the rtf file when converting to PDF is different.

I'm posting the code and files I'm using.

Code:

Code: Select all
Document d = new Document("teste.rtf");
d.SaveToFile("teste.pdf", FileFormat.PDF);


Kind regards,

Luiz Gustavo Alves

tecnologiahub
 
Posts: 35
Joined: Mon Feb 12, 2018 11:07 am

Fri Nov 24, 2023 2:06 am

Hello,

Thank you for your inquiry.
I tested the Word document you provided using the latest version of Spire.Doc(Spire.Doc Pack(hot fix) Version:11.11.0), but did not reproduce the issue you mentioned. I have attached my test results file. Please confirm that you are using the latest version for testing. If not, I recommend upgrading to this version for testing. If the issue persists after testing, please provide the following information for further investigation. Thank you in advance.
1) Your test environment, such as OS info (E.g. Windows 7, 64-bit) and region setting (E.g. China, Chinese).
2) Application type, such as Console App, .NET Framework 4.8.

Sincerely,
Annika
E-iceblue support team
User avatar

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

Fri Nov 24, 2023 12:26 pm

Hi Anika, thank you for your quick response.

The result file contains the same problem I mentioned, here's how the rtf file looks on Word 365:

file rtf.PNG


And here's how it looks on the pdf file:

file pdf.PNG


As you can see, there's a problem with spacing.

My environment SO is Windows 10 and my region setting is Portuguese Brazil.

Application type is windows form .NET 7.0

I hope all this info can help you find the issue.

Kind regards,

Luiz Gustavo Alves

tecnologiahub
 
Posts: 35
Joined: Mon Feb 12, 2018 11:07 am

Mon Nov 27, 2023 3:39 am

Hello,

Thank you for providing the information.
I apologize for not noticing the issue before when I viewed the RTF file using Microsoft 2016 version. The layout of the content in the RTF file appeared consistent with the resulting PDF file, hence I did not identify any issues. However, today I used Microsoft 2021 version to view the RTF file you provided, and the content layout indeed matches completely with the screenshot you provided. This has allowed me to reproduce the problem that you mentioned.
I have logged the issue into our bug tracking system with the ticket number SPIREDOC-10066. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused again.

Sincerely,
Annika
E-iceblue support team
User avatar

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

Return to Spire.Doc