Usage Note 24174: How to link inside a PDF file from one page to another
To generate a link in PDF, use the same mechanism as that used in HTML; the URL= style attribute or the URL attribute in the CALL DEFINE statement of PROC REPORT.
Like other destinations, the PDF destination automatically generates link names with the following naming convention: IDX-IDXn. The Full Code tab shows how to link to other pages within a PDF file that is created by ODS.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Example 2 is the preferred method of linking inside a PDF file. Instead of using the automatic anchor values, the ANCHOR= option specifies #PRINT, #STANDARD, and #TRANSPOSED in the ODS PDF statements.
However, if a single procedure (like GLM) produces many tables, then Example 1 is the suggested strategy.
proc template;
define style styles.mystyle;
parent=styles.pearl;
style UserText from Note "Controls the TEXT= style" /
font_size=15pt
font_weight=bold
just=c
;
end;
run;
/* Example 1 */
footnote;
ods _all_ close;
ods pdf file="idx.pdf" style=styles.mystyle;
ods escapechar="^";
title "Contents";
ods pdf text="^S={URL='#IDX'}PROC PRINT";
ods pdf text="^S={URL='#IDX1'}PROC STANDARD";
ods pdf text="^S={URL='#IDX2'}Transposed";
ods pdf startpage=now;
proc print data=sashelp.class;
title 'PRINT';
/* Use only in SAS 9.4 and higher: */
footnote "^S={URL='idx.pdf#PAGE=1'}return to page 1";
run;
proc standard data=sashelp.class print;
title "STANDARD";
run;
proc transpose data=sashelp.class;
run;
proc print;
title "Transposed" ;
run;
ods pdf close;
footnote;
/* Example 2 */
ods pdf file="anchor.pdf" style=styles.mystyle;
ods escapechar="^";
title "Contents";
ods pdf text="^S={URL='#print'}PROC PRINT";
ods pdf text="^S={URL='#standard'}PROC STANDARD";
ods pdf text="^S={URL='#transposed'}Transposed";
ods pdf startpage=now;
ods pdf anchor="print";
proc print data=sashelp.class; title "PRINT" ;
/* Use only in SAS 9.4 and higher: */
footnote "^S={URL='anchor.pdf#PAGE=1'}return to page 1";
run;
ods pdf anchor="standard";
proc standard data=sashelp.class print;
title "STANDARD";
run;
ods pdf anchor="transposed";
proc transpose data=sashelp.class;
run;
proc print;
title "Transposed";
run;
ods pdf close;
Type: | Usage Note |
Priority: | low |
Topic: | System Administration ==> Printing Third Party ==> Output ==> PDF SAS Reference ==> ODS (Output Delivery System)
|
Date Modified: | 2006-01-20 12:04:06 |
Date Created: | 2004-09-30 12:20:06 |