Rendering to Word (.Doc)
Posted: Thu Dec 15, 2022 10:16 am
Hello,
I am using the text editor QuillJs to design some part of my report. The result is saved in database. Here is an example of the produced HTML :
The issue this time is that when I open the created .doc file in MS Word, the text size is not rendered as expected. For an 18px font-size, the text is rendered as 13.5 in Word.
I did several tests with different font-style and font-size, but the result is still the same.
For a 36px font-size, it is rendered as 27 in Word.
Attached you will find two of my generated examples .doc reports.
So my question is, does Stimulsoft expects a specific format when it comes to HTML tags ? According to your documentation it should be working. Am I missing something ?
EDIT: Based on your documentation, I assumed Stimulsoft works with HTML 4 tags and it gave me an idea so I tried something : I removed the pixels (px) from the inline-style in my database field
The new report is attached : 12_15_2022 10 42 02 AM.doc
I have no idea why, but the report is correctly rendered in Word now... Any hint please ?
I am using the text editor QuillJs to design some part of my report. The result is saved in database. Here is an example of the produced HTML :
Code: Select all
<div><span style="font-size: 18px; font-family: Calibri;">Hello world </span></div><div><span style="font-size: 18px; font-family: Calibri;">this is my text</span></div>
I did several tests with different font-style and font-size, but the result is still the same.
Code: Select all
<div><span style="font-family: Impact; font-size: 36px;">Hello world </span></div><div><span style="font-family: Impact; font-size: 36px;">this is my text</span></div>
Attached you will find two of my generated examples .doc reports.
So my question is, does Stimulsoft expects a specific format when it comes to HTML tags ? According to your documentation it should be working. Am I missing something ?
EDIT: Based on your documentation, I assumed Stimulsoft works with HTML 4 tags and it gave me an idea so I tried something : I removed the pixels (px) from the inline-style in my database field
Code: Select all
<div><span style="font-family: Impact; font-size: 36">Hello world </span></div><div><span style="font-family: Impact; font-size: 36">this is my text</span></div>
I have no idea why, but the report is correctly rendered in Word now... Any hint please ?