<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: printer script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761068#M72465</link>
    <description>I have almost got my problem solved.  My poor knowledge of shell scripts has caused some delay.&lt;BR /&gt;&lt;BR /&gt;My script will now process the file correctly and every thing seems to work correctly as far as the 'rlp' line.  When the file that should be going to the printer is called 'dfA123ptihp1.job' I will get an error in '/var/adm/lp/log' stating that 'cfA123ptihp1.job' can not be found.</description>
    <pubDate>Fri, 12 Jul 2002 10:54:09 GMT</pubDate>
    <dc:creator>John Flanagan</dc:creator>
    <dc:date>2002-07-12T10:54:09Z</dc:date>
    <item>
      <title>printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761061#M72458</link>
      <description>I have configured some NT pc with winnt lps and set them for pass thorugh printing.  I have modified the printer scripts to add come control codes for font ptich etc.&lt;BR /&gt;&lt;BR /&gt;Is it possible to take an existing print script such as that for a laserjet 4 and get it to send it's output to the remote printer.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;&lt;BR /&gt;John.</description>
      <pubDate>Wed, 10 Jul 2002 13:02:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761061#M72458</guid>
      <dc:creator>John Flanagan</dc:creator>
      <dc:date>2002-07-10T13:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761062#M72459</link>
      <description>If you mean: print from HP-UX to the NT box, the answer is yes but with caveats. None of the -o options to lp will work as NT does not understand SysV print spooler options. Also, plain ASCII files will be sent as they appear on the disk (text-LF-text-LF...) which is printed exactly in that manner, stairstepping down the page. You'll have to fix the NT side to add CR to each ASCII file LF character.&lt;BR /&gt;&lt;BR /&gt;Othwewise, you'll have to add the CR before you print using: ux2dos file-to-print | lp ...&lt;BR /&gt;&lt;BR /&gt;Add the printer using SAM and the remote printer menu.</description>
      <pubDate>Wed, 10 Jul 2002 13:26:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761062#M72459</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-07-10T13:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761063#M72460</link>
      <description>Hi&lt;BR /&gt;If I understand you right you want to set up a remote printer on a HP-UX client to a printer on a Windows system.&lt;BR /&gt;&lt;BR /&gt;It is possible, but it is a job for a "hacker".&lt;BR /&gt;&lt;BR /&gt;Create a remote printer on the HP-UX client. Now you have got a interface script in /var/spool/lp/interface.&lt;BR /&gt;&lt;BR /&gt;Take a copy of the standard laserjet 4 interface script.&lt;BR /&gt;&lt;BR /&gt;This two scripts must be "merged" so the print processing is done on the local system to a temporary file and this preprocessed file is sent to the remote printer instead of the original file.&lt;BR /&gt;&lt;BR /&gt;When printing to a remote UNIX printer the print processing normaly is done remote.</description>
      <pubDate>Wed, 10 Jul 2002 13:28:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761063#M72460</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2002-07-10T13:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761064#M72461</link>
      <description>Leif,  That is exactly what i want to do.  As far as I can make out the stty statement is used to capture standard output and send it directly to the printer.  &lt;BR /&gt;&lt;BR /&gt;Is it easy to change this to send it all to a file say $1.tmp.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;John.</description>
      <pubDate>Wed, 10 Jul 2002 13:56:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761064#M72461</guid>
      <dc:creator>John Flanagan</dc:creator>
      <dc:date>2002-07-10T13:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761065#M72462</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Just enclose the part of the script&lt;BR /&gt;that  contains  echo  and cat  in&lt;BR /&gt;(  )  &amp;gt;  unique_file_name&lt;BR /&gt;&lt;BR /&gt;and everything that otherwise would have&lt;BR /&gt;gone to the printer now goes to unique_file_name.&lt;BR /&gt;Normally you would use the PID as part&lt;BR /&gt;of the file name. Ex  /tmp/$$file_name&lt;BR /&gt;&lt;BR /&gt;Olav</description>
      <pubDate>Wed, 10 Jul 2002 14:09:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761065#M72462</guid>
      <dc:creator>Olav Baadsvik</dc:creator>
      <dc:date>2002-07-10T14:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761066#M72463</link>
      <description>Hey John,&lt;BR /&gt;&lt;BR /&gt;You're in luck. I'm doing what you want to do with the attached interface script. However, my remote printers are no going through Windows servers, but rather directly to network attached printers. So I don't know for sure if this will work for you.&lt;BR /&gt;&lt;BR /&gt;Study it carefully. It does all its work in the printer's spool directory (/var/spool/lp/request/&lt;PRINTER&gt;). It uses the PCL5 model script to format the print job (if required) before giving it to rlp.&lt;BR /&gt;&lt;BR /&gt;You must make sure the model scripts you will use are executable or the script will fail, disable the queue, and bitch about it via email to the lp admin. So do this:&lt;BR /&gt;&lt;BR /&gt;chmod 555 /usr/lib/lp/model/PCL*&lt;BR /&gt;&lt;BR /&gt;To setup the printers, just create remote printers like you normally would. Then replace the interface script in /etc/lp/interface with this script.&lt;BR /&gt;&lt;BR /&gt;&lt;/PRINTER&gt;</description>
      <pubDate>Wed, 10 Jul 2002 15:32:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761066#M72463</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2002-07-10T15:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761067#M72464</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I had a look at the laserjet4 model script in /var/opt/lp/model. It is rather complex but not difficult to understand. The script "echo" a lot of escape seqences and then finaly "cat" the file. This means evrything (with the exceptin of errors) is written to stdout. The stty commands is for serial ports, in your case you should remove them.&lt;BR /&gt;&lt;BR /&gt;Some ideas:&lt;BR /&gt;&lt;BR /&gt;Define a "modified" version (without stty) of the laserjet4 model interface script as a function in the main interface script.&lt;BR /&gt;&lt;BR /&gt;Call this function with the nessesary parameters from the main script and redirect the output from this function to a temporary file.&lt;BR /&gt;&lt;BR /&gt;Send this temporary file to the remote printer with rlp.&lt;BR /&gt;&lt;BR /&gt;This need some work and it is not simple but it is not impossible.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Jul 2002 19:00:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761067#M72464</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2002-07-10T19:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761068#M72465</link>
      <description>I have almost got my problem solved.  My poor knowledge of shell scripts has caused some delay.&lt;BR /&gt;&lt;BR /&gt;My script will now process the file correctly and every thing seems to work correctly as far as the 'rlp' line.  When the file that should be going to the printer is called 'dfA123ptihp1.job' I will get an error in '/var/adm/lp/log' stating that 'cfA123ptihp1.job' can not be found.</description>
      <pubDate>Fri, 12 Jul 2002 10:54:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761068#M72465</guid>
      <dc:creator>John Flanagan</dc:creator>
      <dc:date>2002-07-12T10:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761069#M72466</link>
      <description>Problem solved.  Thanks everybody for the help.  My script is attached if it is of any use to anyone.</description>
      <pubDate>Fri, 12 Jul 2002 12:10:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761069#M72466</guid>
      <dc:creator>John Flanagan</dc:creator>
      <dc:date>2002-07-12T12:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: printer script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761070#M72467</link>
      <description>Sorry. correct version.</description>
      <pubDate>Fri, 12 Jul 2002 12:15:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-script/m-p/2761070#M72467</guid>
      <dc:creator>John Flanagan</dc:creator>
      <dc:date>2002-07-12T12:15:00Z</dc:date>
    </item>
  </channel>
</rss>

