The SAS Output Delivery System and reporting techniques

How to delete Extra bookmark of the pdf file using proc document?

Reply
Occasional Contributor
Posts: 5

How to delete Extra bookmark of the pdf file using proc document?

Hi,

 

I encount a problem when deal with the bookmarks of the pdf files, see my code below:

 

ods document name=test(write);
ods pdf file='temp2.pdf';
     proc print data=sashelp.class;
     run;

     proc sql;
         select * from sashelp.class;
     quit;

     proc tabulate data=sashelp.class;
         class age;
         var height weight;
         table age, height weight;
     run;
	 
     proc report data=sashelp.class;
	     column _all_;
     run;
	 
ods pdf close;
ods document close;

ods output properties=temp;
      proc document name=test;
              list/levels=all;
      run;quit;

ods pdf file="temp5.pdf";

     proc document name=test;
	 
         make \test1; 
	 dir \test1#1;
	 setlabel \test1#1 "Pirnt output";
	 copy \print#1\Print#1 to ^;
	 replay \test1;

	 make \test2;
	 dir \test2#1;	 
	 setlabel \test2#1 "SQL output";
	 copy \SQL#1\SQL_Results#1 to ^;	
         replay \test2;	 

	 make \test3;
	 dir \test3#1;	 
	 setlabel \test3#1 "Report output";
	 setlabel \Report#1\Report#1 "Detail";
	 copy \Report#1\Report#1 to ^;	 
         replay \test3;	      
     run;quit;
ods pdf close;	

However, after run this code, there's always a level-3 bookmark with name "Table" on the third block(Report output part), please see the snapshot below:

Before modifying the bookmark, it is:

before.PNG

 

After modifying the bookmark, it is:

after.PNG

 

Here, I want to remove the level-3 bookmark "Table 1",  does anyone have any suggestions? many thanks in advance!

SAS Super FREQ
Posts: 8,743

Re: How to delete Extra bookmark of the pdf file using proc document?

Hi, there is a Tech Support note about the extra Table1 node generated by PROC REPORT and how you can alter your PROC REPORT code to remove it. Here's the note: http://support.sas.com/kb/31/278.html

There have also been some previous postings on the Forums about this extra node and how to remove it. But the TS note has code and the code that's posted illustrates the fix.

cynthia
Occasional Contributor
Posts: 5

Re: How to delete Extra bookmark of the pdf file using proc document?

Hi Cynthia,

 

thank you very much, it works well! For exploratory purpose, can we use proc document to remove the "Table 1" ? 

SAS Super FREQ
Posts: 8,743

Re: How to delete Extra bookmark of the pdf file using proc document?

Hi:
It was my understanding is that to remove the Table 1 node completely, you must use the technique shown in the Tech Support note.

cynthia
Occasional Contributor
Posts: 5

Re: How to delete Extra bookmark of the pdf file using proc document?

Hi Cynthia,

 

thank you very much for the patient reply, i agree with you, i think that(useing content='' in the document you mentioned) might be the best solution so far, and let's wait for any constructive ideas about this.

Ask a Question
Discussion stats
  • 4 replies
  • 194 views
  • 0 likes
  • 2 in conversation