<?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: How to redirect SAS output into a PDF file in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26975#M4294</link>
    <description>Thanks for comments everybody. The problem with Cynthia and Dave's approaches is that the outputs do not look exactly like in the SAS output&lt;BR /&gt;
window. And I indeed need it to look 100% the same. I mean it.&lt;BR /&gt;
&lt;BR /&gt;
The solution that I'm using is basically&lt;BR /&gt;
&lt;BR /&gt;
options sysprint="CutePDF Writer" "&amp;amp;path\&amp;amp;g_SAS_START_NAME..ps";&lt;BR /&gt;
&lt;BR /&gt;
filename pdf printer;&lt;BR /&gt;
&lt;BR /&gt;
proc printto print=pdf new;&lt;BR /&gt;
         run;&lt;BR /&gt;
&lt;BR /&gt;
proc printto print=print;&lt;BR /&gt;
            run;&lt;BR /&gt;
&lt;BR /&gt;
options noxwait;&lt;BR /&gt;
&lt;BR /&gt;
%sysexec( "c:\program files\gs\gs8.64\bin\gswin32c.exe" -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="&amp;amp;path\&amp;amp;g_SAS_START_NAME..pdf" -f "&amp;amp;path\&amp;amp;g_SAS_START_NAME..ps" ) ;&lt;BR /&gt;
						&lt;BR /&gt;
%sysexec( del "&amp;amp;path\&amp;amp;g_SAS_START_NAME..ps" ) ;&lt;BR /&gt;
						&lt;BR /&gt;
This one worked in SAS 9.1 like a charm, but in SAS 9.2 it switches to&lt;BR /&gt;
a portrait mode at some point, and the only way to fix it is to reinstall SAS 9.2.&lt;BR /&gt;
&lt;BR /&gt;
I did it a couple of times already, but after running some code&lt;BR /&gt;
( I think it's proc gplot producing tiffp device output or something ),&lt;BR /&gt;
it switches back to portrait. I was not able to find any setting inside&lt;BR /&gt;
SAS 9.2 to get it back into a landscape mode. Interestingly,&lt;BR /&gt;
the output window still produces the lanscape format, and if I print&lt;BR /&gt;
it to a file directly from the output window, it gives me landscape as well.&lt;BR /&gt;
&lt;BR /&gt;
Would anybody have any ideas about that ?&lt;BR /&gt;
&lt;BR /&gt;
Thank you.</description>
    <pubDate>Wed, 26 May 2010 00:41:17 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-05-26T00:41:17Z</dc:date>
    <item>
      <title>How to redirect SAS output into a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26971#M4290</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
I would like to redirect SAS output window into a PDF file. I'd like that output&lt;BR /&gt;
to look EXACTLY like the output in the SAS window.&lt;BR /&gt;
&lt;BR /&gt;
I'm using a solution based on an external PDF printer ( CutePDF ) and&lt;BR /&gt;
a call to ps2pdf from inside the SAS system. There is a problem with it&lt;BR /&gt;
though on my SAS 9.2, so I'd appreciate if someone could suggest a &lt;BR /&gt;
solution based on SAS internal functionality. &lt;BR /&gt;
&lt;BR /&gt;
Thanks !</description>
      <pubDate>Mon, 24 May 2010 21:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26971#M4290</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-24T21:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to redirect SAS output into a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26972#M4291</link>
      <description>Suggest looking at using ODS PDF along with PROC PRINTTO.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 25 May 2010 00:25:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26972#M4291</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-05-25T00:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to redirect SAS output into a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26973#M4292</link>
      <description>Hi:&lt;BR /&gt;
  You could change a style template to use all "fixed" pitch SAS Monospace fonts and you'd come close to the look and feel of the LISTING window, as explained in this Tech Support note:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/24/493.html" target="_blank"&gt;http://support.sas.com/kb/24/493.html&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  I have successfully used a Text2PDF command line processor which was offered by the FyTek company. At the time I was investigating the ability to translate a PROC PRINTTO-saved LISTING file....and Text2PDF was just one of many tools available, but not all of the products had command line interface. I used an X command to kick off the Text2PDF conversion.&lt;BR /&gt;
&lt;BR /&gt;
  Personally, I find that changing the template comes close enough to what I need to do...the command line method was sort of klunky.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 25 May 2010 11:24:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26973#M4292</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-05-25T11:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to redirect SAS output into a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26974#M4293</link>
      <description>In SAS 9.2, PROC DOCUMENT has the undocumented capability to import text files.  Try:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods listing file="myoutput.lst";&lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
run;&lt;BR /&gt;
ods listing;&lt;BR /&gt;
proc document name=temp(write);&lt;BR /&gt;
import textfile="myoutput.lst" to ^;&lt;BR /&gt;
ods pdf file="myoutput.pdf" notoc;&lt;BR /&gt;
replay;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
-- David Kelley, SAS</description>
      <pubDate>Tue, 25 May 2010 15:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26974#M4293</guid>
      <dc:creator>David_SAS</dc:creator>
      <dc:date>2010-05-25T15:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to redirect SAS output into a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26975#M4294</link>
      <description>Thanks for comments everybody. The problem with Cynthia and Dave's approaches is that the outputs do not look exactly like in the SAS output&lt;BR /&gt;
window. And I indeed need it to look 100% the same. I mean it.&lt;BR /&gt;
&lt;BR /&gt;
The solution that I'm using is basically&lt;BR /&gt;
&lt;BR /&gt;
options sysprint="CutePDF Writer" "&amp;amp;path\&amp;amp;g_SAS_START_NAME..ps";&lt;BR /&gt;
&lt;BR /&gt;
filename pdf printer;&lt;BR /&gt;
&lt;BR /&gt;
proc printto print=pdf new;&lt;BR /&gt;
         run;&lt;BR /&gt;
&lt;BR /&gt;
proc printto print=print;&lt;BR /&gt;
            run;&lt;BR /&gt;
&lt;BR /&gt;
options noxwait;&lt;BR /&gt;
&lt;BR /&gt;
%sysexec( "c:\program files\gs\gs8.64\bin\gswin32c.exe" -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="&amp;amp;path\&amp;amp;g_SAS_START_NAME..pdf" -f "&amp;amp;path\&amp;amp;g_SAS_START_NAME..ps" ) ;&lt;BR /&gt;
						&lt;BR /&gt;
%sysexec( del "&amp;amp;path\&amp;amp;g_SAS_START_NAME..ps" ) ;&lt;BR /&gt;
						&lt;BR /&gt;
This one worked in SAS 9.1 like a charm, but in SAS 9.2 it switches to&lt;BR /&gt;
a portrait mode at some point, and the only way to fix it is to reinstall SAS 9.2.&lt;BR /&gt;
&lt;BR /&gt;
I did it a couple of times already, but after running some code&lt;BR /&gt;
( I think it's proc gplot producing tiffp device output or something ),&lt;BR /&gt;
it switches back to portrait. I was not able to find any setting inside&lt;BR /&gt;
SAS 9.2 to get it back into a landscape mode. Interestingly,&lt;BR /&gt;
the output window still produces the lanscape format, and if I print&lt;BR /&gt;
it to a file directly from the output window, it gives me landscape as well.&lt;BR /&gt;
&lt;BR /&gt;
Would anybody have any ideas about that ?&lt;BR /&gt;
&lt;BR /&gt;
Thank you.</description>
      <pubDate>Wed, 26 May 2010 00:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26975#M4294</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-26T00:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to redirect SAS output into a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26976#M4295</link>
      <description>Would you use PrintScreen key in the keyboard to get a snapshot screen.&lt;BR /&gt;
then convert the picture into pdf ????</description>
      <pubDate>Wed, 26 May 2010 03:30:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26976#M4295</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-05-26T03:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to redirect SAS output into a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26977#M4296</link>
      <description>Hi:&lt;BR /&gt;
  Is gswin32c.exe a Ghostscript command??? Is it possible that GhostScript is not using the SAS settings for orientation?? It sounds like SAS is respecting the landscape orientation, but the problem is that your -other- software needs to have its orientation set.&lt;BR /&gt;
 &lt;BR /&gt;
  For example, this documentation on using Ghostscript has an explicit instruction on changing paper size:&lt;BR /&gt;
&lt;A href="http://pages.cs.wisc.edu/~ghost/doc/cvs/Use.htm#Change_default_size" target="_blank"&gt;http://pages.cs.wisc.edu/~ghost/doc/cvs/Use.htm#Change_default_size&lt;/A&gt;&lt;BR /&gt;
and the section on page parameters&lt;BR /&gt;
&lt;A href="http://pages.cs.wisc.edu/~ghost/doc/cvs/Use.htm#Parameter_switches" target="_blank"&gt;http://pages.cs.wisc.edu/~ghost/doc/cvs/Use.htm#Parameter_switches&lt;/A&gt;&lt;BR /&gt;
talks about using the dOrient parameter:&lt;BR /&gt;
&lt;B&gt;&lt;BR /&gt;
-dORIENT1=true &lt;BR /&gt;
-dORIENT1=false &lt;BR /&gt;
Defines the meaning of the 0 and 1 orientation values for the setpage[params] compatibility operators. The default value of ORIENT1 is true (set in gs_init.ps), which is the correct value for most files that use setpage[params] at all, namely, files produced by badly designed applications that "know" that the output will be printed on certain roll-media printers: these applications use 0 to mean landscape and 1 to mean portrait. -dORIENT1=false declares that 0 means portrait and 1 means landscape, which is the convention used by a smaller number of files produced by properly written applications. &lt;BR /&gt;
&lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 26 May 2010 11:39:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26977#M4296</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-05-26T11:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to redirect SAS output into a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26978#M4297</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
thanks. In fact, I tried all that, even reinstalling CutePDF and GS, but the only&lt;BR /&gt;
thing that helped is re-installing SAS 9.2. This makes me think the problem is&lt;BR /&gt;
actually inside SAS. There is a setting somewhere in it, which controls it, and I was not able to find it yet.&lt;BR /&gt;
&lt;BR /&gt;
I could post a dump of proc options and/or other things if it helps.</description>
      <pubDate>Wed, 26 May 2010 18:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26978#M4297</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-26T18:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to redirect SAS output into a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26979#M4298</link>
      <description>Well reinstalling would have cleaned up all your print drivers for sure. But your best way to resolve this issue definitively would be to open a track with Tech Support.&lt;BR /&gt;
&lt;BR /&gt;
Cynthia</description>
      <pubDate>Wed, 26 May 2010 21:14:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-redirect-SAS-output-into-a-PDF-file/m-p/26979#M4298</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-05-26T21:14:23Z</dc:date>
    </item>
  </channel>
</rss>

