Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 276

Summary: [TV52015997] TeeChart's TeeSaveToPDFFile function does not work reliable, since a ...
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ExportAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2013-11-20 10:35:54 EST
TeeChart's TeeSaveToPDFFile function does not work reliable, since a random gap is drawn between characters of text. Only if this gap is 0, output is OK.
Inspecting the source code, I found the following lines in TeePDFCanvas.pas, in the procedure TPDFCanvas.RotateLabel(x,y:Integer; Const St:String; RotDegree:Double):
        if Assigned(IFont) then
           WriteStringToStream(FCStream,FontProperties(IFont,FontIndex)+' ')
        else
           WriteStringToStream(FCStream,FontProperties(TTeeFont(Font),FontIndex)+' ');

The last line is critical, since it misses a dynamic type check whether Font is actually a TTeeFont. If Font is not a TTeeFont, the Font's InterCharSize property returns a random value in function FontProperties which causes the random gap to be drawn.
I would suggest to add the dynamic type check and overload function FontProperties accordingly.
http://www.teechart.net/support/viewtopic.php?f=3&t=12930&p=56084#p56084 [created:2012-01-09T15:29:20.000+01:00 reported by:yeray@steema.com reported in version:2011.04.41118 (TeeChart VCL)]