[Lazarus] Paper Size
Terry A. Haimann
terry at HaimannOnline.com
Sat Nov 28 06:59:56 CET 2009
How do I include this procedure in my progrram?
Jesus Reyes wrote:
> --- 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/
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
More information about the Lazarus
mailing list