Page Description Langauge primer

Discussion about old PC hardware.

Page Description Langauge primer

Postby smevans526 » 2018-2-05 @ 21:29

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
smevans526
Member
 
Posts: 124
Joined: 2015-4-17 @ 00:26

Re: Page Description Langauge primer

Postby Malvineous » 2018-2-05 @ 22:50

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.
User avatar
Malvineous
Oldbie
 
Posts: 554
Joined: 2006-6-11 @ 02:24
Location: Brisbane, Australia

Re: Page Description Langauge primer

Postby smevans526 » 2018-2-05 @ 23:33

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?
smevans526
Member
 
Posts: 124
Joined: 2015-4-17 @ 00:26

Re: Page Description Langauge primer

Postby smevans526 » 2018-2-05 @ 23:34

Malvineous wrote:If the target is a printer (as opposed to a window)


What do you mean by 'opposed to a window'?
smevans526
Member
 
Posts: 124
Joined: 2015-4-17 @ 00:26

Re: Page Description Langauge primer

Postby Malvineous » 2018-2-06 @ 01:02

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.
User avatar
Malvineous
Oldbie
 
Posts: 554
Joined: 2006-6-11 @ 02:24
Location: Brisbane, Australia

Re: Page Description Langauge primer

Postby smevans526 » 2018-2-06 @ 21:49

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.
smevans526
Member
 
Posts: 124
Joined: 2015-4-17 @ 00:26

Re: Page Description Langauge primer

Postby NJRoadfan » 2018-2-06 @ 21:51

TrueType fonts are uploaded to the printer in many cases. If not, an on-board font is used to substitute whats seen on screen.
NJRoadfan
Oldbie
 
Posts: 911
Joined: 2012-5-26 @ 03:54
Location: Northern NJ

Re: Page Description Langauge primer

Postby smevans526 » 2018-2-06 @ 21:52

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.
smevans526
Member
 
Posts: 124
Joined: 2015-4-17 @ 00:26

Re: Page Description Langauge primer

Postby Malvineous » 2018-2-07 @ 00:20

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.
User avatar
Malvineous
Oldbie
 
Posts: 554
Joined: 2006-6-11 @ 02:24
Location: Brisbane, Australia


Return to General Old Hardware

Who is online

Users browsing this forum: erek, lost77, shock__, SpeedySPCFan and 14 guests