#1 2013-12-10 10:57:07

jan404
Member
Registered: 2013-12-10
Posts: 1

Delphi 7, Quickreport 3 and Teechart series width

I'm using the above (Delphi 7, Quickreport 3 and Teechart 7.04) to output a chart (and some text) to a PDF file.

I'm using the code as quoted below. What happens is that the chart from TeeChart is looking different from the one on screen. Especially the series line width looks different, the line width in the PDF always seems to be 1 while I'm actually using a width of 3.

If I print the report to a PDF printer driver (Bullzip) the PDF looks OK.

What could I do about this, so that the output of synpdf also looks ok?

Code below:

procedure TForm8.Button2Click(Sender: TObject);   (* V3.00: PDF output *)
var
    vpdf : TPdfDocumentGDI;
    pagemeta : TMetafile;
    p : integer;
begin
    vpdf := TPdfDocumentGDI.Create(true, 1252,false);
    vpdf.CompressionMethod := cmNone;
    QuickRep1.prepare;
    for p := 1 to QuickRep1.QRPrinter.PageCount do
    begin
      vpdf.AddPage;
      pagemeta := QuickRep1.QRPrinter.GetPage(p);
      vpdf.VCLCanvas.Draw(0,0,pagemeta);
    end;
    vpdf.SaveToFile('Graph.pdf');
    vpdf.free;
end;

Offline

#2 2014-05-03 04:08:33

BetoVG
Member
Registered: 2014-05-03
Posts: 8

Re: Delphi 7, Quickreport 3 and Teechart series width

a path as you investigate is:

you can evaluate a metafile file generated to assess whether the problem is the
synpdf or between QuickReport and the metafile

example

 
. . . . . 
pagemeta: = QuickRep1.QRPrinter.GetPage (p); 
if i = 0 then pagemeta.SaveToFile ('teste.wmf'); 
. . . . . 

Note: (*) in your example, do not forget to release the memory of the variable pagemeta to prevent leak 

... . . . . . . 

       pagemeta: = QuickRep1.QRPrinter.GetPage (p); 
       vpdf.VCLCanvas.Draw (0,0, pagemeta); 
       pagemeta.free;/ / (*) 
      
  . . . . . . . .

Offline

Board footer

Powered by FluxBB