You are not logged in.
Pages: 1
Hello,
These codes can convert emf file with chinese characters to pdf, but the font is 'Arial Unicode MS'. How can I use the fonts define in emf file?
Thanks.
procedure TForm1.emfchineseClick(Sender: TObject);
var
emf : TMetafile;
Pdf: TPdfDocument;
begin
emf := TMetafile.Create;
Pdf := TPdfDocument.Create;
try
Pdf.EmbeddedTTF := True;
pdf.StandardFontsReplace := true;
pdf.PDFA1 := true;
Pdf.UseFontFallBack := true;
Pdf.FontFallBackName := 'Arial Unicode MS';
Pdf.DefaultPageWidth := MulDiv(emf.Width,72,Pdf.ScreenLogPixels);
Pdf.DefaultPageHeight := MulDiv(emf.Height,72,Pdf.ScreenLogPixels);
Pdf.AddPage;
emf.LoadFromFile('c:\0.emf');
Pdf.Canvas.RenderMetaFile(emf);
pdf.SaveToFile('c:\test.pdf');
finally
FreeAndNil(emf);
FreeAndNil(pdf);
end;
end;
Offline
AFAIK this is not possible with the current implementation scheme.
I do not have clear idea about it could be done, due to some missing glyphes.
1. If the computer has install all chinese fonts, can I use the fonts define in emf file?
2. How can I get API document and samples of PDF Engine?
Offline
API documentation is available within the source, as comments, or within the main part of the mORMot framework SAD pdf.
Download latest 1.18 revision as is written in the SynPDF official page:
http://synopse.info/fossil/wiki?name=PDF+Engine
Offline
Pages: 1