Board index » delphi » DELPHI 4 - Printing Text file including printer control characters and 8 bits characters
pragmatic.laporte
![]() Delphi Developer |
Sat, 14 Jul 2001 03:00:00 GMT
|
pragmatic.laporte
![]() Delphi Developer |
Sat, 14 Jul 2001 03:00:00 GMT
DELPHI 4 - Printing Text file including printer control characters and 8 bits characters
Hi,
Using AssignFile( ,'LPT1') it works, Thanks Marc Laporte |
Joe C. Hech
![]() Delphi Developer |
Sat, 14 Jul 2001 03:00:00 GMT
Re:DELPHI 4 - Printing Text file including printer control characters and 8 bits charactersQuotepragmatic.laporte wrote: How do I write a raw string of a data to the printer? 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. Joe |
1. BARCODE and send CONTROL CHARACTERS to my printer by DELPHI or Pascal Language
2. Printing a Text File - Tiny Characters !
3. Read a text file character by character !
4. Printing Tab-character with printer.canvas in delphi1
5. control characters / print barcode
6. Control Characters / Print barcode
7. control characters / print barcode
8. print barcode and control characters