I am trying to understand my options for communicating programmatically with a printer to get something printed from application software. In other words, what happens when the user tells my application they want to print something. I understand the way it worked in the 'old days', and am trying to understand the more complex modern world.
In the old days, there were two main types of printers: HP printers that understood HPGL and Postscript printers. So, you could send your print out in either of those two languages and the printer would convert your code to dots on the page. You could also embed a bitmap as binary data. For example, in HPGL (or PCL) you could give a command that would basically says 'please print this bitmap, and here is the raster data' followed by a gigantic blob of binary data. Obviously if you did this the amount of data going to the printer would be a lot more and could choke the printer. Postscript had the same ability. If you printed text, you could tell the printer to print text 'xyz' in font TimesNewRoman (or whatever) and the printer would calculate all the dots for you (which meant the printer had to know the font, or you had to download the font to the printer ahead of time).
Now, as I understand the PDF format it is similar to Postscript, but it is not a language like Postscript and can only include 'objects'. So, for example, in Postscript you can make a loop and say 'print this circle 50,000 times', moving its exact location around. In PDF my understanding is that you can't do this, you have to specify each and every circle as a separate 'object'.
So, how do modern printers work? Can I still send HPGL/PCL to a printer? Are all printers now standardized on Postscript?
If so, does that mean my best option is to generate Postscript and then send that raw to the printer? If I do send Postscript, do I have to tell the printer somehow that it is Postscript somehow? In Windows, I know the 'standard' way to print, which is to query device capabilities and request a device context, then you can draw lines, shapes and text using Windows calls on that context. However, obviously this is extremely primitive compared to Postscript (or HPGL/PCL). Download Anime Green Green Ova Sub Indo.