#1 2011-08-09 22:55:21

hovecricketer
Member
Registered: 2011-07-11
Posts: 3

Fonts

I'm creating a pdf from a word document by: copying it to the clipboard, assigning the clipboard to a MetaFile, then using Canvas.RenderMetaFile, and finally SaveToFile.

with TPdfDocument.Create do
try
   MF := TMetaFile.Create;
   MF.Assign(Clipboard);
   Canvas.RenderMetaFile(MF);
   SaveToFile(filename);
finally
       MF.Free;
end;

It's fine except the fonts seem to go all over the place (doubling in width, and height, overwriting subsequent words, etc) in some parts of the document. The document uses tables and Arial 9pt, so nothing weird.

I've tried using RenderMetaFile with the full parameter set, adjusting the 2 kerning parameters, but I don't seem to be able to improve it reliably. My guess is that it is the kerning, some sort of level being exceeded causing the font to be changed. 

Can anyone explain how to use the parameters of RenderMetaFile in more detail? (Or some other approach, that doesn't have this problem?)

thanks very much

Steve

Offline

#2 2011-08-10 06:19:34

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

Re: Fonts

Which version of SynPdf do you use?

Could you send me the metafile as .emf file to webcontact01 at synopse dot info ?

Offline

Board footer

Powered by FluxBB