<?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: Getting the page numbers from PDF in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-page-numbers-from-PDF/m-p/267840#M52963</link>
    <description>&lt;P&gt;There is no way to know up front how PDF will render the document. &amp;nbsp;I have seen floating around the internet some very long and complicated code which attempts to guess, but even then they are only right half the time. &amp;nbsp;I would suggest you evaluate your data before outputting. &amp;nbsp;This can take many methods, som examples:&lt;/P&gt;
&lt;P&gt;- Assume each data row is one row on the output, then divide _n_ by the number you want on each page, e.g:&lt;BR /&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; pge=ceil(_n_/20);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;This will give you a variable with page numbers, then in your proc report your break on PGE variable. &amp;nbsp;You can make that more or less complicated as you wish.&lt;/P&gt;
&lt;P&gt;However why have a list of pages? &amp;nbsp;It doesn't sound that normal to me. &amp;nbsp;I tend to always see page number, and sometimes total pages - which is why the renderer code ^{thispage} of ^{lastpage} is given so you can let the software which renders the output (PDF, RTF etc.) decide on page numbering. &amp;nbsp;At the end of the day page numbering is only there to check you have a complete output, any logical test should be done on the data not on where it appears in output?&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2016 08:24:44 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-05-03T08:24:44Z</dc:date>
    <item>
      <title>Getting the page numbers from PDF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-page-numbers-from-PDF/m-p/267825#M52962</link>
      <description>&lt;P&gt;HI All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Please help me on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I have dataset with a variable name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; NAME&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;James&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Jeffrey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Joyce&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Barbara&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above given observation's present in a PDF document. 1. Alice present in page number 4 and 5.&lt;/P&gt;
&lt;P&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2. James present in page number 3&lt;/P&gt;
&lt;P&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.&amp;nbsp;&lt;SPAN&gt;Jeffrey present in page number 1, 2 and 3&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4. &lt;SPAN&gt;Joyce&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;present in page number &amp;nbsp;2 and 3&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;SPAN&gt;.&lt;/SPAN&gt; Barbara&amp;nbsp;&lt;SPAN&gt;present in page number &amp;nbsp;1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;So i want an output dataset like&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; NAME &amp;nbsp; &amp;nbsp; &amp;nbsp; NUMBER&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;Alice &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4, 5&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; James &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; Jeffrey &amp;nbsp; &amp;nbsp; 1,&amp;nbsp; 2,&amp;nbsp; 3&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; Joyce &amp;nbsp; &amp;nbsp; &amp;nbsp; 2,&amp;nbsp; 3&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; Barbara &amp;nbsp; 1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Note:- If more than one page number , should be seperated with ", " in output.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks in Advance.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Daya&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 06:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-the-page-numbers-from-PDF/m-p/267825#M52962</guid>
      <dc:creator>Daya87</dc:creator>
      <dc:date>2016-05-03T06:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the page numbers from PDF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-page-numbers-from-PDF/m-p/267840#M52963</link>
      <description>&lt;P&gt;There is no way to know up front how PDF will render the document. &amp;nbsp;I have seen floating around the internet some very long and complicated code which attempts to guess, but even then they are only right half the time. &amp;nbsp;I would suggest you evaluate your data before outputting. &amp;nbsp;This can take many methods, som examples:&lt;/P&gt;
&lt;P&gt;- Assume each data row is one row on the output, then divide _n_ by the number you want on each page, e.g:&lt;BR /&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; pge=ceil(_n_/20);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;This will give you a variable with page numbers, then in your proc report your break on PGE variable. &amp;nbsp;You can make that more or less complicated as you wish.&lt;/P&gt;
&lt;P&gt;However why have a list of pages? &amp;nbsp;It doesn't sound that normal to me. &amp;nbsp;I tend to always see page number, and sometimes total pages - which is why the renderer code ^{thispage} of ^{lastpage} is given so you can let the software which renders the output (PDF, RTF etc.) decide on page numbering. &amp;nbsp;At the end of the day page numbering is only there to check you have a complete output, any logical test should be done on the data not on where it appears in output?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 08:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-the-page-numbers-from-PDF/m-p/267840#M52963</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-05-03T08:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the page numbers from PDF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-the-page-numbers-from-PDF/m-p/267846#M52965</link>
      <description>&lt;P&gt;If your REPORT was &amp;nbsp;simple, you can count how many rows in every page there were&amp;nbsp;by hand.&lt;/P&gt;
&lt;P&gt;Once you get that NUMBER, you can easily get who belong to which page .&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 09:02:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-the-page-numbers-from-PDF/m-p/267846#M52965</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-05-03T09:02:01Z</dc:date>
    </item>
  </channel>
</rss>

