Printing Bitmap Image Problem lazarus / 1-Linux ---------------------------------------------------------------------- gilsonalencar · 2007-10-01 15:53 I trying to printing a Bitmap image and i wrote the follow code: procedure TPolarForm.PrintPolar; Const     {Rotina de Impressao do Diagrama Polar}   SDiv=2; Var   PrnRect, ImgRect: TRect;   PHeight, PWidth: integer;   CenterX, CenterY, X1,Y1,X2,Y2: integer; begin   Printer.Orientation:=poPortrait;   Printer.BeginDoc;   {Encontra o Centro da Tela}   PHeight:=round((printer.PageHeight/printer.YDPI)*Screen.PixelsPerInc h);   PWidth:=round((printer.PageWidth/printer.XDPI)*Screen.PixelsPerInch);   CenterX:=PWidth Div 2;   CenterY:=PHeight Div 2;   X1:=CenterX-(PHeight Div (SDiv*2));  {X1,Y1,X2,Y2 todos com PHeight para}   Y1:=CenterY-(PHeight Div (SDiv*2));  {formar um quadrado na impressão}   X2:=CenterX+(PHeight Div (SDiv*2));   Y2:=CenterY+(PHeight Div (SDiv*2));   PrnRect:=Rect(X1,Y1,X2,Y2);   ImgRect:=Rect(0,0,PolarGraph.Width,PolarGraph.Height);   Printer.Canvas.CopyRect(PrnRect,PolarGraph.Canvas,ImgRect);   Printer.EndDoc; end;                                               Running the program nothing ocurrs. A printer icon appears on top of ubuntu screen, but nothing hapen. Is there some problem with ubuntu or with code ? ---------------------------------------------------------------------- antonio · 2007-10-01 16:21 What is PolarGraph, a TImage? ---------------------------------------------------------------------- gilsonalencar · 2007-10-02 01:24 PolarGraph is a TBitmap. ---------------------------------------------------------------------- antonio · 2007-10-02 13:33 I tried your code on XP and it gives me acess violation. ---------------------------------------------------------------------- Zaher · 2007-10-02 23:40 @antonio install \lazarus\components\printers\printer4lazarus.lpk package You must use Printer4Lazarus unit in uses. ---------------------------------------------------------------------- antonio · 2007-10-03 00:29 Thanks.