<?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 system options to add page number to pdf output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853734#M337422</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; It is possible to change the page number formatting, but not, as you envision, in a system option. The page number is controlled by the style template used for the destination. So your options are:&lt;/P&gt;
&lt;P&gt;1) turn page numbering off and use ODS ESCAPECHAR THISPAGE function in a title statement and use TITLE options to alter the page number&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;2) change the style template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Both methods are shown below:&lt;/P&gt;
&lt;P&gt;Method 1 -- use ODS ESCAPECHAR and TITLE statement&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1673622720018.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79372iC1212BB7776B681B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1673622720018.png" alt="Cynthia_sas_1-1673622720018.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 2 -- use PROC TEMPLATE&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1673622608801.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79371iFF29E431318B73E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1673622608801.png" alt="Cynthia_sas_0-1673622608801.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I think that Method 1 is easier for beginners. For method 2 to work, the PAGENO style attribute had to be altered to add color and font in the template. And, the STYLE = option had to be added to the ODS PDF statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2023 15:13:44 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2023-01-13T15:13:44Z</dc:date>
    <item>
      <title>using system options to add page number to pdf output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853708#M337420</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;Is it possible to format the page number option in system option?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nodate number nobyline&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;can I change the size, color, etc of the numbers printed?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 14:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853708#M337420</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2023-01-13T14:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: using system options to add page number to pdf output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853734#M337422</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; It is possible to change the page number formatting, but not, as you envision, in a system option. The page number is controlled by the style template used for the destination. So your options are:&lt;/P&gt;
&lt;P&gt;1) turn page numbering off and use ODS ESCAPECHAR THISPAGE function in a title statement and use TITLE options to alter the page number&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;2) change the style template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Both methods are shown below:&lt;/P&gt;
&lt;P&gt;Method 1 -- use ODS ESCAPECHAR and TITLE statement&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1673622720018.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79372iC1212BB7776B681B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1673622720018.png" alt="Cynthia_sas_1-1673622720018.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 2 -- use PROC TEMPLATE&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1673622608801.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79371iFF29E431318B73E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1673622608801.png" alt="Cynthia_sas_0-1673622608801.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I think that Method 1 is easier for beginners. For method 2 to work, the PAGENO style attribute had to be altered to add color and font in the template. And, the STYLE = option had to be added to the ODS PDF statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 15:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853734#M337422</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-01-13T15:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: using system options to add page number to pdf output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853745#M337424</link>
      <description>&lt;P&gt;Thankyou &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I tried that with this code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nodate nonumber nobyline;&lt;BR /&gt;ods pdf file="test.pdf";
ods graphics /reset noborder width=10in height=8.5in ;
ods ecapechar='^';
title1 color=dimgray h=6pt bold j=r "Page ^{thispage} of ^{lastpage}";
title2 color=dimgray h=6pt bold j=c "My title";

proc sgpanel data=mydata;
........................;
run;

title1;
title2;
ods pdf close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but am not getting the desired results:&lt;/P&gt;
&lt;P&gt;this is what I get:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Anita_n_0-1673624229789.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79375i38E4E5C417FD675B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Anita_n_0-1673624229789.png" alt="Anita_n_0-1673624229789.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;the number is not displayed&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 15:37:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853745#M337424</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2023-01-13T15:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: using system options to add page number to pdf output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853754#M337427</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;The second method worked for me thankyou&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 16:24:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853754#M337427</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2023-01-13T16:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: using system options to add page number to pdf output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853848#M337473</link>
      <description>&lt;P&gt;Hi: Sorry, I must have missed that you were doing graphics. Method 1 worked for me when I did this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1673663369635.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79397i4AD20E84CA470643/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1673663369635.png" alt="Cynthia_sas_0-1673663369635.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You have to use the ODS PDF option to allow ODS to control the title. It is just NOGTITLE (which says don't put the title inside the graph, put it outside the graph in the ODS file).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jan 2023 02:30:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853848#M337473</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-01-14T02:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: using system options to add page number to pdf output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853969#M337532</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; thankyou&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 11:18:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-system-options-to-add-page-number-to-pdf-output/m-p/853969#M337532</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2023-01-16T11:18:57Z</dc:date>
    </item>
  </channel>
</rss>

