Ask Experts Questions for FREE Help !
Ask
    Curlyben's Avatar
    Curlyben Posts: 18,514, Reputation: 1860
    BossMan
     
    #1

    Apr 2, 2008, 03:33 AM
    PCL coding for printer
    Yes, I am asking a seriously techie question as I'm stuck.

    Right then.

    This is for printers from our ERP system, QAD's MFG Pro EB2.1 on Progress 10.
    I'm trying to recode or printers to scale print jobs on to A4 paper.
    Now I have found the coding for the paper, but cannot work out how to get it to scale.
    At present it prints as 6 columns, this is fine for reports that are that size, but smaller reports are badly formatted.

    Here's the printer code that I'm trying to change:
    HP Laser

    80 column start:
    Code:
    /027E/027&l0O/027(0U/027(s0p18h8.5v0s0b0T/027&l66P
    /027&l2E/027&l7.8689C/027&l66F/027&k2G
    132 column start:
    Code:
    /027E/027&l0O/027(0U/027(s0p16.66h8.5v0s0b0T/027&l
    66P/027&l2E/027&l7.8689C/027&l66F/027&k2G
    Basically I want the print jobs to fit the page (scale) to A4.
    Any help would be great as I'm seriously stuck.
    donf's Avatar
    donf Posts: 5,679, Reputation: 582
    Printers & Electronics Expert
     
    #2

    Apr 2, 2008, 11:43 AM
    Ben

    The first problem is that you are using ASCII instead of HEX is that a limitation of your software?

    Next, you start each control string with the printer reset command (/027E or H 1BE). That all by it's self should cause the printer to finish the print the contents on the current job then execute the remainder to the escape sequences.

    I don't have my PCL book with me because I'm tyke sitting and the two of them are taking naps, one in the crib and the other in his carrier right in front of me. I'll toddle off to office a grab the book and translate the code strings.

    BTW, why don't you just use PJL to set the page size to A4? I'd place the page size in the PJL Header that you send down in front of the job.

    Can you send the failing print jobs to "file" and then e-mail them to me at [email protected]? This way I can see exactly what the printer is looking at.
    Curlyben's Avatar
    Curlyben Posts: 18,514, Reputation: 1860
    BossMan
     
    #3

    Apr 2, 2008, 12:55 PM
    Thanks for looking in Donf, I knew you'd be The Man for the job.

    The coding comes from the ERP systems interface screen hence the ASCII coding.
    I'm not sure if PJL coding would be acceptable at all.
    Now the print jobs don't fail as such, but print allowing 6 columns, rather than scaling to the page.
    I'll try and output to a file, but I'm not sure I can force the ERP system to do that. Normally file output produces a text file rather than a printer file.
    donf's Avatar
    donf Posts: 5,679, Reputation: 582
    Printers & Electronics Expert
     
    #4

    Apr 2, 2008, 04:20 PM
    While I was waiting for my son to get out of work I took another look at the command sequences.

    One major problem is that you are trying to use a command to move vertically by an invalid interger.

    The command: ESC &l7.8689C is incorrect. This command will only work if you use an interger. Also, the command move vertically by7/48. Each inch is divided into increments of 48. It should be ESC&l7C not 7.8689
    donf's Avatar
    donf Posts: 5,679, Reputation: 582
    Printers & Electronics Expert
     
    #5

    Apr 4, 2008, 12:27 PM
    Ben,

    I've pretty much debugged your test file. The main problem seems to be that you are using "/027" to try to get the escape code to work. The printer needs you to do an :<alt>027 so that it can place the 0x1b escape character You should be seeing parts or all of your escape sequences printing on the page. When escape codes are working, you will see the effect of the code, not the code itself.

    I created a test file for you named C_Ben.asc. I had to email it to myself because my wireless network has been crashing from time to time today.

    When I get the file, I will append it here. When you get the file, copy it to a printer, just as it is. You should get two pages out. Page one will be a test of your codes, after I fixed them and page two will be a page showing you the various effects of changing the Vertical Motion index and the Horizontal motion index.
    donf's Avatar
    donf Posts: 5,679, Reputation: 582
    Printers & Electronics Expert
     
    #6

    Apr 4, 2008, 02:46 PM
    Ben here's the test file.
    Attached Files
  1. File Type: txt C_Ben.txt (1.5 KB, 335 views)
  2. djames8y's Avatar
    djames8y Posts: 1, Reputation: 1
    New Member
     
    #7

    Dec 2, 2008, 07:17 PM
    Some of these answers are wrong
    /027 is correct escape sequence for this code

    You most likely have a conflict with the code page size versus margin versus length
    donf's Avatar
    donf Posts: 5,679, Reputation: 582
    Printers & Electronics Expert
     
    #8

    Dec 4, 2008, 06:49 AM

    None of the answers were wrong.

    The problem was the insertion strings were required to use the "/027" string to flag the escape character.

    That particular format has not been used since it was a Lotus Notes requirement.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Color coding on line does not match jack color coding [ 11 Answers ]

The line going into the old phone jack has orange, green, blue and 3 white wires in it. Bought a new jack at Radio Shack and the colors of the wires in the replacement jack are red, green, black and yellow. Verizon repair was at best, snotty in telling me "we cannot tell you how to do repairs...

Calling all Lexmark X6570 Printer Owners - Is my printer damaged? [ 3 Answers ]

Hello, I just purchased a Lexmark X6570 Printer(wireless printing, faxing, photo printing, scanning, copying, and printing all in one). I now need the help of others who own this printer as well because I'm not sure if I purchased a faulty/damaged printer. I have installed the printer and...

Adobe PDF Printer disappears off printer group [ 2 Answers ]

I have been using Adobe Acrobat Professional 6 for several years (have 2003 version) and all of a sudden when I attempt to convert a Publisher Document to a PDF document using the 'printer' the Adobe PDF Printer and/oris missing from list of available printers. I have removed the Adobe Acrobat...

Vista Printer Driver for NEC SuperScript 870 Printer [ 0 Answers ]

Need a Vista Printer Driver for my NEC SuperScript 870 Printer.

Coding a c++ program [ 2 Answers ]

I need a fast help to code the following program which is really easy: I have to develop a program to analyze one or more numbers entered by a user and see if the number is a prime # or a perfect # and out put a list of divisors of all perfect numbers and noneprime numbers. Hint: A prime # is...


View more questions Search