You are not logged in.
Pages: 1
Hi, I'm tring to make pdf from metafile and I have a problem.
Those are my code:
if lSaveDialog.Execute then
begin
lFileName := lSaveDialog.FileName;
pdf := TPdfDocumentGDI.Create(True, SynPdf.LCIDToCodePage(SysLocale.DefaultLCID), False);
try
pdf.EmbeddedTTF := True;
pdf.EmbeddedWholeTTF := True;
pdf.CompressionMethod := cmFlateDecode;
pdf.ForceJPEGCompression:=20;
pdf.DefaultPaperSize := psA4;
pdf.UseSetTextJustification := False;
pdf.StandardFontsReplace:= False;
pdf.UseUniscribe := True;
Page := Pdf.AddPage;
pdf.VCLCanvas.StretchDraw(Rect(20, 20, Page.PageWidth+200, Page.PageHeight+190), FPage);
where FPage is my MetaFile.
When a save this pdf it's with strange font format. Where can I put example metafile and pdf ?
the metafile is normal...
Last edited by BEKU123 (2012-07-30 12:40:51)
Offline
it's created for TPrinter's canvas but in em explorer look's normal.
I have line with '|' marks and some text and again '|'. it's supose to do somthing like table.
I can send a metafile if You want. Problem is that lines are in diferent places so page is not like table. (in preview and in emfexplorer is).
Probably problem is laying in font embadding because in pdf there are different fonts that in metafile.
Sorry for my english.
Offline
When I Use TGDIPages the problem is the same. In preview windows it look fine but when I export it to PDF it isn't.
Offline
Did you use the latest version from http://synopse.info/fossil ?
Did you enable Font-Fallback, as stated by http://blog.synopse.info/post/2012/07/1 … generation ?
Did you try disabling it?
Is there any non English characters within the text?
Offline
Te Font-Fallback property (UseFontFallBack) gives no result enabled or disabled. Nothing's change. In Pdf seems like font's are bigger than in preview and other (i assume it's arial).
i have "courier new ce" in my metafile. That font is not embadded in pdf.
Yes I use non English characters but problem is not in them. Those are exported properly.
Offline
I have "Arial Unicode MS" installed and all characters are in "Courier New Ce"... Can I Send You a MetaFile ?
Offline
I've send You an Email with Metafile... I'll be gratefull for Your help.
Offline
I've probably found the issue.
In fact, when a font is not available in the system as true type, there was a font-fallback to Arial.
Should be fixed by http://synopse.info/fossil/info/539c340a81
- now handle raster/device or bitmap fonts as the most close true-type font available
- speed-up of internal true-type fonts list (using binary search)
Hope it helped.
Offline
It's working fine. Thank's !
Offline
Pages: 1