Delphi 2010 Export to pdf

khaled salem
khaled salem used Ask the Experts™
on
Hi all:
i wrote code to convert Quick report to pdf. its working perfect except on issue.
//  QuickRep3.Font.Charset:=178;
//  QuickRep3.Font.Name := 'Tahoma';

  Quickrep3.prepare;
  Save_to_Pdf := (repname+'\'+Cb2.text+FormatDateTime('ddMMYYHHmm',now)+'.pdf');
  QuickRep3.ExportToFilter(TQRPDFDocumentFilter.Create(Save_to_Pdf));
  QuickRep3.Preview;  // or Print
  QuickRep3.QRPrinter.Free;
  QuickRep3.QRPrinter := nil;

Open in new window


the arabic language appear like garbage like question mark (??????? ) as shown in attached image. i am tired to change the font quickrep but the issue is exist.
samir.png
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2014
Commented:
You are probably going to need a software change, either a Delphi version bump or QR change.

From http://www.quickreport.co.uk/ProductInfo.aspx

QuickReport and Unicode
Programmers working in RAD studio 6 or 7 have a default unicode string type, so code written using these IDEs can be made unicode compatible. QR5042 has been adapted to take advantage of this and reports with unicode are supported. In earlier versions of Delphi and C++Builder, QR502 has two extra controls that support the wide character format, which can store UTF-16. The PDF functionality in Quickreport Pro does not use Unicode. We recommend developers needing this to purchase additional software from Gnostice
Geert GOracle dba
Top Expert 2009

Commented:
you don't have that font on the pc you are printing with

if you want to print something, in a certain font, then minimally you need that specific font

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial