Click here to Skip to main content
14,920,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to find out what data is sent to the printer driver when we print. For example when I print from NotePad or Word, what is actually passed to the printer driver before it converts the data for printing?

What I have tried:

I would like to understand more about the process of printing.
Posted
Updated 4-May-21 0:25am

Seriously? It depends on the app, the printer, the driver, and a host of other things.

You aren't going to find a simple solution to your problem - three questions on it now, or is it four? - other than modify your app to save the data while it is a sensible, readable form as part of your app data - before it gets anywhere near the actual printer!
   
Comments
nkm00e 4-May-21 4:36am
   
Thank you for the reply. I just wanted to understand how printing works in general.
OriginalGriff 4-May-21 5:19am
   
It's "done" by drawing onto a device context, which is provided by the system and is "Generic" to an extent and shared with the printer driver. you app draws text, images, lines, etc. onto that and it is translated by the driver into language the printer itself understands - which could be almost anything, and will be specific to a particular printer or range of printers within a manufacturers product line. That data is sent to the hardware printer, but none of it is of any use to anyone past the original "draw this here" commands which convert the text and graphics into context-friendly pixel information.
Text in particular does not survive this stage: it's all pixels from there onward - so it's of no use whatsoever to you as a storage medium!
nkm00e 4-May-21 5:28am
   
Hi, thank you so much for the explanation. Just to clarify, so the useful data is the document data that we send to the driver, and not the one that the driver will send to the printer?
OriginalGriff 4-May-21 6:18am
   
Absolutely.
nkm00e 4-May-21 9:16am
   
Thank you for the help.
   
Comments
nkm00e 4-May-21 9:16am
   
Thank you for the help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900