Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-11

Paper Size

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Terry A. Haimann

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.

Reply by email

Terry A. Haimann
to Terry A. Haimann

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 21 lines
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 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Jesus Reyes
to Terry A. Haimann

--- El vie 27-nov-09, Terry A. Haimann escribi?:

Show quoted text 28 lines
De:: Terry A. Haimann Asunto: Re: [Lazarus] Paper Size A: "Lazarus mailing list" 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/

Reply by email

Terry A. Haimann
to Jesus Reyes

How do I include this procedure in my progrram?

Jesus Reyes wrote 49 lines
--- El vie 27-nov-09, Terry A. Haimann escribi?: > De:: Terry A. Haimann > Asunto: Re: [Lazarus] Paper Size > A: "Lazarus mailing list" > 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 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email