Printed bold rtf text is colored blue

General TRichView support forum. Please post your questions here
Post Reply
ThYpHoOn
Posts: 21
Joined: Fri Jul 16, 2010 1:56 pm
Location: Germany

Printed bold rtf text is colored blue

Post 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
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

How do you transfer this document to QRRichView?
ThYpHoOn
Posts: 21
Joined: Fri Jul 16, 2010 1:56 pm
Location: Germany

Post 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}
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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).
bglboss
Posts: 14
Joined: Mon Aug 20, 2007 5:33 am

Printint italic as red

Post 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!
baz
Posts: 1
Joined: Thu Apr 26, 2018 5:54 am

Re: Printed bold rtf text is colored blue

Post by baz »

Thanks bglboss. Your solution helped me !

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