The SAS Output Delivery System and reporting techniques

Creating PDF with links

Reply
Occasional Contributor
Posts: 16

Creating PDF with links

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;
SAS Super FREQ
Posts: 8,864

Re: Creating PDF with links

Posted in reply to Bill_in_Toronto
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
Ask a Question
Discussion stats
  • 1 reply
  • 138 views
  • 0 likes
  • 2 in conversation