[Lazarus] Paper Size

Terry A. Haimann terry at HaimannOnline.com
Sat Nov 28 05:55:37 CET 2009


Maybe I am not being clear.

I have a report I am printing. It has logic similar to:

PageCnt := 1; Cnt := 0;
Query.First
Repeat
Printer.BeginDoc;
Printer.Canvas.Pen.Color := 0;
Printer.Canvas.Font.Name := 'Courier New';
Printer.Canvas.Font.Size := 8;
LineCnt := 1;
Printer.Canvas.TextOut(1, KKTop, 'Heading Line);
LineCnt := 3;
Repeat
Line := Query.Field1;
Printer.Canvas.TextOut(1, LineCnt * KKLineSize, Line);
DatabaseForm.Query.Next;
Until ((LineCnt > KKMaxLines) or (Query.Eof));
Printer.EndDoc;
Until Query.Eof;

The problem is that it starts to print a quarter of the page down. I am 
running Fedora 10 and Lazarus 0.9.26.2

I have noticed that there is a TPageSetupDialog, but I don't know if I 
used it correctly. I just put in the height and width of my paper in mm. 
Again I am using 8.5 x 11 inch paper "US Letter".



Terry A. Haimann wrote:
> On code that worked in Delphi is printing down about a quarter of the 
> page in Lazarus. I am using Printer.xxxx procedure.
>
> I am using the basic American Letter size (8.5 x 11)
>
> I tried setting it to "US Letter" but that has failed and i don't even 
> know what my options are.
>
> Lazarus 0.9.26.2
> My Printer is a HP Photosmart 8250
> OS is Fedora Core 10
> Even though the cups server is running on an an older FC8 desktop.
>
>
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>





More information about the Lazarus mailing list