BookmarkSubscribeRSS Feed
Bill_in_Toronto
Obsidian | Level 7
Hi:
In a PDF created by ODS I would like plot symbols and values in tables to link to external files or bookmarks in the same PDF.
Below is a test using a hard-coded link. If this feature works, I will modify the code so the link is based on the value.
The PROC PRINT displays correctly, but clicking on a value does not initiate the link.
The PROC GPLOT ignores the escape character.
Is there a way to do this in 9.1.3?


DATA anno;
SET SUBSET_for_pdf_test;
LENGTH linkval $ 60;
linkval = '0.99 ^S={URL="L:\users\bills\camnet_history.pdf"}';
xsys='2';ysys='2';
x=sample_start_date;y=nh4_ug_2_filters_;text=linkval;OUTPUT;

RUN;
ODS escapechar="^";

ODS PDF style=journal FILE="l:\users\bills\altkeytest.pdf" ;
ODS LISTING close;
PROC PRINT DATA=anno;
var linkval nh4_ug_2_filters_;
RUN;
PROC GPLOT DATA=subset_for_pdf_test;
PLOT nh4_ug_2_filters_ * sample_start_date
/
anno=anno
;

RUN;
QUIT;

ODS PDF CLOSE;
ODS LISTING;
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
SAS/Graph does not support the use of ODS Escapechar. ODS HTML does have a method to describe an HREF attribute to simulate drill-down or linking.
Check out this Tech Support Note on the capability:
http://support.sas.com/faq/035/FAQ03592.html

If you created an HTML file and then distilled the HTML file to be a PDF file (with a 3rd party converter or an Adobe product), I do not know whether PDF would retain the hyperlinks or not. This is a question that is probably best answered by Tech Support.

Good luck!
cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 935 views
  • 0 likes
  • 2 in conversation