Link to home
Start Free TrialLog in
Avatar of WDShelly
WDShellyFlag for United States of America

asked on

escape codes for Canon 5255 printer

My office used to have a couple of Canon 3200 printers and we have an old ERP program that we would send a printer escape code to and it printed out reports from the ERP system in landscape. This was the string we sent:

  ~E&l1o8d0L~E(s13h3b      

I replaced those 2 old Canons with 2 new Canon ImageRunner Advance C5255 printers and that same code gives an error at the printer (something like "unsupported file format").

I think  0o = portrait and 1o = landscape, and 6d = 6 lines per inch and 8d = 8 lines per inch. I need to find an escape code that will work for these new printers. Thanks in advance for any help anyone can offer.
Avatar of DansDadUK
DansDadUK
Flag of United Kingdom of Great Britain and Northern Ireland image

With the assumption that your "~E" place-holder is intended to represent the Escape control-code character (the character with decimal code 27, or hexadecimal 1B), then your sequences have the following interpretation when considered as PCL5 escape sequences.

Offset         Type                   Sequence          Description
-------------  ---------------------  ----------------  ----------------------------------------------------

0000000000     PCL Parameterised      <Esc>&l1o         Orientation: Landscape
0000000005                                   8d         Line Spacing (8 lines-per-inch)
0000000007                                   0L         Perforation Skip: Disable
0000000009     PCL Parameterised      <Esc>(s13h        Primary Font: Pitch (13 characters per inch)
0000000015                                   3B         Primary Font: Stroke Weight: Bold

Open in new window

Attached is a file containing the referenced PCL sequences.

Note:
If your printer does  not support PCL5, then these sequences may be ignored, or may cause errors to be reported. Perhaps your new printer needs an add-on in order to support PCL5?
I've corrected the termination character (which should be upper-case) of the last sequence to be "B" rather than "b".
This font selection sequence will only work as expected if the current font (as selected via another escape sequence, or as per the default set on the printer control panel) is a fixed-pitch font (Courier, Letter Gothic) rather than a proportionally-spaced font (most of the rest e.g. Arial, Times New Roman).
snippet.prn
ASKER CERTIFIED SOLUTION
Avatar of DansDadUK
DansDadUK
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of WDShelly

ASKER

Thank you, DansDadUK. I'll try your code soon.
I'm starting to think that we don't have PCL on this printer. It can handle PostScript and Canon's UFR II and can direct print jpegs and other formats, but the config does not show any PCL compatibility. I'm working with Canon on this and will definitely follow up when I know more and I will certainly award points when I know more. This may take 2 weeks since I'll be out of town soon...
DansDadUK,

I'm going to award you points right now while I wait for Canon to come onsite and enable PCL. I don't want you to have to wait to be rewarded for your input.
As I wrote in the ticket, I want to reward you now while I'm waiting for Canon to come and enable PCL on these printers.
Thank you. I hope all goes well.
I know this is an old link, but would your ERP software be SyteLine by chance? We just purchased a Canon ir-Adv-C5255 and had the same issue. The UFRII does not work so we had to get the PCL6 driver. I am still having some issues with printing. I can get a page to rotate landscape but when I try to condense the text it does not work. Any thoughts would be appreciated.