BookmarkSubscribeRSS Feed
niyshah
SAS Employee
When I execute the below code, it gives me the required output in pdf, however I get some unwanted bookmarks like “FilePrint”.
Is there any way, I can get rid of these additional bookmarks?

Any help is appreciated.

--Thanks

ods escapechar="~";

proc template;
define table foo;
column text ;
style={frame=void};
define text;
print_headers = off;
end;run;


title ;



ods pdf file="C:\pngconvert.pdf" bookmarklist=show bookmarkgen=yes;

ods proclabel = "Test";
%let text=~{style [just=c font_weight=bold font_size=14pt] Test };
/**/
data _null_ ;
file print ods =(template="foo");
description="";
length text $100;
text = "&text";
put _ods_;
run;

ods pdf close;
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
ODS creates a "node" or label for every major creation point of a document. So when the DATA step starts, you get a node for the beginning of the data step program -- that is the node label that gets changed by the ODS PROCLABEL statement.

The next major creation point is when the template gets called and bound to some data. Without any other instruction from you, that node is labelled FilePrint, FilePrint2, FilePrint3, etc. You can change or eliminate the name on that node in the SAS Results Window and in the PDF TOC as shown below. Note that the PDF TOC will not show the second level node at all, while the SAS Results Window will still show the object, but with the object name. This is not a big deal, because the node in the PDF TOC is gone and the ODS PROCLABEL text is what appears.

cynthia
[pre]
ods escapechar="~";
ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
proc template;
define table foo;
column text ;
style={frame=void};
define text;
print_headers = off;
end;
end;
run;

title ;

ods listing close;
ods pdf file="C:\temp\pngconvert4.pdf" bookmarklist=show bookmarkgen=yes;

ods proclabel = "Test";
%let text=~{style [just=c font_weight=bold font_size=14pt] Twas brillig and the slithy toves };
/**/
data _null_ ;
file print ods =(template="foo"
object=wombat
objectlabel="ObjectLabel");
description="";
length text $200;
text = "&text";
put _ods_;
run;

ods proclabel = 'The Second Output';
%let text=~{style [just=c font_weight=bold font_size=14pt] Did gyre and gimble in the wabe };
/**/
data _null_ ;
file print ods =(template="foo"
object=koala
objectlabel=" "); /* quote space quote */
description="";
length text $200;
text = "&text";
put _ods_;
run;

ods pdf close;

[/pre]
niyshah
SAS Employee
Thanks, it worked out.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 938 views
  • 0 likes
  • 2 in conversation