<?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: Using rmodel to insert printer escape sequences in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633544#M41834</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Send ESC sequence not support in remote printing , cause all formatting was done at printer owner. &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 20 Dec 2001 01:40:48 GMT</pubDate>
    <dc:creator>Printaporn_1</dc:creator>
    <dc:date>2001-12-20T01:40:48Z</dc:date>
    <item>
      <title>Using rmodel to insert printer escape sequences</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633543#M41833</link>
      <description>I have a LaserJet4 printer attached to my network via an Intel NetPort print server. This requires me to define this printer to my HPUX server as a remote printer with the BSD system option enabled.&lt;BR /&gt;&lt;BR /&gt;My goal is to customize an interface script (using rmodel as the starting point) so that the -olandscape option will actually work when used with the lp command.&lt;BR /&gt;&lt;BR /&gt;My lp command will look like this:&lt;BR /&gt;lp -dtestprtr -olandscape testfile&lt;BR /&gt;&lt;BR /&gt;Here are the changes I made to the /usr/spool/lp/interface/testprtr script (created from rmodel):&lt;BR /&gt;&lt;BR /&gt;for i in $5&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# check for 'regular' lp options&lt;BR /&gt;#&lt;BR /&gt;case "$i" in&lt;BR /&gt;     hpgl | hpgl2 | pcl | raw)  # Files assume no page breaks.&lt;BR /&gt;            BSDformat=-l&lt;BR /&gt;            ;;&lt;BR /&gt;     ps | postscript)   # Files contain Postscript data.&lt;BR /&gt;            BSDformat=-o&lt;BR /&gt;            ;;&lt;BR /&gt;#My changes start here&lt;BR /&gt;     landscape)&lt;BR /&gt;        sed -e '1s/.*/^[\&amp;amp;l1O/' -e '$s/.*/&amp;amp;^[E/' $6 &amp;gt; $6.new&lt;BR /&gt;        cp -f $6.new $6&lt;BR /&gt;            ;;&lt;BR /&gt;#My changes end here&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;This code results in escape sequence Esc&amp;amp;l1O (landscape orientation) being inserted at the beginning of the first line of the print file, and EscE (reset printer) being inserted at the end of the last line.&lt;BR /&gt;I have verified that this code does indeed result in the escape sequences being inserted at the proper places prior to the execution of the rlp command.&lt;BR /&gt;&lt;BR /&gt;The problem is, when the file prints on the printer, the printer ignores the escape sequences. Instead, the printable characters of the escape sequences simply print as text at the top and bottom of the print out.&lt;BR /&gt;&lt;BR /&gt;Now, the weird part is, if I do the following:&lt;BR /&gt;&lt;BR /&gt;sed -e '1s/.*/^[\&amp;amp;l1O/' -e '$s/.*/&amp;amp;^[E/' testfile &amp;gt; testfile.new&lt;BR /&gt;lp -dtestprtr testfile.new&lt;BR /&gt;&lt;BR /&gt;the printer DOES observe the escape sequences imbedded in the print file!!&lt;BR /&gt;I don't understand what is different in these two scenarios, because the content of the printfile should be identical in both.&lt;BR /&gt;&lt;BR /&gt;Any help would be appreciated.&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Dec 2001 23:25:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633543#M41833</guid>
      <dc:creator>Doug Weaver</dc:creator>
      <dc:date>2001-12-19T23:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using rmodel to insert printer escape sequences</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633544#M41834</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Send ESC sequence not support in remote printing , cause all formatting was done at printer owner. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Dec 2001 01:40:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633544#M41834</guid>
      <dc:creator>Printaporn_1</dc:creator>
      <dc:date>2001-12-20T01:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using rmodel to insert printer escape sequences</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633545#M41835</link>
      <description>I am having a similar problem.  I am trying to send my print in compressed form.  Have you had any luck with a solution?</description>
      <pubDate>Wed, 20 Feb 2002 15:09:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633545#M41835</guid>
      <dc:creator>Mark Ikenberry</dc:creator>
      <dc:date>2002-02-20T15:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using rmodel to insert printer escape sequences</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633546#M41836</link>
      <description>&lt;BR /&gt;This is strange. On our Laser4's and 5's the lp -olandscape option works fine with the standard printer model script -no customization necessary. Is there something strange with your printer setup ? are you routing prints through some non HP box (a PC or NT box or something) which is stripping off the landscape stuff, or is the printer setup aok ??&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Feb 2002 15:30:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633546#M41836</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-02-20T15:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using rmodel to insert printer escape sequences</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633547#M41837</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Try doing it without the BSD option selected.&lt;BR /&gt;&lt;BR /&gt;You have the same script but the spooler sends the -olandscape through when BSD is not selected.&lt;BR /&gt;&lt;BR /&gt;Otherwise&lt;BR /&gt;&lt;BR /&gt;Put echo "\033&amp;amp;l1O\c"  in another file and print by&lt;BR /&gt;&lt;BR /&gt;cat otherfile printfile|lp -dremoteprinter&lt;BR /&gt;&lt;BR /&gt;         Steve Steel</description>
      <pubDate>Wed, 20 Feb 2002 15:36:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-rmodel-to-insert-printer-escape-sequences/m-p/2633547#M41837</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-02-20T15:36:00Z</dc:date>
    </item>
  </channel>
</rss>

