Page 1 of 1

Printed bold rtf text is colored blue

Posted: Wed Jul 06, 2011 1:04 pm
by ThYpHoOn
Hi,

if i'm formatting a rtf-text bold it's printed in the color blue. I've used the TQRRichView (rvqrCtrls) component to print it in a quickreport. If i'm formatting a rtf-text italic it's printed red.
Thats realy confusing...
Image

Greetings, ThY

Posted: Wed Jul 06, 2011 1:58 pm
by Sergey Tkachenko
How do you transfer this document to QRRichView?

Posted: Wed Jul 06, 2011 2:25 pm
by ThYpHoOn
Directly with a Stream (LoadRTFStream)
This is the rtf:

Code: Select all

{\rtf1\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0\paperw11906\paperh16838\margl1800\margr1800\margt1440\margb1440\viewscale100\viewzk0
{\fonttbl{\f0\fnil Arial;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}


\pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\b\fs20\cf1  - 1 Bad-u.Designheizk\'f6rper
\line \plain \f0\fs20\cf1  - 1 Bad-u.Designheizk\'f6rper
\par \plain \f0\b\fs20\cf1      Standard 1100x600mm\tab 
\par \tab \tab o.Vent.NA50 RAL9016 
\par \plain \f0\i\fs20\cf1      Standard 1100x600mm\tab 
\par \tab \tab o.Vent.NA50 RAL9016\plain \f0\fs20\cf1  \par}

Posted: Thu Jul 07, 2011 2:23 pm
by Sergey Tkachenko
What's the value of RichView.RTFReadProperties.TextStyleMode? (for RichView where you load this document to)?
It looks like it = rvrsUseClosest (mapping RTF formatting to the most similar of existing styles).

Printint italic as red

Posted: Wed Mar 18, 2015 10:42 pm
by bglboss
I've also had the problem of italic printing red and came across this post. I wasn't sure how to fix it however so I thought I might post what worked for me here.

Your reply simply stated what the most likely situation was (RichView.RTFReadProperties.TextStyleMode = rvrsUseClosest).

I checked this and found it was true - the solution for me to fix the issue was to set this to "rvrsAddIfNeeded".

Hope this helps someone!

Re: Printed bold rtf text is colored blue

Posted: Thu Apr 26, 2018 5:58 am
by baz
Thanks bglboss. Your solution helped me !

Also, I set RichView.RTFReadProperties.ParaStyleMode to rvrsAddIfNeeded to ensure band lines correctly appear