I searched in community and find the following code to create the hyperlink in pdf that can link to a external url of any website.
OPTION NODATE NONUMBER;
OPTIONS PAPERSIZE=A4;
OPTIONS TOPMARGIN=0.5 in BOTTOMMARGIN=0.5 in LEFTMARGIN=0.5 in RIGHTMARGIN=0.5 in;
ODS NORESULTS;
ODS PDF FILE = "E:\Desktop\TEST.pdf" dpi=1800;
data _NULL_;
set SASHELP.CLASS(obs=1);
declare odsout obj();
obj.format_text( data: "Information:",
overrides: " just=left color=green font_weight=bold font_size=8pt ");
obj.href(data:
"Adresse", url: 'https://www.test.fr/', inline_attr:'color=blue');
Run;
ODS PDF CLOSE;
But what I want is adding some internal and not external hyperlink above for a pdf like TOC(table of content) in the first page of a present pdf which has already existed. My confusion is how to add a internal and local hyperlink for a preexisting pdf.
3Q
Here is an example :
ods pdf file='c:\temp\temp.pdf';
title link='#xxxxx' 'whatever it is';
proc report data=sashelp.class nowd;
compute age;
if age.sum=12 then call define(_col_,'url','#yyyyy');
endcomp;
run;
ods anchor='xxxxx';
title 'heart';
proc print data=sashelp.heart(obs=10);run;
ods anchor='yyyyy';
title 'cars';
proc print data=sashelp.cars(obs=10);run;
ods pdf close;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.