#1 2018-11-22 08:49:10

rcss23
Member
Registered: 2018-11-22
Posts: 3

Problem with letters ž and š

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

Offline

#2 2018-11-22 09:21:34

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Problem with letters ž and š

With which version of Delphi are your working? Pre-Unicode = pre-Delphi 2009?

Offline

#3 2018-11-22 09:33:20

rcss23
Member
Registered: 2018-11-22
Posts: 3

Re: Problem with letters ž and š

Delphi 7

Offline

#4 2018-11-22 09:56:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Problem with letters ž and š

Did you set ACodePage appropriately in TPdfDocument.Create() ?

Offline

#5 2018-11-22 10:33:21

rcss23
Member
Registered: 2018-11-22
Posts: 3

Re: Problem with letters ž and š

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

Offline

Board footer

Powered by FluxBB