<?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: Creating a PDF file with multilevel Bookmarks in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909608#M358757</link>
    <description>Interresting. I found this posted at ten years ago.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Second-level-bookmarks-pdf/td-p/117003" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Second-level-bookmarks-pdf/td-p/117003&lt;/A&gt;</description>
    <pubDate>Mon, 25 Dec 2023 01:50:13 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2023-12-25T01:50:13Z</dc:date>
    <item>
      <title>Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909284#M358674</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to create a PDF file with multlevel bookmarks.&lt;/P&gt;&lt;P&gt;The code I am using is&amp;nbsp;...&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;ods pdf file="site_listings.pdf" style=us_land nogtitle nogfootnote;

ods proclabel="Site 1001" ;
title 'Demographics';
Proc report data=a contents= 'Demographics' nowd;
Columns var;
Define var /display;
Run;

ods proclabel="Site 1001" ;
title 'Disposition';
Proc report data=b contents= 'Disposition' nowd;
Columns var;
Define var /display;
Run;

ods proclabel="Site 1001" ;
title 'Adverse Events';
Proc report data=c contents= 'Adverse Events' nowd;
Columns var;
Define var /display;
Run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What I get is :&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="Michael_P_0-1703166640247.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91945iAD80F466802848BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Michael_P_0-1703166640247.png" alt="Michael_P_0-1703166640247.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... and what I need is ...&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="Michael_P_1-1703166817023.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91949i958176A18E5FD15C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Michael_P_1-1703166817023.png" alt="Michael_P_1-1703166817023.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any help on this???&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 13:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909284#M358674</guid>
      <dc:creator>Michael_P</dc:creator>
      <dc:date>2023-12-21T13:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909303#M358678</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You didn't post data or your style. However, this is what I send to my students as a starter example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1703173085113.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91957i612A48A72AE16EBB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1703173085113.png" alt="Cynthia_sas_0-1703173085113.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Then, to get rid of or change the final "Table 1" node, you need to follow the example in this Tech Support note: &lt;A href="https://support.sas.com/kb/31/278.html" target="_blank"&gt;https://support.sas.com/kb/31/278.html&lt;/A&gt; .&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 15:39:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909303#M358678</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-12-21T15:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909307#M358680</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your reply!&lt;/P&gt;&lt;P&gt;The point is that I want to have two levels of Bookmarks - first level for the site and second level for the different reports.&lt;/P&gt;&lt;P&gt;Following your suggestion I would have only the second levels.&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 15:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909307#M358680</guid>
      <dc:creator>Michael_P</dc:creator>
      <dc:date>2023-12-21T15:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909314#M358682</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; As I explained, that was intended as a starter example that you would modify as you see fit. Here's a modified version of that example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1703174837403.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91958iF0A8AA48D9D38EFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1703174837403.png" alt="Cynthia_sas_0-1703174837403.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and, again, you would need to use the Tech Support example to change or eliminate the "Table 1" node.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 16:08:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909314#M358682</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-12-21T16:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909425#M358699</link>
      <description>&lt;P&gt;If your sub-report have the same constructure . You could try this .&lt;/P&gt;
&lt;P&gt;But I don't know how to remove '=' in Bookmarks , Maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; knew it .&lt;/P&gt;
&lt;P&gt;I think you should contact SAS Technique Support for this special question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=have;
by sex;
run;
data have;
 set have;
 _count=1;
 label sex='09'x;
run;

options nobyline;
ods pdf file='c:\temp\temp.pdf';
ods proclabel='SiteID: 01';
title "SEX is #byval1";
proc report data=have nowd contents='';
by sex;
column name age weight height _count;
define _count/order noprint;
break before _count/page contents='';
run;
ods pdf close;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1703214938494.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92016i781B49AF7C41F1B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1703214938494.png" alt="Ksharp_0-1703214938494.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 03:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909425#M358699</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-22T03:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909488#M358719</link>
      <description>Hi:&lt;BR /&gt;  I would not pad the BY variable with a hex character. And it didn't look like the OP was doing BY group processing. My approach would probably be to use ODS DOCUMENT/PROC DOCUMENT to restructure the Table of Contents and replay the tables in the structure I wanted.&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 22 Dec 2023 14:51:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909488#M358719</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-12-22T14:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909607#M358756</link>
      <description>Cynthia,&lt;BR /&gt;I also want to know how to get the bookmarks OP want in PDF file.&lt;BR /&gt;Can you show an example of ODS DOCUMENT/PROC DOCUMENT ?</description>
      <pubDate>Mon, 25 Dec 2023 01:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909607#M358756</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-25T01:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909608#M358757</link>
      <description>Interresting. I found this posted at ten years ago.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Second-level-bookmarks-pdf/td-p/117003" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Second-level-bookmarks-pdf/td-p/117003&lt;/A&gt;</description>
      <pubDate>Mon, 25 Dec 2023 01:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909608#M358757</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-25T01:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909611#M358758</link>
      <description>&lt;P&gt;Finally I used &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13584"&gt;@Andre&lt;/a&gt; 's code in this :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Second-level-bookmarks-pdf/td-p/117003" target="_blank" rel="noopener"&gt; https://communities.sas.com/t5/ODS-and-Base-Reporting/Second-level-bookmarks-pdf/td-p/117003 &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and get it worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data a;
set sashelp.class; 
xc=1;
run;&lt;BR /&gt;
ods document name=testAW(write);
Proc report data=a  nowd;
Columns xc name age weight height;
define xc /order noprint;
Define name /display;
Define age/display;
Define weight/display;
Define height/ display;
Where weight &amp;lt;95;
break before xc / contents="" page;
Run;
Proc report data=a  nowd;
Columns xc name age weight height;
define xc /order noprint;
Define name /display;
Define age/display;
Define weight/display;
Define height/ display;
Where weight &amp;gt;=95;
break before xc / contents="" page;
Run;
ods document close;
&lt;BR /&gt;
proc document name=testAW;
list/ levels=all; run;
quit;


proc document name=testAW2(write);
make \CLASS;
setlabel \Class#1  "Site 1001";

make \Class#1\Tab1;
setlabel \Class#1\Tab1#1 "weight &amp;lt; 95";
copy \work.testAW\Report#1\Report#1\Report#1 to \Class#1\Tab1#1;

make \Class#1\Tab2;
setlabel \class#1\Tab2#1  "weight &amp;gt;95";
copy \work.testAW\Report#2\Report#1\Report#1 to \Class#1\Tab2#1;
run;

make \CLASS2;
setlabel \Class2#1  "Site 1002";

make \CLASS2#1\Tab1;
setlabel \Class2#1\Tab1#1 "Demographics";
copy \work.testAW\Report#1\Report#1\Report#1 to \Class2#1\Tab1#1;

make \CLASS2#1\Tab2;
setlabel \class2#1\Tab2#1  "Disposition";
copy \work.testAW\Report#2\Report#1\Report#1 to \Class2#1\Tab2#1;

make \CLASS2#1\Tab3;
setlabel \class2#1\Tab3#1  "Adverse Events";
copy \work.testAW\Report#1\Report#1\Report#1 to \Class2#1\Tab3#1;
run;


list/ levels=all; run;
quit;

proc document name=work.testAW2;
ods pdf file="c:\temp\twolevels.pdf";
replay;
run;
ods pdf close;
quit;&lt;/CODE&gt;&lt;/PRE&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="Ksharp_0-1703483282754.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92058i6E9AD8B696AD617F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1703483282754.png" alt="Ksharp_0-1703483282754.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;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Dec 2023 06:01:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/909611#M358758</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-25T06:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/910050#M358924</link>
      <description>&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;thanks for that! Using the proc document is a nice easy solution - like it!&lt;/P&gt;&lt;P&gt;Even the code of ChrisNZ it is ok now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 11:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/910050#M358924</guid>
      <dc:creator>Michael_P</dc:creator>
      <dc:date>2024-01-02T11:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a PDF file with multilevel Bookmarks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/967508#M376372</link>
      <description>&lt;P&gt;i have issue with the output of proc document,'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have 300 characters that need to be printed in proc document but it is showing only 244 characters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc document name=work.tables;&lt;BR /&gt;&amp;nbsp;setlabel \EXXXXXX "EXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";&lt;BR /&gt;&amp;nbsp;setlabel \EXXXXXX&amp;nbsp; "EXXXXXX- XXXXXXXXXXXXXXXXXXXXXXXXXX";&lt;BR /&gt;&amp;nbsp;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;EXXXXXX "EXXXXXXX&lt;/P&gt;&lt;P&gt;EXXXXXX&amp;nbsp; EXXXXXX- XXXXXXXXXXXXXXXXXXXXXXXXXX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the first one not printing fully, only 244 characters are printing, how to increase the length to print more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 15:07:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-PDF-file-with-multilevel-Bookmarks/m-p/967508#M376372</guid>
      <dc:creator>narravulap</dc:creator>
      <dc:date>2025-05-26T15:07:11Z</dc:date>
    </item>
  </channel>
</rss>

