<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ODS PDF links in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-links/m-p/12006#M3118</link>
    <description>Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the extensive reply.&lt;BR /&gt;
I had been thinking about using ODS PRINTER and then post-processing the postscript file before sending it to Distiller.&lt;BR /&gt;
&lt;BR /&gt;
I presented a paper in 1999 (PRE-ODS days!) titled:&lt;BR /&gt;
"Creating PDF documents including links, bookmarks and a Table of Contents with the SAS®software"&lt;BR /&gt;
(http://www.lexjansen.com/seugi)&lt;BR /&gt;
I used PDFMARK operators in it, so I might go that route.&lt;BR /&gt;
&lt;BR /&gt;
What I find out might be good stuff for a new paper!&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Lex</description>
    <pubDate>Fri, 18 Apr 2008 19:02:25 GMT</pubDate>
    <dc:creator>Lex_SAS</dc:creator>
    <dc:date>2008-04-18T19:02:25Z</dc:date>
    <item>
      <title>ODS PDF links</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-links/m-p/12004#M3116</link>
      <description>I'm doing a PROC REPORT with a variable that has 2 words: "LINK1 LINK2".&lt;BR /&gt;
I know I can create a link like this:&lt;BR /&gt;
&lt;BR /&gt;
  COMPUTE MyVar;&lt;BR /&gt;
    urlstring="#JUMPTO";&lt;BR /&gt;
    CALL DEFINE('MyVar','url', urlstring);&lt;BR /&gt;
  ENDCOMP;&lt;BR /&gt;
&lt;BR /&gt;
Is there a way that I can "LINK1 LINK2" become 2 links:&lt;BR /&gt;
LINK1 --&amp;gt; #JUMPTO1&lt;BR /&gt;
LINK2 --&amp;gt; #JUMPTO2&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Lex Jansen</description>
      <pubDate>Fri, 18 Apr 2008 17:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-links/m-p/12004#M3116</guid>
      <dc:creator>Lex_SAS</dc:creator>
      <dc:date>2008-04-18T17:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: ODS PDF links</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-links/m-p/12005#M3117</link>
      <description>Hi:&lt;BR /&gt;
  I tried this with ODS ESCAPECHAR, but PDF seems to want only one link per "cell" -- so only the first link was used and when I clicked on the word, I got taken to &lt;A href="http://www.setgame.com" target="_blank"&gt;www.setgame.com&lt;/A&gt; -- I used absolute URLs because it was the easiest way to test that the navigation did work.&lt;BR /&gt;
  &lt;BR /&gt;
[pre]&lt;BR /&gt;
   &lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods pdf file='one_link.pdf';&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
proc report data=sashelp.class nowd;&lt;BR /&gt;
  title 'multiple links in one cell';&lt;BR /&gt;
  column name prtname age height;&lt;BR /&gt;
  define name / order noprint;&lt;BR /&gt;
  define prtname / computed;&lt;BR /&gt;
  define age /display;&lt;BR /&gt;
  define height /display;&lt;BR /&gt;
    &lt;BR /&gt;
  compute prtname / character length=200;&lt;BR /&gt;
  urlstring1="http://www.setgame.com";&lt;BR /&gt;
  urlstring2="http://www.sas.com";&lt;BR /&gt;
  prtname = '^S={url="'||trim(urlstring1)||'"}'||name||'^S={} '||&lt;BR /&gt;
           ' ^S={url="'||trim(urlstring2)||'"}'||'LINK2';&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  run;&lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
   &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Or, just make the second word a separate cell with its own link -- it that's an acceptable solution.&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
data testit;&lt;BR /&gt;
  infile datalines dsd dlm=',';&lt;BR /&gt;
  input name $ twolink $;&lt;BR /&gt;
return;&lt;BR /&gt;
datalines;&lt;BR /&gt;
anna,"a1 a2"&lt;BR /&gt;
bob,"b1 b2"&lt;BR /&gt;
carla,"c1 c2"&lt;BR /&gt;
dave,"d1 d2"&lt;BR /&gt;
eliza,"e1 e2"&lt;BR /&gt;
frank,"f1 f2"&lt;BR /&gt;
gail,"g1 g2"&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
      &lt;BR /&gt;
ods pdf file='this_works.pdf';&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
proc report data=testit nowd;&lt;BR /&gt;
  title 'two links with CALL DEFINE';&lt;BR /&gt;
  column name twolink link1 link2;&lt;BR /&gt;
  define name / order;&lt;BR /&gt;
  define twolink / display noprint;&lt;BR /&gt;
  define link1 /computed;&lt;BR /&gt;
  define link2 / computed;&lt;BR /&gt;
     &lt;BR /&gt;
  compute link1 / character length=100;&lt;BR /&gt;
    urlstr1 = 'http://www.setgame.com';&lt;BR /&gt;
    link1 = scan(twolink,1,' ');&lt;BR /&gt;
    call define('link1','url',urlstr1);&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  compute link2 / character length=100;&lt;BR /&gt;
    urlstr2 = 'http://www.sas.com';&lt;BR /&gt;
    link2 = scan(twolink,2,' ');&lt;BR /&gt;
    call define('link2','url',urlstr2);&lt;BR /&gt;
  endcomp;&lt;BR /&gt;
  run;&lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
 &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
I did get curious about what would happen if I took SAS out of the picture -- in so far as 2 links and PDF. So I made a Word doc with a table and in one cell, I put 2 words and put a link on each word. Then, I used my Adobe PDF button to convert the Word doc to PDF form. When I did things that way, the PDF file did have 2 separate links, one on each word.&lt;BR /&gt;
&lt;BR /&gt;
I wonder whether this is an instance where you might use PDFMARK with a PostScript file. I have not played with PDFMARK much, but it says that:&lt;BR /&gt;
&lt;B&gt;&lt;BR /&gt;
PDFMARK &lt;BR /&gt;
enables ODS to insert special tags into a PostScript file. When you use software such as Adobe Acrobat (not Adobe Viewer), Acrobat Distiller interprets the tags to create a PDF file that contains the following items: &lt;BR /&gt;
&lt;BR /&gt;
bookmarks for each section of the output and for each table.&lt;BR /&gt;
&lt;BR /&gt;
references for items that are associated with the URL= style attribute.&lt;BR /&gt;
&lt;BR /&gt;
notes for items that are associated with the FLYOVER= style attribute. Notes are optional, and are based on the PDFNOTE option.&lt;BR /&gt;
&lt;BR /&gt;
author, keywords, subject, and title in the metadata of a file.&lt;BR /&gt;
&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
You might consider contactingTech Support for more help on this issue -- they can consult with the PDF experts. &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 18 Apr 2008 18:47:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-links/m-p/12005#M3117</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-04-18T18:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: ODS PDF links</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-links/m-p/12006#M3118</link>
      <description>Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the extensive reply.&lt;BR /&gt;
I had been thinking about using ODS PRINTER and then post-processing the postscript file before sending it to Distiller.&lt;BR /&gt;
&lt;BR /&gt;
I presented a paper in 1999 (PRE-ODS days!) titled:&lt;BR /&gt;
"Creating PDF documents including links, bookmarks and a Table of Contents with the SAS®software"&lt;BR /&gt;
(http://www.lexjansen.com/seugi)&lt;BR /&gt;
I used PDFMARK operators in it, so I might go that route.&lt;BR /&gt;
&lt;BR /&gt;
What I find out might be good stuff for a new paper!&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Lex</description>
      <pubDate>Fri, 18 Apr 2008 19:02:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-links/m-p/12006#M3118</guid>
      <dc:creator>Lex_SAS</dc:creator>
      <dc:date>2008-04-18T19:02:25Z</dc:date>
    </item>
  </channel>
</rss>

