Print via QuickReport

Discuss and ask questions about CAD DLL (CAD Image DLL, CAD Importer DLL).

Moderators: admin, support, SDS

Post Reply
Borni
Posts: 6
Joined: 11 Jul 2007, 16:13

Print via QuickReport

Post by Borni » 08 Feb 2008, 16:25

Hi,

next problem !

We need a printout via QuickReport.
Do you have an idea ? ( printout via canvas on quickreport ?)

support
Posts: 2932
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 12 Feb 2008, 14:59

Hi Borni,

1. Here goes a simple method of prining CAD images using CAD Import VCL (Web page: http://www.cadsofttools.com/en/products ... t_vcl.html) and QuickReport components:

Code: Select all

<b>unit</b> Unit1;

<b>uses</b>
  ... QuickRpt, QRCtrls, DXF, Printers;

<b>type</b>
  TForm1 = <b>class</b>(TForm)
    QRImage1: TQRImage;
    procedure FormCreate(Sender: TObject);
  <b>private</b>
...

<b>var</b>
  Form1: TForm1;

...

<b>procedure</b> TForm1.FormCreate(Sender: TObject);
<b>begin</b>
  QRImage1.Picture.LoadFromFile('c:\Test.dxf');
  QRImage1.Stretch := true;

  Printer.Orientation := poPortrait;
  Printer.BeginDoc;
  <b>try</b>
    QRImage1.PaintTo(Printer.Canvas.Handle,0,0);
  <b>finally</b>
    Printer.EndDoc;
  <b>end</b>;
<b>end</b>;
2. DelphiDemo for CADImage.DLL already contains printing code. Please find it in the procedure TfmMain.tbPrintClick(Sender: TObject)

Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Post Reply