You are not logged in.
Pages: 1
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
Pages: 1