Windows x64 Printer does not work lazarus / 34-Windows ---------------------------------------------------------------------- churichuro · 2012-04-14 01:24 hello, I try the printer example of the wiki and run well in ubuntu linux but not in Windows 7 64bits I read that it should work since 6 dec 2011 but I get the error this error is just when I call BeginDOC from class Printer I add osPrinter and Printers to the uses section just like the examples say some idea? thanks ---------------------------------------------------------------------- Leledumbo · 2012-04-14 03:44 and the error is? ---------------------------------------------------------------------- churichuro · 2012-04-14 05:16 when run under lazarus control the error is: exception class 'RunError(56312)'. running directly from file manager. the error message is: Printer not printing. Pres OK to ignore and risk data corruption. Press Cancel to kill the program. Code: [Select]unit Unit1; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Printers,   StdCtrls, PrintersDlgs, osPrinters; type   { TForm1 }   TForm1 = class(TForm)     PrintBtn: TButton;     PrintDialog1: TPrintDialog;     procedure PrintBtnClick(Sender: TObject);   private     { private declarations }   public     { public declarations }   end; var   Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.PrintBtnClick(Sender: TObject); const   LEFTMARGIN = 100;   HEADLINE = 'I Printed My Very First Text On '; var   YPos, LineHeight, VerticalMargin: Integer;   SuccessString: String; begin   with Printer do   try // the exception happen here, in BeginDoc     BeginDoc;     //showmessage('Inicio');     Canvas.Font.Name := 'Courier New';     Canvas.Font.Size := 10;     Canvas.Font.Color := clBlack;     LineHeight := Round(1.2 * Abs(Canvas.TextHeight('I')));     VerticalMargin := 4 * LineHeight;     // There we go    // showmessage('Aqui vamos');     YPos := VerticalMargin;     SuccessString := HEADLINE + DateTimeToStr(Now);     Canvas.TextOut(LEFTMARGIN, YPos, SuccessString);   finally     EndDoc;   end; end; end. I really like Lazarus, And want take the time for learn any help will be welcome.