Two RTF looking different in Report an Word.

Stimulsoft Reports.WPF discussion
OC-Thorsten
Posts: 31
Joined: Thu Jul 16, 2015 12:22 pm

Two RTF looking different in Report an Word.

Post by OC-Thorsten »

Hello,

we have an issue with Rich Text in our reports.
Attached you can find two different RTF documents. The only difference in these files are 2 spaces in line 9 and 12.

When i open them with Word (2013) both look exactly the same.
But the report displays them differently. I just tried WordPad (6.3) and there they also look different.

Is there anything i can do to make them both look like in Word?
Attachments
wrong.rtf
(416 Bytes) Downloaded 330 times
right.rtf
(419 Bytes) Downloaded 348 times
Report.mrt
(4.7 KiB) Downloaded 321 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Two RTF looking different in Report an Word.

Post by HighAley »

Hello.

The MS Word renders text its own way. It has more features in Rich Text. But they are supported by Word only.
We use .Net Framework methods. The same methods are used in WordPad.

Due to different methods of rendering the text could be shown a little different.
So the tabulation is shown in different places.

The only solution that we can suggest is to set the Wysiwyg property to True. In this case the text is rendered more accurate.

Thank you.
OC-Thorsten
Posts: 31
Joined: Thu Jul 16, 2015 12:22 pm

Re: Two RTF looking different in Report an Word.

Post by OC-Thorsten »

Hello,

the problem is with and without wysiwyg. You can it see in the example.
Wordpad (in Windows 10) renders the text correctly. Wordpad in all previous versions renders the text incorrect.

Is there a solution?
I can our customers say that Word doesn't work, but Wordpad must be working.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Two RTF looking different in Report an Word.

Post by HighAley »

Hello.

There are different versions of the riched20.dll in different systems.
So you get different result. Please, try to copy the latest version of the riched20.dll to the bin folder.

Thank you.
OC-Thorsten
Posts: 31
Joined: Thu Jul 16, 2015 12:22 pm

Re: Two RTF looking different in Report an Word.

Post by OC-Thorsten »

Hi,

the latest /old version of the riched20.dll doesn't help.

We could limit the error, it makes the problem but not simpler:
Wordpad in Windows 10 and 8.1 loads the RTF text sometimes right and sometimes wrong.
You can multiply open the attached file (wrong.rtf) to reproduce the error.

Wordpad in Windows 7 is always correct (like word).

Wordpad in Windows XP is alway wrong.

Any ideas?

We have parallel opened a case with Microsoft.
Can a BugFix from WordPad solve the problem in the report?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Two RTF looking different in Report an Word.

Post by HighAley »

Hello.

The WordPad use the same riched20.dll to render the Rich Text.
So this should fix the issue.

Thank you.
OC-Thorsten
Posts: 31
Joined: Thu Jul 16, 2015 12:22 pm

Re: Two RTF looking different in Report an Word.

Post by OC-Thorsten »

Hi,

we implements an own (.net) RTF Editor. So that the behavior between our program and Stimulsoft equals.
Now the PDF Export makes problems.
We thought that this is rendered with WPF?

I am sending you a simple example report.
PDF export without WYSIWYG: The font sizes do not match.
PDF export with WYSIWYG: The Tab positions does not fit.

The Preview is correct!
Attachments
Report.mrt
(5.38 KiB) Downloaded 491 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Two RTF looking different in Report an Word.

Post by Alex K. »

Hello,

> We thought that this is rendered with WPF?

No. The RichText exported vai WinForms. Due to some technical problems could not be realized.

> I am sending you a simple example report.
> PDF export without WYSIWYG: The font sizes do not match.

Could you describe this moment in more details, if possible, please send us screenshots or video?

Thank you.
OC-Thorsten
Posts: 31
Joined: Thu Jul 16, 2015 12:22 pm

Re: Two RTF looking different in Report an Word.

Post by OC-Thorsten »

Hi Aleksey,

you can reproduce with the last mrt File.

The preview with and without WYSIWYG is good and equal.
Examples:
Preview WITH WYSIWYG.PNG
Preview WITH WYSIWYG.PNG (24.2 KiB) Viewed 5996 times
Preview WITHOUT WYSIWYG.PNG
Preview WITHOUT WYSIWYG.PNG (24.14 KiB) Viewed 5996 times
The pdf export without WYSIWYG is bat. Arial 9 in Text and Arial 9 in RTF are not equal.
Example:
PDF WITHOUT WYSIWYG.PNG
PDF WITHOUT WYSIWYG.PNG (15.03 KiB) Viewed 5996 times
The pdf Export with WYSISYG is also not good.
Example (See the numbers):
PDF WITH WYSIWYG.PNG
PDF WITH WYSIWYG.PNG (13.98 KiB) Viewed 5996 times

We have big problems with our customers, because the Print / Export of RTF fields causing problems.
We are specially changed from WinForms to WPF and now I hear that the PDFs are still rendered with WinForms.
Can you change it? Gives a workaround?
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: Two RTF looking different in Report an Word.

Post by Ivan »

Hello,
The pdf export without WYSIWYG is bat. Arial 9 in Text and Arial 9 in RTF are not equal.
The problem may be related to the system font size (dpi).
We made some improvements in that direction about a month ago.
Please check the last prerelease build and let us know about the result.

Thank you.
Post Reply