-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Archived Topics
- Printers Archive
- PCL symbol set on P2035

Create an account on the HP Community to personalize your profile and ask a question

03-07-2016 09:02 AM
After changing from Win Vistax32 to Win 10x64, I find that I'm getting an unknown symbol set when sending PCL commands to my (new) P2035. When sending PCL font command for: Roman 8/CG Times, I get:
1!2#+0#-)/#-+"/ instead of "now is the time". I've tried many other combinations, but still get weird symbol set. Other PCL commands, ie, tray selection, pitch, spacing, etc. work fine. Any suggestions?
Solved! Go to Solution.
Accepted Solutions
03-15-2016 06:01 AM
>> ... With that info, I've decided to use the dBase "? 'abcde' STYLE arial,12" for font selection, and use PCL for what is working, ie, source tray selection, etc. ...
Good that you've now got some sort of circumvention / resolution.
>> ... use the Windows Printer Dialog box, but the "Print to File" checkbox doesn't function ...
I've no idea why that should be.
>> ... the problem is not with the printer or PCL 5 driver, but rather with the Win 10x64/dBase environment ...
If my diagnosis was correct (I'm at least 99% confident) the problem is that:
- The printer driver is assuming, or being told, that the default font is not printer-resident.
- So it downloads a soft font, which is 'obfuscated' and it expects to obfuscate the text data to suit.
- You were then trying to inject PCL escape sequences to select a printer-resident font - but you are not cancelling the 'obfuscating' of the following text data (the only way to do this would be via the DBase ??? command).
The only thing I'm not sure about is why the printer driver is setting the initial default font to be a downloaded soft font, rather than one of the standard printer-resident ones; I don't know whether this is some sort of driver default, or that the DBase system is selecting this font as the default?
03-09-2016 07:18 AM
>> ... When sending PCL font command for: Roman 8/CG Times, I get:
>> ... 1!2#+0#-)/#-+"/ instead of "now is the time" ...
I'd need to see the exact escape sequence(s) and subsequent data which you are sending.
If your application allows it, 'capture' a sample print job, using the 'Print to file' option in the Print dialogue (or equivalent if you are using a bespoke application which does not use a standard Windows printer driver).
Then analyse the content of the captured .prn file.
You can use the PRN File Analyse tool in the PCL Paraphernalia application (available via http://www.pclparaphernalia.eu ) to help with this; post the relevant part of the analysis in a reply (use the Insert Code button).
... or send the .prn file to the Support mailbox associated with that site (see the Contact page).
03-09-2016 10:31 AM
... and when you refer to "... sending PCL commands ..." are you implying that you are using something like the PRINT field code available within Microsoft Word to inject bespoke PCL sequences, at certain points, into the print job generated by a standard Windows printer driver?
If so, it may be that the generated print job is using a downloaded soft font, but that this font is 'obfuscated' (as is quite common with such fonts, to avoid licence contraventions), so the text data is modified to suit the obfuscation used (which will change with each document).
If you are just attempting to change the referenced font, the text data will still be obfuscated.
Which begs the question - why not just change the font in the source document?
03-09-2016 02:01 PM
Thanks for the replies - I appreciate the interest!
A little background: The app is on dBase Plus 2.7, and the system is for a national sports car club which I originally developed in 1987 on dBase III+. The PC (HP 550-110) is connected to the P2035 Laserjet via parallel port. The driver for the P2035 is HP Universal Printing PCL 5 (v6.1.0). The command format below worked fine on Vista-32.
The PCL commands are send by streaming text, as below:
??? chr(27)+"(8U" +chr(27)+"(s0P"+chr(27)+"(s12H"+chr(27)+"(s10V"+chr(27)+"(s0S"+chr(27)+"(s4101T"
?"now is the time 1234"
To send the sequence, I'm using dBase printer commands:
Chooseprinter()
set print on
???...
set printer off
close printer
When I change some of the font parameters, it can sometimes change the printed characters.
For the test text above, I'm now getting:
4!5#'3#1-)#1'")#+,67 - printed (correctly) in CG Times, fixed space, 12cpi, 10 point, upright, medium stroke. Without the escape sequence, it comes up in plain old (default) courier - so the PCL commands are getting through, but somehow garbled.
When I send the above text to a file, it shows only the "now is the time 1234".
03-10-2016 05:34 AM
Simple comments first:
Your PCL font selection sequence:
<Esc>(8U Primary Font: Symbol Set (8U = Roman-8) <Esc>(s0P Primary Font: Spacing: Fixed <Esc>(s12H Primary Font: Pitch (12 characters per inch) <Esc>(s10V Primary Font: Height (10 points) <Esc>(s0S Primary Font: Style (Upright, solid) <Esc>(s0B Primary Font: Stroke Weight: Medium <Esc>(s4101T Primary Font: Typeface (4101 = CG Times)
(where I've added in the sequence for the stroke weight which you alluded to) will not select the CG Times font (assuming this to be one of the printer-resident fonts on your printer model - as a fairly standard LaserJet font, I think that it is, but don't know for sure).
This is because:
- CG Times (in common with almost all the internal fonts on LaserJet printers) is a proportionally-spaced font, not a fixed-pitch font.
- The spacing characteristic is the most significant font selection attribute (apart from the symbol set attrribute).
- As you've specified fixed-spacing, the printer will oniy consider fonts which match this, so the potential candidates will be limited to the scalable Courier or Letter Gothic fonts, although the (fixed-size) bitmap Line Printer font may also be a candidate (although it wouldn't with different pitch and size attributes), since none of these will match the Typeface attribute (which, being the least significant, will be discarded in the search for a "closest match").
The appropriate escape sequences to select the (proportionally-spaced) CG Times font would be:
<Esc>(8U Primary Font: Symbol Set (8U = Roman-8) <Esc>(s1p Primary Font: Spacing: Proportional 10v Primary Font: Height (10 points) 0s Primary Font: Style (Upright, solid) 0b Primary Font: Stroke Weight: Medium 4101T Primary Font: Typeface (4101 = CG Times)
where I've used 'combination sequences' instead of separate sequences for those sequences which share the same 'root'.
03-10-2016 05:52 AM - edited 03-10-2016 06:40 AM
I still think that the most likely explanation for your symptoms is that (for whatever reason) the printer driver is assuming that you want to use a font which is not one of the internal printer-resident fonts, so it dynamically contructs and downloads a soft font equivalent of whatever TrueType display font on the workstation is being assumed to be the one required.
But such font downloads use obfuscation (to try to prevent people making permanent use of fonts which have certain restrictive licence).
So what may be sent to the printer is:
- A soft font download, containing only the characters required by this print job, but obfuscated so that the character codes of the soft font characters are not the original ASCII text character codes.
- The text to be printed, but obfuscated in the same way.
So (for example) if the document only used the characters abc (and they were first encountered in that order in the source document), then the soft font may associate the glyphs (character shapes) for those characters with the obfuscated character codes !"#, and the text abcba would be obfuscated as !"#"!.
03-10-2016 06:03 AM - edited 03-10-2016 06:41 AM
So:
- I think that your "now is the time 1234" text will be obfuscated, as explained above.
- I don't know why your font selection sequence is also not obfuscated - perhaps it is, except for the (non-graphic) escape characters?
- Even if your selection sequence was not obfuscated, it is invalid (as explained in an earlier reply), so I'm not sure just what effect (if any) it would have.
- But if we assume that the selection sequence (or an obfuscated version of it) did have the effect of selecting one of the printer-resident fonts, then the fact that the original ASCII text data has been obfuscated would probably result in your observed symtoms.
03-10-2016 06:25 AM
What I don't know anything about is Dbase, or how output from its print function interacts with the printer control sequences generated by your Windows Universal Printing PCL 5 (v6.1.0) printer driver.
... and the only way I'd probably know more (and hence perhaps be in a position to suggest a workaround) would be to analyse a 'captured' print job generated by this combination.
If your application doesn't provide access to the standard Windows Print dialogue (and hence you can't select the 'print to file' option), you may still be able to capture a sample print job, as follows:
- For the relevant Windows printer instance, make sure that other users/applications do not want to print to it for the duration of the exercise.
- Take careful note of the details of the current Port associated with the printer instance (from some of your other comments, perhaps it is currently LPT1:?)
- Change the port to FILE: (you may need administrative access to do this).
- Print a small test file (which includes your PCL sequences) from your Dbase application.
- You should (hopefully) be asked to nominate a path and name for the target .prn capture file.
- Change the port back to the original value.
- Analyse the captured .prn file (or send it to me for analysis) as explained in an earlier response, as this should confirm what is going on, and may (but, of course, may not) lead to a possible workaround.
03-10-2016 12:41 PM
A lot to think about...
As to the validity of the esc sequence I'm sending - as noted, I've tried many print parameter combinations with similiar results. To confirm, I did 2 tests:
Using the "Font Selection Example" from chapter 8-21 of the "HP PCL Printer Language Tech Ref" (and still testing "now is the time 1234"), it prints:
789%#!%20(%2#5(%*:;<
but in the pitch, spacing, font, etc. as specified in the esc sequence.
I also used the esc sequence you indicated above, and got exactly the same character output - except in the pitch, spacing, font, etc that your command specified.
I did the "print to file" from the Windows printer dialog box, but the file just contained test text as sent.
I'm inclined to believe the fault lies in the HP PCL 5 driver. Beyond that, I'm out of ideas, and about ready to throw in the towel.
