trichview.support
Re: EMF file creation |
Author |
Message |
Sergey Tkachenko |
Posted: 07/07/2005 19:29:28 Try to use TRVStyle.OnDrawStyleText event. In this event, convert Unicode text to DBCS and draw it yourself. For example: procedure TForm1.RVStyle1DrawStyleText(Sender: TRVStyle; const s: String; Canvas: TCanvas; StyleNo, SpaceBefore, Left, Top, Width, Height: Integer; DrawState: TRVTextDrawStates; var DoDefault: Boolean); var s2: String; begin { you can add here a code checking if Canvas is a PDF component's canvas, and exit if not } if not Sender.TextStyles[StyleNo].Unicode then exit; s2 := RVU_UnicodeToAnsi(Sender.DefCodePage, s); Canvas.TextOut(Left+SpaceBefore, Top, s2); DoDefault := False; end; This code converts all Unicode text using the code page specified in RVStyle.DefCodePage property. > For my case, the editor itself is Unicode. But since I want to export it to > PDF while my PDF component doesn't support Unicode. So the only thing I can > do is to export the EMF file in a particular charset so that it can be > exported properly. |
Powered by ABC Amber Outlook Express Converter