#1 Re: PDF Engine » Problem with letters ž and š » 2018-11-22 10:33:21

pdf:=TPdfDocumentGDi.Create(false,1257, false);
or
pdf:=TPdfDocumentGDi.Create(false,65001, false);

not helped sad

  pdf.VCLCanvas.Font.Charset:=ANSI_CHARSET;
  pdf.VCLCanvas.Font.Charset:=BALTIC_CHARSET;

not helped sad

#3 PDF Engine » Problem with letters ž and š » 2018-11-22 08:49:10

rcss23
Replies: 4

hi, i have problem with letter ž and š.
my code is:
pdf:=TPdfDocumentGDi.Create();
try
    pdf.Info.Author:='Vadyba';
    pdf.Info.CreationDate:=now;
    page:=pdf.AddPage;
    page.PageLandscape:=false;
    pdf.DefaultPaperSize:=psA4;
    bmp := TBitmap.Create;
    bmp.LoadFromFile('C:\RIV_Vadyba\logo2.bmp');
    pdf.VCLCanvas.StretchDraw(Rect(320, 30, 500, 100), bmp);
    pdf.VCLCanvas.Font.Name:='Arial';
    pdf.VCLCanvas.Font.Charset:=BALTIC_CHARSET;
    pdf.VCLCanvas.Font.Size:=12;
    pdf.VCLCanvas.Font.Style:=[fsBold];
    pdf.VCLCanvas.TextOut(50,350,'Krovinio važtaraštis: '+TrimRight(Prekyb1.FieldByName('I06_PASTABOS').DisplayText));

problem is in text "Krovinio važtaraštis" pdf saving was write to small letter ž, and making space after letter š.

Thanks

Board footer

Powered by FluxBB