%inc fda; ods pdf file="other.pdf"; proc print data=sashelp.class; run; proc print data=sashelp.class; run; proc print data=sashelp.class; run; proc print data=sashelp.class; run; proc print data=sashelp.class; run; ods pdf close; /* * NOTE: the tfda.sas doesn't do anything remotely sensible under * FreeBSD, at least, even for straight PDF. */ /* Trying to figure out what to expect here is *very* confusing. Here's what they do. - => cool. Expected behavior. # => weird. Notes are below. PDF means ODS PDF; PDFMARK means ODS PS PDFMARK, then transformed with ps2pdf (Unix) or Adobe Acrobat Distiller (Windows). FDA means run through fda.sas and *then* distilled. -- Unix -- -- Windows -- type link (short) PDF pdfmark fda PDF pdfmark fda PDF other.pdf - - - - - - URL http://www.sas.com - - 3 - - - SAS tfda.sas 1 1 4 5 5 - INT #internal - - - - - - PDF# other.pdf#IDX - 2 2 - - - (6) URL# http://a.b.c/d#e - - - - - - 1 Tries to link to file://$pwd/http%3Atfda.sas. Suspect that this is better in older releases (!) The pdfmark has http:fda.sas in it and I believe that it means *not* to have http: unless it has // . . . At least the Unix acrobat view is putting the http: in the "wrong" place. 2 Goes to the first page of the file - ignores the /Dest. Suspect that this is a bug in ps2pdf. Right now FDA is set up to transform this case since it fails the same either way, presumably due to the ps2pdf bug, but need to check with Acrobat Distiller to see if this is right. Note that once it seemed to work when transformed (only) but I cannot reproduce this observation. 3 Does not do anything - ? Perhaps Netscape? Perhaps would work if network was up? The distilled output looks correct to me. 4 Says "cannot open file". I suspec that on Windows this would be correct, but I'm just guessing. 5 http:fda.sas is not found, but at least it tries for the right thing :-) 6 I have to avoid the transform when /Dest is present, alas, because /Dest doesn't work with /Launch. I verified that this fails even with Windows, so I modified fda.sas to not transform in that case. */ ods escapechar="^"; data; length test $200; test = "^S={url='other.pdf'}this is an example PDF link"; output; test = "^S={url='http://www.sas.com/'}this is an example URL link"; output; test = "^S={url='tfda.sas'}this is an example SAS link"; output; test = "^S={url='#internal'}this is an example internal link"; output; test = "^S={url='other.pdf#IDX3'}this is an example PDF link w/ dest"; output; test = "^S={url='http://support.sas.com/rnd/base/topics/odsprinter/faq.html#textgraph'}this is an example HTML link w/ dest"; output; run; ods html file="tfda.html"; ods pdf file="tfda.pdf"; ods ps pdfmark file="tfda.tmp"; proc print;run; ods ps anchor="internal"; ods pdf anchor="internal"; ods html anchor="internal"; proc print data=sashelp.class; run; ods _all_ close; %make_compliant("tfda.tmp", "dfda.ps"); /* If you are on Unix and have it installed, you can distill now: */ * x ps2pdf dfda.ps; /* OUTPUT - tfda.pdf - current pdf output tfda.tmp - raw pdfmark output dfda.ps - transformed pdfmark output ready for distillation dfda.pdf - pdf as distilled via ps2pdf, if enabled above. */ /* AFTER YOU RUN THIS - distill dfda.ps to get a a compliant file, * dfda.pdf. */