Intercepting data sent to a Windows printer

I need to intercept data being sent to a ESC/POS printer on Windows and analyze it.

So I wanted to get the data in plain text, so that I can extract and make sense of information being sent to the printer.

Currently, I have tried using "VeryDOC Printer Port Monitor" to get the data stream being sent to the printer port. But the data being sent is in the form of raster graphics i.e. dots to be printed, embedded within ESC/POS commands.

So I was wondering if somebody can suggest me on how can I get the print data in text format so as to be able to extract some information from it.

Customer
----------------------------------------------------------
The data which is sent to a ESC/POS printer IS raster data embedded with ESC/POS commands. This is what the ESC/POS printer driver generates from its input. And that's what "VeryDOC Printer Port Monitor" catched for you.

Seems you want to see the input sent to the printer driver. That means you'll have to find out which applications do use the printer and you have to intercept what arrives at the printer driver.

You do not say if you want to set up your interception in a 'live' environment, or if it is for temporary testing only. If you want to test temporarily, you could alternatively do the following steps:

  1. Pause the print queue (upper screenshot, below).
  2. Optionally: change the driver away from ESC/POS to, say PostScript or Microsoft XPS. Do this on the same "Advanced" tab on the printer properties dialog as mentioned above. (lower screenshot on the right, below).
  3. Print.
  4. Retrieve the spool file waiting in the spool directory. On Windows 8 this is by default C:\Windows\System32\spool\PRINTERS. The spool file is named NNNNN.spl where NNNNN is the number of the current printjob.
  5. Analyze the PostScript or XPS data.

See these 3 screenshots:

clip_image002

clip_image004

clip_image006


However, it would be much easier (instead of using "VeryDOC Printer Port Monitor") if you...

  • ...simply enable the printer driver setting called "Keep printed documents": go to print queue properties => select "Advanced" tab => enable respective checkbox (see left screenshot, above);
  • ...fish spooled printjob from the windows print spool directory;
  • ...analyze your NNNNN.spl file:
    • on Windows 8 this will be an XPS file. Re-name it to NNNNN.xps and you can open it with the builtin XPS viewer.
    • on previous version of Windows, the NNNNN.spl will have the file format of the respective printer driver (PostScript for PostScript drivers, XPS for Microsoft XPS printer, ESC/POS for your printer, ...). Rename it accordingly and open it in XPS or PostScript viewer.


VeryDOC has a printer hook technology which can be used to hook ALL Windows Printers, this product's name is "VeryDOC Printer Capturer", it is use Windows Hook Technology to hook all Windows Printers, intercept and capture all print jobs and save them to PDF, PS, EPS, EMF, TIFF, PNG, JPG, etc. formats.

VeryDOC Printer Capturer is a desktop Print Driver and a Printer Hook, that allows you to save to PDF and TIFF electronic document formats from Any Windows application and Any Windows Printer.

VeryDOC Printer Capturer is a useful software to intercept and capture print data which sent to a printer.

If you wish to use VeryDOC Printer Capturer software, please feel free contact us, we will assist you asap,

http://support.verypdf.com/open.php

VN:F [1.9.20_1166]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)
Intercepting data sent to a Windows printer, 10.0 out of 10 based on 1 rating

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!