<?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 print a SAS table as an image (gif, jpeg, png) in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30531#M4592</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oops, I meant to say "options printerpath=gif;", as Cynthia discovered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works for PNG, SVG, what have you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- David Kelley, SAS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2012 15:20:21 GMT</pubDate>
    <dc:creator>David_SAS</dc:creator>
    <dc:date>2012-01-17T15:20:21Z</dc:date>
    <item>
      <title>How to print a SAS table as an image (gif, jpeg, png)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30525#M4586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question regarding table outputs in SAS. I am working in automating reports by combining SAS and LATEX, for which I would prefer to have GIF, JEPG or PNG files instead of a PDF (since by creating a PDF I would need to "cut" the object in order to include in the LATEX only the object and not the complete page). Is there a possibility? I have been trying with goptions device=gif and with ods html without succeed (i.e. pls check the following codes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*the following code works with graphs but not with tables*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿filename grafout "xxx/table.gif";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;ods listing;&lt;/P&gt;&lt;P&gt;ods results off;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goptions reset=all device=gif gsfname=grafout gsfmode=replace;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;﻿﻿/*some PROC REPORT*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goptions reset=all;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*The following code was something that I tryed but did not work!*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename grafout ""xxx/table.gif;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods_all_close;&lt;/P&gt;&lt;P&gt;ods listing;&lt;/P&gt;&lt;P&gt;ods results off;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goptions device=gif;&lt;/P&gt;&lt;P&gt;ods listing close;&lt;/P&gt;&lt;P&gt;ods html file=grafout;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*some PROC REPORT*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html close;&lt;/P&gt;&lt;P&gt;ods listing;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not get any error message and a gif file is created without any table.&lt;/P&gt;&lt;P&gt;Can you pls help me to solve this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Lupita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;﻿&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 16:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30525#M4586</guid>
      <dc:creator>lupitala</dc:creator>
      <dc:date>2012-01-16T16:43:31Z</dc:date>
    </item>
    <item>
      <title>How to print a SAS table as an image (gif, jpeg, png)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30526#M4587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look into using the ODS output destination for LaTeX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods tagsets.latex ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 17:33:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30526#M4587</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-01-16T17:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a SAS table as an image (gif, jpeg, png)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30527#M4588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Your code would never work with tables. GOPTIONS and DEVICE= were only designed for SAS/GRAPH procedures, not for tabular procedures, such as PROC PRINT and PROC REPORT, etc. In the "old" days, there is a procedure called PROC GPRINT, that used to capture a table as an image, but not many folks use it anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; As Tom suggests, if you use the ODS LATEX destination, a LaTeX source file is created with all the LaTeX markup code around your table. Assuming that you know how to include or combine LaTeX files, then you should be able to process the LaTeX tables the way you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I understand that you need to somehow use a LaTeX compiler to compile your LaTeX document into the final form, so while the code below will make a LaTeX file, I do not have a Windows compiler to compile and/or display the source file. I can view the file in Notepad and see the LaTeX markup that's been created for the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods latex file='c:\temp\latex_out.txt';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; proc report data=sashelp.class nowd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods latex close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 21:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30527#M4588</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-01-16T21:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a SAS table as an image (gif, jpeg, png)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30528#M4589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now that Cynthia has mentioned it, proc gprint still works in 9.2.&amp;nbsp; E.g., try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename logfile 'c:\art\demo.log';&lt;/P&gt;&lt;P&gt;filename lisfile 'c:\art\demo.lis';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc printto log=logfile print=lisfile new;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc report data=sashelp.class nowd;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc printto;&lt;/P&gt;&lt;P&gt;run;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goptions device=jpeg gsfname=out ;&lt;/P&gt;&lt;P&gt;filename out 'c:\art\test.jpg' ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gprint fileref=lisfile;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 01:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30528#M4589</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-17T01:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a SAS table as an image (gif, jpeg, png)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30529#M4590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods printerpath=gif;&lt;/P&gt;&lt;P&gt;ods printer;&lt;/P&gt;&lt;P&gt;proc report data=sashelp.class nowd;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods printer close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- David Kelley, SAS&lt;IMG __jive_id="1396" alt="sasprt.gif" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/1396_sasprt.gif" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 14:37:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30529#M4590</guid>
      <dc:creator>David_SAS</dc:creator>
      <dc:date>2012-01-17T14:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a SAS table as an image (gif, jpeg, png)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30530#M4591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Totally cool! I did not know you could use ODS PRINTER like that. I had to use OPTIONS for PRINTERPATH. Here's my log...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp; ods printer close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;NOTE: ODS PRINTER printed 1 page.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;10&amp;nbsp;&amp;nbsp; ods printerpath=gif;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------------&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 76&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;WARNING 1-322: Assuming the symbol PRINTER was misspelled as printerpath.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;ERROR 22-322: Syntax error, expecting one of the following: BODY, CSSSTYLE, FILE, LAYOUT,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRINTER, STYLE.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I was able to open sasprt.gif with my default picture viewer application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and, if I changed my &lt;SPAN style="font-family: terminal,monaco;"&gt;ODS PRINTER;&lt;/SPAN&gt; statement to &lt;SPAN style="font-family: terminal,monaco;"&gt;ODS PRINTER file="C:\temp\myname.gif"&lt;/SPAN&gt;, then I was able to name the file something other than sasprt.gif as shown below and to direct it to a location other than my default directory location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pretty cool! I have now erased PROC GPRINT from permanent memory!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;12&amp;nbsp;&amp;nbsp; ** use system option for printerpath;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;13&amp;nbsp;&amp;nbsp; options printerpath=gif;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;14&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;15&amp;nbsp;&amp;nbsp; ods printer;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;NOTE: Writing ODS PRINTER output to DISK destination "C:\temp\output\sasprt.gif", printer "gif".&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;16&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;17&amp;nbsp;&amp;nbsp; proc report data=sashelp.class nowd;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;18&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;19&amp;nbsp;&amp;nbsp; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;NOTE: PROCEDURE REPORT used (Total process time):&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.37 seconds&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.26 seconds&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;20&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;21&amp;nbsp;&amp;nbsp; ods printer close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: terminal,monaco;"&gt;NOTE: ODS PRINTER printed 1 page to C:\temp\output\sasprt.gif.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 15:08:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30530#M4591</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-01-17T15:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to print a SAS table as an image (gif, jpeg, png)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30531#M4592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oops, I meant to say "options printerpath=gif;", as Cynthia discovered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works for PNG, SVG, what have you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- David Kelley, SAS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 15:20:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-print-a-SAS-table-as-an-image-gif-jpeg-png/m-p/30531#M4592</guid>
      <dc:creator>David_SAS</dc:creator>
      <dc:date>2012-01-17T15:20:21Z</dc:date>
    </item>
  </channel>
</rss>

