Board index » delphi » printing using DOT MATRIX printer
delene
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
delene
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
printing using DOT MATRIX printer
Hi
Can anyone tell me how to print on a dot matrix printer without using the windows printer drivers? Thanks |
Joe C. Hech
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:printing using DOT MATRIX printer----------------------------------------------------------------------- This solution is brought to you by Joe Hecht's TExcellent products, solving Form.Print and bitmap printing problems. Joe Hecht's TExcellent products can be found at: http://www.code4sale.com/joehecht ----------------------------------------------------------------------- (* Question: The following unit "PrtRaw.pas" demonstrates a 16/32 bit Following the unit, is an exmaple on using the Notes: 1) You are responsible for embedding all necessary 2) You must specify a valid printer and port name. *) unit PrtRaw; {Copyright (c) 1998 by Joe C. Hecht - All rights Reserved} interface uses {$IFDEF WIN32} function StartRawPrintJob(PrinterName : pChar; function StartRawPrintPage(hPrn : THandle) : integer; function PrintRawData(hPrn : THandle; function EndRawPrintPage(hPrn : THandle) : integer; function EndRawPrintJob(hPrn : THandle) : integer; implementation function StartRawPrintJob(PrinterName : pChar; function StartRawPrintPage(hPrn : THandle) : integer; function PrintRawData(hPrn : THandle; function EndRawPrintPage(hPrn : THandle) : integer; function EndRawPrintJob(hPrn : THandle) : integer; end. (* Example of use: uses procedure TForm1.Button1Click(Sender: TObject); hPrn := StartRawPrintJob('Generic / Text Only', if (StartRawPrintPage(hPrn) < 0) then begin Data[0] := 'P'; if (PrintRawData(hPrn, if (EndRawPrintPage(hPrn) < 0) then begin if (StartRawPrintPage(hPrn) < 0) then begin if (PrintRawData(hPrn, if (EndRawPrintPage(hPrn) < 0) then begin if (EndRawPrintJob(hPrn) < 0) then begin end; end. *) |
Jud McCrani
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:printing using DOT MATRIX printerQuote"delene" <madwe...@global.co.za> wrote: default font? uses printer; ... writeln( lst, 'test'); is the simpliest way. If you want to use effects then you send Jud McCranie |
Mike Copela
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:printing using DOT MATRIX printerYes, the code below will work in a WIN* environment - but it may appear _not_ to. This is due to WIN* print spooling, which most likely won't deliver the output to the device immediately (or very soon, in some cases). You may not see your output until the program terminates...or even much later. The fact is, WIN* seems to interfere with printer output, and it make take some tweaking of the print spooling settings to achieve anything reasonable. Quote> >Can anyone tell me how to print on a dot matrix printer without using the |
1. Can Report Printer 3.5 be used to print using dot matrix printer fast ? (Any add ons ?)
2. Printing Using AsignPRN produces Double Spaced lines when printing on DOT Matrix
3. How to speed up printing using Dot Matrix printer ?
4. Printing Graphics directly to Dot matrix printer
5. Printing Mailing Labels on a Dot Matrix Printer?
6. Printing Mailing Labels on a Dot Matrix Printer?
7. Printing to a dot matrix printer
8. Dot-Matrix Printer and Windows 95 and Text Printing