How to change a font style of the paragraph's single character in FineReader Engine 12

Question

How, e.g., to change a single character's color and font style in the sentence?

Answer

The following C++ code will deal with the task:

CSafePtr<ICharParams> charparams;
CheckResult(FREngine->CreateCharParams(&charparams));
CheckResult(charparams->put_Color(165536));
CheckResult(charparams->put_IsItalic(VARIANT_TRUE));
CheckResult(par->SetCharParams(1, 1, charparams, CFL_Proofed, SF_Color | SF_Italic));
// Done for the 2nd character in the paragraph

Note: Don't obtain ICharParams object from the paragraph using
IParagraph::GetCharParams(int Position, ICharParams* Result)!
In this case, any word in the paragraph would undergo style changing.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.

Recently viewed