[Lazarus] Paper Size

Jesus Reyes jesusrmx at yahoo.com.mx
Sat Nov 28 06:17:47 CET 2009



--- El vie 27-nov-09, Terry A. Haimann <terry at HaimannOnline.com> escribió:

> De:: Terry A. Haimann <terry at HaimannOnline.com>
> Asunto: Re: [Lazarus] Paper Size
> A: "Lazarus mailing list" <lazarus at lists.lazarus.freepascal.org>
> Fecha: viernes 27 de noviembre de 2009, 22:55
> 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


The values for KKTop and KKLineSize must be calculated according to printer resolution, take a look at the example in lazarus/components/printers/samples/dialogs.

Jesus Reyes A.


      Encuentra las mejores recetas en Yahoo! Cocina.                       
http://mx.mujer.yahoo.com/cocina/




More information about the Lazarus mailing list