×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Embedded TrueType font in PCL does not print!

Embedded TrueType font in PCL does not print!

Embedded TrueType font in PCL does not print!

(OP)
Hi all,

I generated a PCL file containing an embedded TrueType font (Arial) via my own Java program.
The file displays fine in RedTitan escapeE and does not give me any errors there.

However, when sending the PCL file directly to a HP printer (HP Laserjet M5035 MFP) or various Lexmark printers (They all claim to be PCL5 printers), the text does not appear. I just get a blank page.

What could be the problem here?

Thanks for your help

BPWPCL

RE: Embedded TrueType font in PCL does not print!

If you can do a 'print to file' of your generated print stream, and send it to me, I can do some analysis on it and let you know if I find anything untoward.

Send it to d_a_n_s_d_a_d_@_b_t_i_n_t_e_r_n_e_t_._c_o_m (remove the '_' characters from this).

RE: Embedded TrueType font in PCL does not print!

(OP)
Hey,

thanks for the help offered.
I sent you an email.

Watch out for something from "@web.de"

BPWPCL

RE: Embedded TrueType font in PCL does not print!

I've replied to your e-mail with an analysis of your print stream, which indicates that the font header is not formatted correctly.

In particular, the checksum character is given as 0x00 (which is rather unlikely), and the last segment has an invalid identifier, although there may be other faults as well.

RE: Embedded TrueType font in PCL does not print!

(OP)
Thanks again for your analysis.

Those issues you've brought up are definitely a problem with the generated file.

I had a look at the font header and there's a lot more wrong with it than this.

Well, I think that's just what happens if you have to take over someone else's code.






RE: Embedded TrueType font in PCL does not print!

>> "Well, I think that's just what happens if you have to take over someone else's code."


Especially if the code is not well documented.

Creating a downloaded PCL Encapsulated TrueType Outline (PCLETTO) format font from a 'donor' TrueType font is not a trivial process.

What may help is to look at the equivalent mechanism (including sample 'C' code) for PCL XL (PCL6) fonts, as described in one of the HP documents available for PCL6 (see the 'PCL6 documentation' FAQ for details of where to get access to this).

The PCL5 process is very similar, the main difference being in the 'wrappers' round the bulk of the extracted header and character descriptions.

RE: Embedded TrueType font in PCL does not print!

(OP)
Checksum was not right, and there were a lot of strange overlaps in the segments due to address calculation mixups.

I fixed it yesterday. It works now.

Thanks again for the help

BPWPCL

RE: Embedded TrueType font in PCL does not print!

Esc(s1p8v0b0s4T

4T is close to arial type face

RE: Embedded TrueType font in PCL does not print!

The escape sequence:

{esc}(s1p8v0b0s4T

will, on most modern LaserJet (and clone) devices, select the printer-resident Helvetica font, which actually matches the characteristics:

{esc}(s1p8v0b0s24580T

where the typeface identifier 24580 is (6*4096)+4.

But BPWPCL was having problems with a downloaded font anyway, and not wanting to select a printer-resident font (I think that this was perhaps because the downloaded font contained more characters than the printer-resident typeface-equivalent font).

RE: Embedded TrueType font in PCL does not print!

The resident fonts on my LaserJets have many many code pages of characters, several thousand total.

RE: Embedded TrueType font in PCL does not print!

The current Arial font on Windows Vista contains 3381 glyphs, which are used in the construction of 2792 characters.

The Arial Unicode MS font contains 50377 glyphs, which are used in the construction of 38917 characters.

I don't know which of these the printer-resident Arial font on modern LaserJet devices most closely matches.

But that's all an aside; the original purpose of this thread was about problems with a downloadable soft font, not any of the printer-resident fonts, so I couldn't see the point of the reference to the resident-font selection escape sequence - that's all.

RE: Embedded TrueType font in PCL does not print!

I was only responding to DansDadUK about maybe the resident font didn't have enough characers.  You are right.

RE: Embedded TrueType font in PCL does not print!

We have an OEM product (TTFntPCL) that we made for EDS/Deloitte for the State of California that generates PCLETTO (.SFT) fonts from full Unicode TrueType fonts (we used ANDALWTJ.TTF with 45,000 Unicode cells).

They provide the UTF-8 text and tell us the language and we extract the appropriate Unicode glyphs from the .TTF to create a .SFT to embed in front of the text.  We also apply all the appropriate character substitutions, ligatures, etc.

The purpose of this tool is to allow anyone on the web to ask a question in their native language and have it print locally or convert it into a PDF using our PCLTool SDK tools.

We also just convert TTF into PCLETTO fonts.  Or, extract PCLETTO fonts from PCL5e/PCLXL print streams.

Regards,

Bob Pooley

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close