#1 Re: PDF Engine » Bad result with RenderMetafile » 2013-07-22 08:04:57

Thanks. Now i'm happy. Result PDF file look as expected. I awaiting that all my report will be the same correct. smile
Can i ask to you if get any problems with your component again?

#2 Re: PDF Engine » Bad result with RenderMetafile » 2013-07-22 06:51:33

ab wrote:

new option named "tpExactTextCharacterPositining"

This value should be a four parameter in method RenderMetafile?

#3 Re: PDF Engine » Bad result with RenderMetafile » 2013-07-19 14:54:46

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 sad (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

#4 PDF Engine » Bad result with RenderMetafile » 2013-07-19 13:41:13

harisma
Replies: 7

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

Board footer

Powered by FluxBB