AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Printing PCL file no longer works using file type ascii

  • 1.  Printing PCL file no longer works using file type ascii

    Posted Wed November 21, 2007 03:30 PM

    Originally posted by: SystemAdmin


    Initially printing was on AIX 5.3 TL04 to a Jetdirect attached network printer.
    The printer definition string to configure the printer in AIX was:

    /usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect -p hplj-4000 -D pcl -q pr333
    -h pr333 -x 9100
    We migrated to some new IBM hardware in September using AIX5.3 TL04 and the same printer definitions were applied to the new environment.

    Everything worked great except for 1 form. This particular form has nothing unusual in it and the form hasn’t changed before or after the migration. All other forms and files printed fine.

    I am able to print the form using one of the old print servers but on the new print server it comes out as 10 pages of blank, mis-aligned junk. Originally this printed the form on 1 page.

    I have compared the printer definitions between the two servers and compared the output of the lsvirprt command for the printer on both servers, there is no difference.

    As a test, I decided to try changing the virtual printer definition of the print file type from ascii to pass-thru. The form printed correctly after doing this.

    To make the change I used the command /usr/lib/lpd/pio/etc/piochpq –q pr333 –d hp@pr333 –d p

    I’ve compared the two systems and their printer definitons in both SMIT and lsvirprt commands, they are identical. Codepages on the two servers are the same. I am running out of things to look at.

    What in the “print file type” definition would allow pass-thru to work were ascii did not.


  • 2.  Re: Printing PCL file no longer works using file type ascii

    Posted Wed November 21, 2007 05:35 PM

    Originally posted by: SystemAdmin


    I am suprised that a formatted form would have worked in earlier versions. The difference between ASCII and passthrough is that in ASCII the printer adds cr to lf and counts characters per line and adds cr lf at the end of the line length and also adds ff at the end of the number of lines. So if there are unprintable characters such as escape sequences or graphics, these get counted and cr lf can be adding in the middle of things making a real mess. The other thing that is done in ASCII (qprt -da) is that character/code page translation is done. It may be possible that the default code page got changed during the TL upgrade. I can't say, but you might check the locale command on both systems to see if that is different. Passthrough makes no changes to files.

    I would say you can almost always use passthrough if you change the ct attribute so ct=\033&k2G
    This is done with the lsvirprt command or the chvirprt command. This tells the printer to add a cr to lf so the ASCII driver doesn't have to. If you don't do this you can get stare steps. A way to see this is as follows:
    lptest 5 10 | qprt -dp -P queuename

    If you change the ct attribute, this will print ok.

    Another things you can do to see what is really happening on the two levels of systems is to create a queue that prints to a file.

    1. touch /dev/lpx
    2. chmod +x 777 /dev/lpx
    Now make a print queue that prints to a file in the dev directory.
    Make sure to specify lpx as the file name.
    Now print your form to the new lpx queue and then you can see what is going on with vi, or even us
    od -ax /dev/lpx > /tmp/test1.out

    I described this in the Redbook 'Printing for fun and profit in AIX 5L'.

    Compare this output from both systems and you will see what is being done.

    I plan to do printer consulting for AIX in 2008 and can be reached at jwtesch@gmail.com for that purpose.

    I hope this helps,
    John