VOGONS


First post, by smevans526

User metadata
Rank Member
Rank
Member

Please help me understand PDLs (Page description languages). I suppose this thread need not be about old hardware, in fact what motivated me to write this thread concerns a new laser printer I bought. However, even its driver's can work on windows XP systems, so I think some of this technology is the same regardless of the system.

Let's make up a system: A mid-1990s Windows 95 system is connected to an HP LaserJet via serial. So the default PDL in use would be PCL. Further, the user is running Word 95 on the system, and just printing text, where any of Word's fonts are fair game. When they print, does Word generate the PCL language? Or, does Word talk to the print driver, and the driver from there generates PCL language, which is sent to the printer?

Of course this question could extend to arbitrary applications.

More questions to come.

Thank you

Reply 1 of 8, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Word talks to the Windows GDI, using primitives like 'write text' and 'draw line'. IIRC this step can be saved to a .WMF image file. If the target is a printer (as opposed to a window) then the GDI passes the commands along to the print subsystem and the printer driver. The printer driver then converts the GDI commands into something the printer can understand. This could be PCL, PostScript, or a proprietary format. Generally if it's PCL or PS then the driver will use the standard DLLs that ship with Windows to produce this rather than reimplementing a translator from scratch, but some drivers (e.g. HP) can come with their own translators as they no doubt believe they can do the job better than Microsoft's one.

I'm not sure whether it's the printer driver or the print subsystem that sends the data out to the device. I think it must be the print subsystem, because you can configure any driver to talk to a printer via serial, parallel, USB or network, so it must be the print subsystem that handles passing the data stream (whatever the format) out to the device.

Reply 2 of 8, by smevans526

User metadata
Rank Member
Rank
Member

Very informative, thank you.

So, the sequence (for a Microsoft application) is:
Word>>Windows GDI>>Print subsystem/driver>>(translate to PDL via .DLL[or other translator])>>(send PDL to printer)

So the generation of PCL or PS commands is an ability built into Windows?

So when they say a printer has PCL or PS 'emulation', they are talking about the printer's ability to interpret commands?

Reply 4 of 8, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Yes that's correct, to the best of my knowledge.

Yes, Windows ships with something named pscript.dll or similar. That renders PostScript commands from some other format, probably GDI. I'm not sure if it ships with a generic PCL translator as my experience is with PostScript MFDs, but it does ship with some PCL drivers so no doubt those files are available for other drivers to use too.

The GDI is a device independent set of drawing commands. You can use it to draw pictures onto a window, into a .wmf file, or onto a piece of paper via a printer or plotter. It's the same set of commands. A bit like how the same HTML can appear on a computer screen or be printed onto paper, whereas something like PCL is designed for drawing on paper only (there aren't many programs around that will render PCL on the screen for example.)

Some printers can natively speak PCL or PS, and in this case you can take a PostScript or PCL program and send it directly to the printer (with simple tools like "copy file.ps lpt1:") and it will print fully rendered. This is because the PCL/PS code is processed inside the printer itself. This is rather complex, so cheaper printers tend to use simpler solutions like accepting only an image file, requiring the computer (print driver) to do all the rendering and just submitting the final image to the hardware.

Since PCL and PS are owned by various companies, I believe you have to licence it if you want to include it in your printer (not sure about PCL but definitely for PS.) To avoid these expensive licensing fees, some companies have come up with their own PS interpreters that aren't using any licenced code. I guess they can't claim true PS support because they haven't paid the licence fee, so they call it "emulation" instead. From a user point of view there's no difference between genuine PS support and PS emulation, except for very rare circumstances where there's a bug in one PS interpreter and not another. I had an issue once with a Toshiba copier where it would staple documents for you, but because of a bug in its PS "emulation", when printing certain PDF files some of the pages would come out upside down. Normally you could just turn the page around but when the machine had already stapled it for you it looked a bit silly. Printing the same document on a Ricoh copier (with officially licenced PS support, no "emulation") produced the document without any problems.

Reply 5 of 8, by smevans526

User metadata
Rank Member
Rank
Member

Thank you, again.

What about fonts? Let's keep context still on the mid-1990s windows 95 machine, Word printing through GDI into eventually PCL. The diagnostics of my printer's PCL emulator produces 111 fonts, most scalable. I'm assuming this is the same for genuine PCL. Some fonts are bold/italic versions of their respective defaults.

So, how does Word/GDI manage to print non-PCL fonts like wingdings? Or, how does the PC/Printer manage to print fonts beyond the PCL font list?

I have a theory, but I won't risk making a fool of myself.

Reply 7 of 8, by smevans526

User metadata
Rank Member
Rank
Member
Malvineous wrote:

Since PCL and PS are owned by various companies, I believe you have to licence it if you want to include it in your printer (not sure about PCL but definitely for PS.)

Who is invovled in the owenership of these? I thought it was HP owns PCL and Adobe owns PS. Lexmark emulates PCL, so it looks like PCL too needs to be licensed.

Reply 8 of 8, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

I'm not sure on the details but since the specifications are readily available I suspect the ownership revolves around trademarked names and what you have to pay to use the trademark (and/or the software HP/Adobe provide.)

If you don't want to pay or can't use their software (e.g. your device has a MIPS CPU and they only provide ARM software) then you have to write it yourself and have to call it "emulation", can't use the official logo, etc. I imagine it works the same way that you can't call your cloned computer an IBM without getting sued, but you can call it IBM-compatible without any issues.