This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Printer sample code ?

I have a graphics routine that paints on a form's  canvas.
Now I try for the first time to print this on paper.
I know, In general, it should be easy, 
using TLMDPrinter and redirecting to its Canvas
between BeginDoc and EndDoc commands.
But all of this fails,
so my question;
Is there any sample code for printing and selecting a printer ?
Sorry, the scarse info in the LMD Tools help files is not helpful
for a beginner like me.
Thanks for your feedback !!!
Michael

Comments

  • TLMDPrinter is designer to work with predefined in LMD-Print package print tasks. Pure graphics can be printed with standard Delphi TPrinter. LMD components can only make selecting the printer more easy:

    var
      p: TPrinter;
    begin
      if LMDPrinterSetupDialog1.Execute then
      begin
        p := LMDPrinter1.GetSysPrinter;
        p.BeginDoc;
        p.Canvas.Rectangle(50, 50, 300, 300);
        p.EndDoc;
      end;
    end;
Sign In or Register to comment.