<?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: Duplex printing with ODS PDF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Duplex-printing-with-ODS-PDF/m-p/8673#M2878</link>
    <description>Thank you Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
I see now that a lot of my problems were caused my confusing the printer destination with the printer family terminology.  Having both ODS PRINTER and ODS PDF available is really quite helpful since I can use PRINTER to print the report and PDF to write an archive copy.&lt;BR /&gt;
&lt;BR /&gt;
I tried your small sample program and got it to work except that I could not get the printer= option to work.  I am able to use the sysprint system option to point to my printer.&lt;BR /&gt;
&lt;BR /&gt;
Here is a paraphrase of the program that works:&lt;BR /&gt;
[pre]&lt;BR /&gt;
options&lt;BR /&gt;
   duplex &lt;BR /&gt;
   binding = longedge&lt;BR /&gt;
   sysprint = "\\PPWPRN01\PTCENA114"&lt;BR /&gt;
   ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
&lt;BR /&gt;
ods printer&lt;BR /&gt;
   style = listing&lt;BR /&gt;
   columns = 2&lt;BR /&gt;
   uniform&lt;BR /&gt;
   ;&lt;BR /&gt;
&lt;BR /&gt;
ods pdf&lt;BR /&gt;
   style = listing&lt;BR /&gt;
   columns = 2&lt;BR /&gt;
   uniform&lt;BR /&gt;
   file = "&lt;LOCATION of="" pdf="" output="" file=""&gt;
   ;&lt;BR /&gt;
&lt;BR /&gt;
proc report&lt;BR /&gt;
…&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
ods printer close;&lt;BR /&gt;
ods listing;&lt;BR /&gt;
&lt;BR /&gt;
(I cannot get the closing pre tag to work??)&lt;BR /&gt;
&lt;BR /&gt;
I am able to toggle between duplex and noduplex and get the expected two and one sided printout.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again,&lt;BR /&gt;
Paul&lt;/LOCATION&gt;</description>
    <pubDate>Wed, 29 Sep 2010 21:40:24 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-09-29T21:40:24Z</dc:date>
    <item>
      <title>Duplex printing with ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Duplex-printing-with-ODS-PDF/m-p/8671#M2876</link>
      <description>I want to generate and print a PDF report from my program without any manual intervention.  I am using the following program:&lt;BR /&gt;
[pre]&lt;BR /&gt;
options&lt;BR /&gt;
   duplex&lt;BR /&gt;
   sysprint = “\\printserver\printername”&lt;BR /&gt;
   ;&lt;BR /&gt;
&lt;BR /&gt;
filename prt printer;&lt;BR /&gt;
&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods pdf&lt;BR /&gt;
   file = prt&lt;BR /&gt;
   ;&lt;BR /&gt;
&lt;BR /&gt;
proc report …&lt;BR /&gt;
&lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
ods listing;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
The duplex option seems to be ignored and the report is printed single sided. &lt;BR /&gt;
&lt;BR /&gt;
I reported this to Tech Support and was told that duplex does not work with ODS PDF but it is not documented.  This seems to be at odds with Usage Note 23416 where duplex is listed as an option that affects ODS printer destinations.&lt;BR /&gt;
&lt;BR /&gt;
Could you please verify that the duplex option will not work with ODS PDF?  Is there a work-around to use to get duplex output?&lt;BR /&gt;
&lt;BR /&gt;
Paul</description>
      <pubDate>Wed, 29 Sep 2010 03:50:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Duplex-printing-with-ODS-PDF/m-p/8671#M2876</guid>
      <dc:creator>PaulOldenKamp</dc:creator>
      <dc:date>2010-09-29T03:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Duplex printing with ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Duplex-printing-with-ODS-PDF/m-p/8672#M2877</link>
      <description>Paul:&lt;BR /&gt;
  ODS PRINTER destination is a different destination than ODS PDF. Does DUPLEX work if you change the ODS PDF to ODS PRINTER????&lt;BR /&gt;
&lt;BR /&gt;
  The way I read note 23416 is that it says:&lt;BR /&gt;
&lt;B&gt;The following SAS system options affect &lt;U&gt; ODS PRINTER &lt;/U&gt; code. &lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  It does not say ODS PRINTER &lt;U&gt;family&lt;/U&gt; code -- ODS  PDF is a Printer FAMILY destination, but the way I read the note, I would expect DUPLEX to work ONLY with ODS PRINTER....not ODS PDF. It was my understanding that the ODS PRINTER destination was the one that "spoke" to a specific printer. See the documentation on the use of the ODS PRINTER statement:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002217095.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002217095.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
(If you remember, back in the "old" days of SAS 8.0, there was no way to "directly" use ODS PDF -- originally, you had to create a PS file and then manually distill to PDF form. Then, you were eventually able to do this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ODS PRINTER PDF FILE=...;&lt;BR /&gt;
OR&lt;BR /&gt;
ODS PRINTER PS FILE=...;&lt;BR /&gt;
OR&lt;BR /&gt;
ODS PRINTER PRINTER=...;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
     &lt;BR /&gt;
and, finally, we got the ODS PDF destination directly.&lt;BR /&gt;
            &lt;BR /&gt;
So much for the walk down memory lane... When I use this code, I do get DUPLEX output on my duplex printer:&lt;BR /&gt;
[pre]&lt;BR /&gt;
options duplex;&lt;BR /&gt;
ods printer printer='HP LaserJet 2300 Series PCL 5e';&lt;BR /&gt;
                     &lt;BR /&gt;
proc print data=sashelp.shoes(obs=100);&lt;BR /&gt;
run;&lt;BR /&gt;
                &lt;BR /&gt;
ods printer close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                    &lt;BR /&gt;
There are other ways to invoke the ODS PRINTER destination, as described here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/23/414.html" target="_blank"&gt;http://support.sas.com/kb/23/414.html&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
...so, when I used PRINTER=, it overrode whatever I have for the SYSPRINT option. But this note also shows how to use the FILENAME option for different operating systems:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/24/185.html" target="_blank"&gt;http://support.sas.com/kb/24/185.html&lt;/A&gt;&lt;BR /&gt;
...and these notes describe a bit more about the destination:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/23/413.html" target="_blank"&gt;http://support.sas.com/kb/23/413.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/4/800.html" target="_blank"&gt;http://support.sas.com/kb/4/800.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/3/183.html" target="_blank"&gt;http://support.sas.com/kb/3/183.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/15/541.html" target="_blank"&gt;http://support.sas.com/kb/15/541.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
So, I think that trying your code with ODS PRINTER instead of ODS PDF should get you the duplex print. I have found the printer name to be quite finicky -- for example, if I had the name of the printer spelled wrong or didn't have spaces in the right place, I might see this error message:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ERROR: Unable to set printer path per request. This is usually because the requested printer (HP LaserJet2300Series PCL 5e) is unknown.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                        &lt;BR /&gt;
and the output goes to my default printer -- which might not be a DUPLEX printer.&lt;BR /&gt;
 &lt;BR /&gt;
Hope this helps,&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 29 Sep 2010 15:52:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Duplex-printing-with-ODS-PDF/m-p/8672#M2877</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-29T15:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Duplex printing with ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Duplex-printing-with-ODS-PDF/m-p/8673#M2878</link>
      <description>Thank you Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
I see now that a lot of my problems were caused my confusing the printer destination with the printer family terminology.  Having both ODS PRINTER and ODS PDF available is really quite helpful since I can use PRINTER to print the report and PDF to write an archive copy.&lt;BR /&gt;
&lt;BR /&gt;
I tried your small sample program and got it to work except that I could not get the printer= option to work.  I am able to use the sysprint system option to point to my printer.&lt;BR /&gt;
&lt;BR /&gt;
Here is a paraphrase of the program that works:&lt;BR /&gt;
[pre]&lt;BR /&gt;
options&lt;BR /&gt;
   duplex &lt;BR /&gt;
   binding = longedge&lt;BR /&gt;
   sysprint = "\\PPWPRN01\PTCENA114"&lt;BR /&gt;
   ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
&lt;BR /&gt;
ods printer&lt;BR /&gt;
   style = listing&lt;BR /&gt;
   columns = 2&lt;BR /&gt;
   uniform&lt;BR /&gt;
   ;&lt;BR /&gt;
&lt;BR /&gt;
ods pdf&lt;BR /&gt;
   style = listing&lt;BR /&gt;
   columns = 2&lt;BR /&gt;
   uniform&lt;BR /&gt;
   file = "&lt;LOCATION of="" pdf="" output="" file=""&gt;
   ;&lt;BR /&gt;
&lt;BR /&gt;
proc report&lt;BR /&gt;
…&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
ods printer close;&lt;BR /&gt;
ods listing;&lt;BR /&gt;
&lt;BR /&gt;
(I cannot get the closing pre tag to work??)&lt;BR /&gt;
&lt;BR /&gt;
I am able to toggle between duplex and noduplex and get the expected two and one sided printout.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again,&lt;BR /&gt;
Paul&lt;/LOCATION&gt;</description>
      <pubDate>Wed, 29 Sep 2010 21:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Duplex-printing-with-ODS-PDF/m-p/8673#M2878</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-29T21:40:24Z</dc:date>
    </item>
  </channel>
</rss>

