You are not logged in.
Pages: 1
Could you try TextOutW() instead, and a conversion to unicode?
What if you use a temporary metafile (e.g. TPdfDocumentGDI) before rendering?
What if you set UseFontFallBack=false and/or UseUniscribe=false/true?
First solution works (TextOutW and conversion to unicode). Thank You.
Which charset are you using?
CharSet = 238 (EastEurope), CodePage = 1250
I'm using PDF Engine from the end of 2012 (SynPdf.pas is from 28-nov-2012)
Here is code:
procedure TForm1.Button1Click(Sender: TObject);
var
lPdf: TPdfDocument;
lPage: TPdfPage;
n: Integer;
s: String;
begin
lPdf := TPdfDocument.Create;
try
lPdf.Info.CreationDate := Now;
lPdf.Info.Creator := 'SynPDF';
lPdf.DefaultPaperSize := psA4;
lPage := lPdf.AddPage;
lPdf.Canvas.SetFont('Consolas', 9.0, [], EASTEUROPE_CHARSET);
lPdf.Canvas.SetLeading(lPdf.Canvas.Page.FontSize);
lPdf.Canvas.BeginText;
s := 'abcdefghijklmnopqrstuvwxyz';
for n := 2 to 33 do
begin
lPdf.Canvas.TextOut(100, lPage.PageHeight - n * 20, 'ĄĘŚĆŃÓŁŻŹ ' + s);
lPdf.Canvas.TextOut(100, lPage.PageHeight - n * 20 - 10, 'ąęśćńółżź');
end;
lPdf.Canvas.EndText;
lPdf.SaveToFile('TEST.PDF');
finally
lPdf.Free;
end;
end;
It generate nice PDF :-)
ok.png
But when I change PDF engine to new one there are an extra characters in generated PDF and after few lines font is change to Arial.
bug.png
I'm using Delphi 7.
Pages: 1