Send to parallel port in C#

Article ID: 38207088

Issue / Question

Customer have various printer in use. They want to develop a general program that works for all printer models.

They consider to use parallel to send print data, but for C#, no class can control this port.

Applicable To

All printers which have parallel port, 105SL Plus, Xi4 Series, ZM Series, ZT200, ZT400, ZT510, ZT600 Series, GK888, GC420, GT800, ZD400, ZD500, ZD600 Series, ZE500

Resolution / Answer

In C# we should use windows API to control port, as no any class or control can use it.

The API is included in kernel32.dll, we should import the dll and use the CreateFile, ReadFile, WriteFile and CloseHandle function.
 

+ Applicable Products

  • 105SLPlus Industrial Printers
  • 110PAX Print Engines (disc.)
  • 110Xi4 Industrial Printer
  • 140Xi4
  • 140Xi4 Industrial Printer
  • 170PAX4
  • 170Xi4 Industrial Printer
  • 220Xi4 Industrial Printer
  • 2824-Z Series
  • EM220II Mobile Printers
  • EZ320 Mobile Printers
  • GC420d Desktop Printer
  • GC420t Desktop Printer
  • GK420d Desktop Printer
  • GK420d Healthcare Desktop Printer
  • GK420e
  • GK420t Desktop Printer
  • GK420t Healthcare Desktop Printer
  • GT800 Desktop Printer
  • GX420Rx Desktop Printer
  • GX420d Desktop Printer
  • GX420t Desktop Printer
  • GX420t Product Printers
  • GX430d Desktop Printer
  • GX430t Desktop Printer
  • HC100 Wristband Printer
  • KR203 Kiosk Receipt Printer
  • KR403 Kiosk Receipt Printer
  • LP 2824 Plus Desktop Printer
  • MZ-220
  • MZ-320
  • P4T Mobile Printers
  • QL320 Mobile Printer
  • QL420 Mobile Printer
  • QLn220 Healthcare
  • QLn220 Mobile Printer
  • QLn320 Healthcare
  • QLn320 Mobile Printer
  • QLn420 Mobile Printer
  • RW 220 Mobile Printer
  • RW 420 Mobile Printer
  • RW 420 Print Station
  • S4M
  • TLP 2824Plus Desktop Printer
  • TTP 2000 Series Kiosk Receipt Printers
  • TTP 2110 Kiosk Printer
  • TTP 2130 Kiosk Printer
  • TTP 7030 Kiosk Receipt Printer
  • TTP 8200 Kiosk Printer
  • TTP 8300 Kiosk Printer
  • ZD120
  • ZD410-HC
  • ZD410D
  • ZD420-D-T
  • ZD420-D-T-HC
  • ZD420-HC
  • ZD420C
  • ZD420D
  • ZD420D-HC
  • ZD420T
  • ZD420T-HC
  • ZD510-HC Wristband Printer
  • ZD600-HC
  • ZD620-D-T
  • ZD620-D-T-HC
  • ZD620D
  • ZD620D-HC
  • ZD620T
  • ZD620T-HC
  • ZE500 Print Engines
  • ZM400
  • ZM600
  • ZP888
  • ZQ110 Mobile Printers
  • ZQ120
  • ZQ220
  • ZQ300 Series Inside
  • ZQ300 Series Outside
  • ZQ310
  • ZQ320
  • ZQ510 Mobile Printer
  • ZQ520 Mobile Printer
  • ZQ610
  • ZQ610-HC
  • ZQ620
  • ZQ620-HC
  • ZR128 Mobile Printers
  • ZR138
  • ZR300 Series Mobile Printers
  • ZR318 Mobile Printers
  • ZR328 Mobile Printers
  • ZR338 Mobile Printers
  • ZR600 Series Healthcare Mobile Printers
  • ZR628
  • ZR658
  • ZR658-HC
  • ZR668
  • ZR668-HC
  • ZT210 Industrial Printer
  • ZT220 Industrial Printer
  • ZT230 Industrial Printer
  • ZT410 Industrial Printer
  • ZT420 Industrial Printer
  • ZT510 Industrial Printer
  • ZT600 Series Industrial Printers
  • ZT610 Industrial Printer
  • ZT620 Industrial Printer
  • iMZ220 Mobile Printer
  • iMZ320 Mobile Printer
  • zp450 Desktop Printer