<?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 writing source code to a pdf in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/writing-source-code-to-a-pdf/m-p/741962#M24999</link>
    <description>&lt;P&gt;I would like to write the source code to a pdf, before displaying the results of the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can use a series of ods pdf text=""; statements, and insert new lines and spacing as needed, but is there a way to put pre formatted text, like with an html &amp;lt;pre&amp;gt; tag so that I do not have to add all the escape characters with newline and nbspace to the source code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 19:13:45 GMT</pubDate>
    <dc:creator>jtcowder</dc:creator>
    <dc:date>2021-05-17T19:13:45Z</dc:date>
    <item>
      <title>writing source code to a pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/writing-source-code-to-a-pdf/m-p/741962#M24999</link>
      <description>&lt;P&gt;I would like to write the source code to a pdf, before displaying the results of the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can use a series of ods pdf text=""; statements, and insert new lines and spacing as needed, but is there a way to put pre formatted text, like with an html &amp;lt;pre&amp;gt; tag so that I do not have to add all the escape characters with newline and nbspace to the source code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 19:13:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/writing-source-code-to-a-pdf/m-p/741962#M24999</guid>
      <dc:creator>jtcowder</dc:creator>
      <dc:date>2021-05-17T19:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: writing source code to a pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/writing-source-code-to-a-pdf/m-p/741971#M25000</link>
      <description>&lt;P&gt;Why not use PROC PRINT?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data code ;
  infile cards truncover ;
  line+1;
  input code $char80. ;
  format code $char80. ;
cards4;
proc print data=sashelp.class;
  var name age;
run;
;;;;

ods pdf file='c:\downloads\code.pdf';

proc print data=code ;
  id line;
  var code / style(data)=[font_face=courier];
run;

ods pdf close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 May 2021 19:38:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/writing-source-code-to-a-pdf/m-p/741971#M25000</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-17T19:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: writing source code to a pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/writing-source-code-to-a-pdf/m-p/741975#M25001</link>
      <description>&lt;P&gt;PROC REPORT seems to work better at preserving the leading spaces.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file='c:\downloads\code.pdf';

proc report data=code ;
  column line code ;
  define line / order ;
  define code / style(column)=[font_face=courier asis=on];
run;

proc print data=code;
  id line;
  var code / style = [font_face=courier asis=on];
run;

ods pdf close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 May 2021 19:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/writing-source-code-to-a-pdf/m-p/741975#M25001</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-17T19:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: writing source code to a pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/writing-source-code-to-a-pdf/m-p/742009#M25004</link>
      <description>&lt;P&gt;That was very helpful, thank you.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tweaked the report a bit to get the output from this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jtcowder_0-1621283967793.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59526iC48AA40C7F2A5017/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jtcowder_0-1621283967793.png" alt="jtcowder_0-1621283967793.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jtcowder_1-1621283986811.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59527iD659ED59692C691A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jtcowder_1-1621283986811.png" alt="jtcowder_1-1621283986811.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;proc report data=code style=blockprint;&lt;BR /&gt;column line code ;&lt;BR /&gt;define line / '' order noprint;&lt;BR /&gt;define code / '' style(column)=[asis=on];&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 20:40:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/writing-source-code-to-a-pdf/m-p/742009#M25004</guid>
      <dc:creator>jtcowder</dc:creator>
      <dc:date>2021-05-17T20:40:12Z</dc:date>
    </item>
  </channel>
</rss>

