BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jhixon
Calcite | Level 5

Hi All,

I've about convinced myself that if you apply any type of security to a SAS generated PDF document, then all internal links within the document created with anchors become non-functional.

Is there any way around this?

When you use the advanced editing tool in Acrobat to inspect the internal links, rather than the values created in the anchor statement, you see some strange characters, and the link is non-functional.

I assume this is because when the document is encrypted, SAS somehow loses track of the association between the link and the anchor.

If you create a simple PDF document with anchors/links, and use no security, everything works fine.

But, if you apply any security: then all of the anchors/links that work fine without security become non-functional.

Any way to allow anchors/links to work in a PDF document created by SAS ODS PDF if you also want to use SECURITY?

Using SAS V9.3.

Thanks for any suggestions.

Right now, it appears as though "You can't get there from here."  ??  🙂

John

1 ACCEPTED SOLUTION

Accepted Solutions
jhixon
Calcite | Level 5

I did open a ticket with SAS Support.  The final reply is pasted below.  A new SAS NOTE

will be forthcoming, and this may get fixed in SAS v9.4?

Cheers,

John

PS: Cynthia - Thanks for the fast reply.  Should I mark this dicsussion as Answered?

-----Original Message-----
From: SAS Technical Support [mailto:support@sas.com]
Sent: Monday, October 01, 2012 5:03 PM
To: 
Subject: [SAS 7610877687] Anchors and Links don't work in ODF Document if Security is Used?

::~:: NOTE: IF YOU REPLY, ALL TEXT FOLLOWING THIS LINE WILL BE IGNORED.

John,

Unfortunately there is not any workaround or shortcut to get the anchored links to function when the PDFSECURITY option is set to a value other than NONE.  The development team is working to correct this in a future SAS release and in the meantime I will write a SASNOTE to document the problem. We appreciate you bringing this to our attention.

Please let me know if you have further questions on this issue, or clarify if I have misinterpreted.  If I do not hear otherwise, I will assume you have the information you need and the track will close automatically in 7 days.

Regards,

Bari Lawhorn

View solution in original post

4 REPLIES 4
jhixon
Calcite | Level 5

Here is some very simple code that illustrates the issue.  Note that the actual application code is much much more complicated, with use of ODS Layout to place 'pretty' GPLOT charts etc etc.  It all works fine if the doucment is not secured.  But, as soon as try to use security, the anchors/links o longer work?  The password to open the "Secured" PDF file is:   TheBigCheese.

data junky;
do x=1 to 100;
  y=rannor(x);
  output;
end;
run;
%macro rdt;
   %global rdt;
   data _null_;
      rep_date=trim(left(put(date(),weekdate18.)));
      rep_time=trim(left(put(time(),TOD8.)));
      rdt=
       rep_date||rep_time;
      put rdt=;
      call symput('rdt',rdt);
   run;
%mend rdt;

%let MaxPage=13;

%rdt;
options PDFSECURITY=NONE;
ods escapechar='~';
options orientation=landscape nonumber nodate;
ods pdf notoc  file="C:\temp\Testing123_NotSecure.pdf" startpage=never compress=9;
ods pdf startpage=yes;
footnote h=8pt f=Helvetica j=l "Printed By [Lowly_Grunt] on &rdt (PST)"
     j=r "page ~{thispage} of &Maxpage";
footnote1 h=8pt f=Helvetica j=l "The Anchors/Links WORK in this PDF because it has NO SECURITY";
footnote2 h=8pt f=Helvetica j=l "Printed By [Lowly_Grunt] on &rdt (PST)"
     j=r "page ~{thispage} of &Maxpage";
data junk;
length Table$150;
table="table1"; text="Table of Summary Statistics for Each Parameter"; output;
table="table2"; text="Simple Chart"; output;
table="table3"; text="Table of Nelson 1 Violations"; output;
run;
ods pdf startpage=yes;
title "VERY SIMPLE Example just for illustration!";
title2 "Real Code has anchors embedded in Proc Report Tables, many charts, etc etc";
proc report data=junk nowindows;
column  table text;
define text / display 'Table of Contents   (Click to link to location in document) ' 
   style=[cellheight=20pt cellwidth=4.75in font_size=10pt vjust=c ];
define table / noprint;
compute text;
  urlstring="#"||trim(Table);
  call define (_col_,'URL',urlstring);
endcomp;
run;

ods pdf startpage=yes;
ods pdf anchor="table1";
title "table 1";
proc report data=junky nowindows;
column x y;
define x / display;
define y /display;
run;

ods pdf startpage=yes;
ods pdf anchor="table2";
title "table 2";
proc report data=junky nowindows;
column x y;
define x / display;
define y /display;
run;


ods pdf startpage=yes;
ods pdf anchor="table3";
title "table 3";
ods pdf anchor="table3";
proc report data=junky nowindows;
column x y;
define x / display;
define y /display;
run;
ods pdf close;

/*

Now make same simple output with Security.  I've trid all kinds of combinations.
But, it appears as if when the document gets encrypted, the SAS PDF Driver loses
the connection between the anchors and the calling links?  You see garbled characters
if you interrogate the links using Adobe Acrobat...

*/


options PDFSECURITY=HIGH PDFCONTENT PDFACCESS PDFASSEMBLY;
options PDFPASSWORD=(OPEN="TheBigCheese");
*options PDFSECURITY=LOW PDFCONTENT PDFACCESS;
ods escapechar='~';
options orientation=landscape nonumber nodate;
ods pdf notoc  file="C:\temp\Testing123_Secure.pdf" startpage=never compress=9;
ods pdf startpage=yes;
footnote h=8pt f=Helvetica j=l "Printed By [Lowly_Grunt] on &rdt (PST)"
     j=r "page ~{thispage} of &Maxpage";
footnote1 h=8pt f=Helvetica j=l "The Anchors/Links DO NOT WORK in this PDF because it has SECURITY";
footnote2 h=8pt f=Helvetica j=l "I've tried all combinations of Security Settings...but the anchors/links just dont work?";
footnote3 h=8pt f=Helvetica j=l "Printed By [Lowly_Grunt] on &rdt (PST)"
     j=r "page ~{thispage} of &Maxpage";

data junk;
length Table$150;
table="table1"; text="Table of Summary Statistics for Each Parameter"; output;
table="table2"; text="Simple Chart"; output;
table="table3"; text="Table of Nelson 1 Violations"; output;
run;
ods pdf startpage=yes;
title "VERY SIMPLE Example just for illustration!";
title2 "Real Code has anchors embedded in Proc Report Tables, many charts, etc etc";
proc report data=junk nowindows;
column  table text;
define text / display 'Table of Contents   (Click to link to location in document) ' 
   style=[cellheight=20pt cellwidth=4.75in font_size=10pt vjust=c ];
define table / noprint;
compute text;
  urlstring="#"||trim(Table);
  call define (_col_,'URL',urlstring);
endcomp;
run;

ods pdf startpage=yes;
ods pdf anchor="table1";
title "table 1";
proc report data=junky nowindows;
column x y;
define x / display;
define y /display;
run;

ods pdf startpage=yes;
ods pdf anchor="table2";
title "table 2";
proc report data=junky nowindows;
column x y;
define x / display;
define y /display;
run;


ods pdf startpage=yes;
ods pdf anchor="table3";
title "table 3";
ods pdf anchor="table3";
proc report data=junky nowindows;
column x y;
define x / display;
define y /display;
run;

John

Cynthia_sas
SAS Super FREQ


HI:

  I think this really is a question for Tech Support. Either the links are working as designed when security is on, or this is a defect that needs to be reported to the developer. But Tech Support are the ones who make that determination.

  To open a track with Tech Support, fill out the form at this link:

http://support.sas.com/ctx/supportform/createForm

cynthia

jhixon
Calcite | Level 5

I did open a ticket with SAS Support.  The final reply is pasted below.  A new SAS NOTE

will be forthcoming, and this may get fixed in SAS v9.4?

Cheers,

John

PS: Cynthia - Thanks for the fast reply.  Should I mark this dicsussion as Answered?

-----Original Message-----
From: SAS Technical Support [mailto:support@sas.com]
Sent: Monday, October 01, 2012 5:03 PM
To: 
Subject: [SAS 7610877687] Anchors and Links don't work in ODF Document if Security is Used?

::~:: NOTE: IF YOU REPLY, ALL TEXT FOLLOWING THIS LINE WILL BE IGNORED.

John,

Unfortunately there is not any workaround or shortcut to get the anchored links to function when the PDFSECURITY option is set to a value other than NONE.  The development team is working to correct this in a future SAS release and in the meantime I will write a SASNOTE to document the problem. We appreciate you bringing this to our attention.

Please let me know if you have further questions on this issue, or clarify if I have misinterpreted.  If I do not hear otherwise, I will assume you have the information you need and the track will close automatically in 7 days.

Regards,

Bari Lawhorn

Cynthia_sas
SAS Super FREQ

Hi,

  Yes, you can mark it as answered, even if it's not the answer you hoped for! It may still help someone else who is looking for the same information.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1870 views
  • 0 likes
  • 2 in conversation