Hello. I use VisPDF component Delphi/C++Builder 2009 and show text with
ShowMessage(FloatToStrF(1.23, ffFixed, 6, 2)); // Output: 1,23 (right!)
UnicodeString Text = "Hello world!";
VPDF->CurrentPage->UnicodeTextOutStr( x, y, 0, Text);
ShowMessage(FloatToStrF(1.23, ffFixed, 6, 2)); // Output: 1.23 (false!)
afer UnicodeTextOutStr() the DecimalSeparator is changed. I have look in VisPDF source and found, that:
Abscissa := Angle * Pi / 180;
X := XProjection(X) + StrHeight * sin(Abscissa);
Y := (YProjection(Y)) - StrHeight * cos(Abscissa);
MtxA := cos(Abscissa);
MtxB := sin(Abscissa);
SetTextMatrix(MtxA, MtxB, -MtxB, MtxA, X, Y);
with SetTextMatrix() show up the bug. comment out this line, DecimalSeparator is right, but no text in my pdf.
procedure TVPDFPage.SetTextMatrix(a, b, c, d, x, y: Single);
var
S: AnsiString;
begin
S := _CutFloat(a) + ' ' +
_CutFloat(b) + ' ' +
_CutFloat(c) + ' ' +
_CutFloat(d) + ' ' +
_CutFloat(x) + ' ' +
_CutFloat(y) + ' Tm';
SaveToPageStream(S);
end;
procedure TVPDFPage.SaveToPageStream(ValStr: AnsiString);
begin
PageContent.Add(string(ValStr)); // PageContent: TStringList;
end;
I don't understand this function. Can somebody help?
VisPDF does not use any DLL or other software to create PDF files. Using VisPDF is very easy and have good examples.