<?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: Printing from HPUX to a PC using remote in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428183#M355392</link>
    <description>Correct. A remote printer in HP-UX (SysV spooler) cannot do anything with -o options as they are only followed at the remote site -- and windows does not know anything about -o.&lt;BR /&gt; &lt;BR /&gt;The best way to implement this is to print through a filter made out of a model script that matches your destination printer. The lp spooler runs the file through a printer script and prepends escape codes in front of the job to carry out the -o options. Depending on how transparent you want to make this, you can just call a model script directly and supply the required options, and stdout from the script is then sent to the lp command.&lt;BR /&gt; &lt;BR /&gt;Windows just sends the file to the printer as is. While you can play with customizing on the Windows side, it is always the same (always landscape or always 12cpi, etc). &lt;BR /&gt; &lt;BR /&gt;If the model script is too much coding, you can simply prepend the escape sequences using cat:&lt;BR /&gt; &lt;BR /&gt;cat mylandscape.txt somefile | lp &lt;BR /&gt; &lt;BR /&gt;The file mylandscape.txt just has the required codes (one line).</description>
    <pubDate>Thu, 28 May 2009 00:38:52 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2009-05-28T00:38:52Z</dc:date>
    <item>
      <title>Printing from HPUX to a PC using remote</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428181#M355390</link>
      <description>After reading many posts, I was able to print to a Windows Queue, using Print Services for Unix in Windows, but there were posts that warned me that the options passed on a lp -oxxoption command will not work. I was wondering what kind of work around is available. I need to print landscape compressed and I'm wondering how to do this.&lt;BR /&gt;Should I put some escape characters on the begining of the file to achieve this, or is there a better way.</description>
      <pubDate>Wed, 27 May 2009 22:13:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428181#M355390</guid>
      <dc:creator>Donald Whitaker</dc:creator>
      <dc:date>2009-05-27T22:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Printing from HPUX to a PC using remote</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428182#M355391</link>
      <description>you might be able set up a print queue on the windows box that have those options selected as default, then create a remote printer from unix to the new queue.&lt;BR /&gt;&lt;BR /&gt;the problem is that you will need to print to different queues based on the desired output.&lt;BR /&gt;&lt;BR /&gt;I haven't tried this is several years, so I don't recall if this works or not.  &lt;BR /&gt;&lt;BR /&gt;On the other hand, depending upon the printer and interface, you might simply be able to set it up as a regular network printer and bypass windows altogether.&lt;BR /&gt;</description>
      <pubDate>Wed, 27 May 2009 22:37:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428182#M355391</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-05-27T22:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Printing from HPUX to a PC using remote</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428183#M355392</link>
      <description>Correct. A remote printer in HP-UX (SysV spooler) cannot do anything with -o options as they are only followed at the remote site -- and windows does not know anything about -o.&lt;BR /&gt; &lt;BR /&gt;The best way to implement this is to print through a filter made out of a model script that matches your destination printer. The lp spooler runs the file through a printer script and prepends escape codes in front of the job to carry out the -o options. Depending on how transparent you want to make this, you can just call a model script directly and supply the required options, and stdout from the script is then sent to the lp command.&lt;BR /&gt; &lt;BR /&gt;Windows just sends the file to the printer as is. While you can play with customizing on the Windows side, it is always the same (always landscape or always 12cpi, etc). &lt;BR /&gt; &lt;BR /&gt;If the model script is too much coding, you can simply prepend the escape sequences using cat:&lt;BR /&gt; &lt;BR /&gt;cat mylandscape.txt somefile | lp &lt;BR /&gt; &lt;BR /&gt;The file mylandscape.txt just has the required codes (one line).</description>
      <pubDate>Thu, 28 May 2009 00:38:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428183#M355392</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2009-05-28T00:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Printing from HPUX to a PC using remote</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428184#M355393</link>
      <description>Thank you for your replies.&lt;BR /&gt;I couldn't get the dedicated windows queue solution to work.&lt;BR /&gt;&lt;BR /&gt;I was able to build a script to pre and post append escape sequences before sending to lp.&lt;BR /&gt;&lt;BR /&gt;Here is my code that is based on a model script that Bill H. had previously posted:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# Truly dumb model script&lt;BR /&gt;export PATH=/usr/bin&lt;BR /&gt;export PATH&lt;BR /&gt;&lt;BR /&gt;FILES="$@"&lt;BR /&gt;# Print the spooled files&lt;BR /&gt;for LPFILE in $FILES&lt;BR /&gt;do&lt;BR /&gt;# cat "$LPFILE" 2&amp;gt;&amp;amp;1   # replaced by ux2dos command&lt;BR /&gt; echo "\033&amp;amp;k2S"       # Compress print&lt;BR /&gt; ux2dos "$LPFILE" 2&amp;gt;&amp;amp;1 &lt;BR /&gt; echo "\014\c"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This is generally working, except for after the job is finished the printer acts like data is still coming, then it goes to and alarm, then I clear the alarm and nothing else prints. I need that last sequence at the end to force a form feed or the end of my report does not print, but I suspect that it is not pefect. I have exprimented with different esc sequnces but none work any better.&lt;BR /&gt;&lt;BR /&gt;My other concern with this remote printer setup is, that if the remote desktop acting like a print server is not available my lpstat seems to hang. I guess it would eventually time out but I have always cntrl-c out of it. I am running on a HPUX 11.11 and I am thinking of setting up about 20 or more of these print servers, but I am worried that if a few of these devices are not available the lpstat may hang for a significant amount of time. Is there a way to decrease the time out on these devices.&lt;BR /&gt;&lt;BR /&gt;I am using remote printers because the desktops will be VPN into our private network. If I were to use traditional networked printers the remote networked printers would not be tunneled into our private network. Remote printers seemed to be an inexpensive solution, but I am concerned with what unavailabe devices will do to the overall performance, maybe there is a better way of doing this without committing to special hardware at each location?&lt;BR /&gt;</description>
      <pubDate>Thu, 28 May 2009 16:56:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428184#M355393</guid>
      <dc:creator>Donald Whitaker</dc:creator>
      <dc:date>2009-05-28T16:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Printing from HPUX to a PC using remote</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428185#M355394</link>
      <description>&lt;!--!*#--&gt;The \014\c is indeed required to force a page feed. The alarm is curious, but it may be an artifact of ux2dos -- the last character for a 'standard' DOS file is the ctrl-Z which may interfere with Windows spooling. You may want to use tr to change LF to CR/LF so the file is clean:&lt;BR /&gt; &lt;BR /&gt;ux2dos /etc/issue | xd -xc&lt;BR /&gt;0000000  6870  6433  3730  200d  0a1a&lt;BR /&gt;         h  p  d  3  7  0    \r \n 1a&lt;BR /&gt;000000a&lt;BR /&gt; &lt;BR /&gt;(the xd -xc displays the hex and ASCII characters as well as all control characters)</description>
      <pubDate>Thu, 28 May 2009 23:23:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428185#M355394</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2009-05-28T23:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Printing from HPUX to a PC using remote</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428186#M355395</link>
      <description>Almost forgot:&lt;BR /&gt; &lt;BR /&gt;&amp;gt; lpstat seems to hang&lt;BR /&gt; &lt;BR /&gt;Yep. The SysV lp is archaic and desperately needs a makeover. There isn't any fix at this point because both ends need the code improvements. That's why JetDirect is better (but still not robust for printer conditions). COme to think of it, Windows has a lot of problems with printer hangs too...&lt;BR /&gt;</description>
      <pubDate>Thu, 28 May 2009 23:30:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printing-from-hpux-to-a-pc-using-remote/m-p/4428186#M355395</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2009-05-28T23:30:51Z</dc:date>
    </item>
  </channel>
</rss>

