Problem Note 32888: ANCHOR= does not accept certain values in ODS PDF
The ODS PDF ANCHOR= option can be used to generate anchors in a PDF file. Using a URL link from another file or another page in the same file enables you to navigate to the page created with an anchor. If the ANCHOR= string contains an alphanumeric value, and the first number to follow a non-numeric string is zero (0), the link does not work. The code does not generate an error message, but the link does not connect to the anchored page.
The sample code on the Full Code tab shows four links. The first three create anchors that link correctly to previous pages in the PDF file, but the fourth link does not because the anchor value is "A01".
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | |
z/OS | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M0 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Professional | 9.1 TS1M0 | |
Microsoft Windows NT Workstation | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | |
Microsoft Windows XP Professional | 9.1 TS1M0 | |
64-bit Enabled AIX | 9.1 TS1M0 | |
64-bit Enabled HP-UX | 9.1 TS1M0 | |
64-bit Enabled Solaris | 9.1 TS1M0 | |
HP-UX IPF | 9.1 TS1M0 | |
Linux | 9.1 TS1M0 | |
OpenVMS Alpha | 9.1 TS1M0 | |
Tru64 UNIX | 9.1 TS1M0 | |
*
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.
The code sample creates a PDF file. The fifth page shows four links in a PROC REPORT table. The first three create anchors and link correctly to previous pages in the PDF file, but the fourth link does not because the anchor value is "A01".
ods pdf file="file.pdf" ;
/* Create ANCHOR for first page CORRECTLY */
ods pdf anchor="A101";
proc report nowd data=sashelp.class;
title "A101";
run;
/* Create ANCHOR for second page CORRECTLY */
ods pdf anchor="AA";
proc report nowd data=sashelp.shoes(obs=10);
title "AA";
run;
/* Create ANCHOR for third page CORRECTLY */
ods pdf anchor="01";
proc report nowd data=sashelp.retail;
title "01";
run;
/* Create ANCHOR for fourth page INCORRECTLY */
ods pdf anchor="A01";
proc report nowd data=sashelp.retail;
title "A01";
run;
data anchors;
x="A101";
output;
x="AA";
output;
x="01";
output;
x="A01";
output;
run;
proc report nowd data=anchors noheader style(report)={rules=none frame=void};
title "MY links";
compute x;
urlstring="#"||left(x);
call define('_c1_','url',urlstring);
endcomp;
run;
ods pdf close;
If zero is the first number to follow the first alphanumeric value contained in an anchor's string, there is a problem linking to that anchor.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2008-08-07 15:20:22 |
Date Created: | 2008-08-07 10:46:13 |