You are not logged in.
Pages: 1
I have some .emf file (i. e. Form4.emf). This file was generated by our ReportCreator, which based on TQuickRep, so i receive this .emf file from follow code
Report.QRPrinter.GetPage(1)
I wrote simple project with only one button. Button OnClick event have follow code:
procedure TForm1.Button1Click(Sender: TObject);
var
PDF: TPDFDocument;
AMeta: TMetafile;
begin
PDF := TPdfDocument.Create;
try
AMeta := TMetafile.Create;
try
aMeta.LoadFromFile('C:\Form4.emf');
Pdf.DefaultPageWidth := MulDiv(aMeta.Width, 72, Pdf.ScreenLogPixels);
Pdf.DefaultPageHeight := MulDiv(aMeta.Height, 72, Pdf.ScreenLogPixels);
Pdf.AddPage;
Pdf.Canvas.RenderMetaFile(aMeta, 1, 0, 0);
finally
aMeta.Free;
end;
Pdf.SaveToFile('C:\Form4.pdf');
finally
Pdf.free;
end;
end;
But in result Form4.pdf file i see not the same as in Form4.emf file. (Part of text string was cut).
Original files you can look here:
http://ab.inf.ua/pdf/Form4.pdf
http://ab.inf.ua/pdf/Form4.emf
Last edited by harisma (2013-07-19 13:53:38)
Offline
I just checked with current "unstable" version from http://synopse.info/fossil/wiki?name=Get+the+source
No rendering problem with Form4.emf as you supplied it.
Ensure you download the latest revision.
Offline
I just download latest version, recompile my test project and rebuild result PDF file. For this simple PDF file all OK, but when I replace .emf file with other (link to this file placed bellow), result PDF file again is bad (look at jpg file, where I marks bad places)
Links to new files:
http://ab.inf.ua/pdf/Form.pdf
http://ab.inf.ua/pdf/Form.emf
http://ab.inf.ua/pdf/Form.jpg
Offline
Form.jpg file is not available.
You may try with the new option named "tpExactTextCharacterPositining" for RenderMetaFile() method.
It is not set by default to ensure pdf files are as small as possible, but it may help you solve your layout concern.
Offline
new option named "tpExactTextCharacterPositining"
This value should be a four parameter in method RenderMetafile?
Offline
Thanks. Now i'm happy. Result PDF file look as expected. I awaiting that all my report will be the same correct.
Can i ask to you if get any problems with your component again?
Offline
Pages: 1