Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query printer fonts

Status
Not open for further replies.

rveina

Programmer
Aug 4, 2003
9
RO
Is there a PCL sequence that I can send to a printer to make it print its available fonts ? I saw this once, but I don't know how is it done.
 
I don't know of an escape sequence, but there may be a control panel mechanism to print out a typeface listing. This is typical on a LaserJet.

Jim Asman
jlasman@telus.net
 
I don't know of a sequence which will cause the printer to print a typeface list.

However, the following sequence, when sent to the printer on either an IEEE 1284 parallel port, or a TCP/IP/JetDirect connection, will cause the printer to return font selection details on the back channel:

Code:
<Esc>*s3t         Status Readback Location Type: Internal
       0u         Status Readback Unit: All
       4I         Inquire Status Readback: Font Extended

Of course, you will need something to read the response; rather than reinvent the wheel, join the HP Developer Association at as an Affiliate (for free), and download their Status Readback Tool from &quot;Developer Kits | LaserJet | LaserJet Communications | LaserJet Communication Tools and Code&quot;
 
You can apparently use PML (Printer Management Language) on most modern LaserJets to print various information (and to do lots of other things as well).

To print a PCL typeface list, send the following:
Code:
<esc>%-12345X@PJL DMINFO ASCIIHEX=&quot;040004010105020402015E&quot;<lf><esc>%12345X
where <esc> represents Escape (0x1b)
<lf> represents LineFeed (0x0a)

I've no idea whether it works OK, as I don't have an HP LaserJet printer here - it has NO effect on my local Brother HL-1270N.
 
I missed out a hyphen from the terminating UEL sequence in the post about using PML. Sorry.

Have now tried it on several HP devices:
Code:
  - HP4M+     no effect
  - HP4Si     no effect
  - HP5000GN  causes printer to produce PCL Typeface list
 
There is also a PCL sequence which can be used to send PML commands:
Code:
    <esc>&b#W[data]
where the data part is in the form:
Code:
    PML<sp><PML command>
but only SET and DISABLE PML commands will be actioned; UNSET or DISABLE commands will be ignored.

I'm not sure whether the 'PML command' in the above takes the same format as in the PJL DMINFO equivalent, so I haven't tried this yet, although I DO know that the hex(04) in the PJL example above indicates a SET command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top