Board index » delphi » Printer problems
Stefan Hagstedt
![]() Delphi Developer |
Sun, 28 Feb 1999 03:00:00 GMT
|
Stefan Hagstedt
![]() Delphi Developer |
Sun, 28 Feb 1999 03:00:00 GMT
Printer problemsWhat is the best way to use the printer? |
Bobby W. Jones I
![]() Delphi Developer |
Mon, 01 Mar 1999 03:00:00 GMT
Re:Printer problemsQuoteStefan Hagstedt wrote: dissatisfied with the time it takes them to load, etc (especially if I'm printing a form of just one record, and I happen to be looking at the record on screen!) Anyway, I've experienced some problems with selection of fonts and sizes, What I do is first select the printer (using printer.printers[x], where x Then I set a variable 'n' equal to the number of pixels per inch on the I use 'x' to represent horizontal spacing and 'y' for vertical. x:=round(n*2.5); {2.5 inches from left} Of course, you'll probably want to change the variables many times and If you have any more specific questions about your situation, you can Bob Jones |
Joe C. Hech
![]() Delphi Developer |
Tue, 02 Mar 1999 03:00:00 GMT
Re:Printer problemsQuoteStefan Hagstedt wrote: not always scale properly. To ensure proper scaling set the PixelsPerInch property of the font. Here are two examples: ******************************************************** var Printer.Canvas.Font.Name := 'Courier New'; Writeln(MyFile, 'Print this text'); System.CloseFile(MyFile); ****************************************************** uses Printers; begin Printer.Canvas.Font.PixelsPerInch:= Printer.Canvas.Textout(10, 10, 'Print this text'); Printer.EndDoc; Hope this helps! Joe -- |