#1 PDF Engine » synPDF create PDF from Metafile problem » 2012-04-23 07:38:38

chuqingsheng
Replies: 1

I have a report tool generate metafile . the metafile content some chinese word. Using canvas of paintbox draw this metafile, those words display are correct. but I using TpdfDocument.VCLCanvas draw this metafile .those words display is incorrect in the generated pdf file .

is synPDF bug??

my code snippet:

  pdf := TPdfDocumentGDI.Create(True, LCIDToCodePage(SysLocale.DefaultLCID), False);   // GB2312_CHARSET;
  pdf.EmbeddedTTF := True;
    Metafile := MakePageMetafile(i, Round(rve.PageProperty.PageWidth), Round(rve.PageProperty.PageHeight));
    try
      pdf.AddPage;
      pdf.VCLCanvas.Draw(0, 0, Metafile);
    finally
      Metafile.Free;
    end;
  pdf.SaveToFile('c:\testdirect.pdf');
  pdf.Free;

Board footer

Powered by FluxBB