"open a file" hyperlink syntax, relative link

Hello all,
  I regularly put reports together that consist of 1 report and many "supporting documents", all in PDF format.  Each page of the report has anywhere from 1 to 8 links on it (report comes from SQL Reporting Services).  These links point to their supporting document(s).  The report and supporting documents are burned to a CD to send out to our clients.  The report is opened in Acrobat, and when a link is clicked the supporting document is opened in a new window.
  I have tried every way I can imagine to format a link so that when the report is output to PDF the link shows up as an "open a file" link rather than a hyperlink.
  My question:  Since I know I can make an absolute URL hyperlink work correctly...and relative file links work correctly when I manually link to the files, what is the correct syntax to achieve a relative file link?
  The directory structure burned to CD:
           >CD Drive
               >Main Folder
                    >PDF Report
                    >Supporting Documents Folder
                         >Document #1
                         >Document #2
I have tried this javascript inside a SSRS expression:   (Pardon the code, I'm java-stupid)
"javascript:void(window.open('FILE:\Documents\'" & filename-parameter &"'.pdf'"
Bottom line:  I'm looking for a way to automatically link one PDF to many PDFs based on the above folder structure, given a variable that comes from SSRS.
Thanks

Matt,
  Well, I did end up with a not-so-elegant-but-workable solution.  Here's what makes it tick:
1.  You'll need to construct the link to the target .PDF file (probably through SSRS).  You said that you are going to burn these files to CD, right?  If so, you'll probably want to construct something like [filename + .PDF], without brackets.  If your SSRS "list of PDF files" already looks like that you're that much further ahead.
2.  You'll need to use Adobe Livecycle Designer to create a report template.  I ran one of my SSRS reports, rendered it to PDF, and then created a new form template based off that PDF in LC Designer.  If you've never worked with LC Designer, it's not too hard.  Since the layout of my reports are variable in length, I took advantage of the "positioned" and "flowed" subforms.  MAKE SURE THE LC FORM FIELD NAMES MATCH THE SSRS FIELD NAMES.  This is a bit of a pain, but once you have it working you'll be thankful. 
My links are handled with buttons in LC Designer.  First, make a textbox to contain the text of the link to the target PDF from step 1 (make this in a flowed subform). Then, make a button to go directly over the textbox, remove button's caption, set button to transparent.  THIS PART WILL TAKE SOME TWEAKING depending on how your form is setup.  Add the following to the CLICK event of your button: 
app.openDoc({cPath:xfa.resolveNode("YourReportName.ReportPage#.YourSubFormName.NumberofSub form.YourLinkText").rawValue,oDoc: this});
If you already understand how this works feel free to read past it.  The app.openDoc needs two things from you, cPath and oDoc.  cPath is the path to the target PDF.  The xfa.resolveNode("YourReportName.ReportPage#.YourSubFormName.NumberofSubform.YourLinkText" ).rawValue says the link path is the literal value of this textbox, located in this subform, on this page of this report. 
oDoc is where the relative part comes into play.  If you construct the [filename + .PDF] links as in step 1, and you set oDoc:this, clicking on the link will instruct Acrobat to open the target PDF using the cPath relative to your list o' links report.
3.  Go back to SSRS, render one of your reports as XML and save it.  This is the data that you'll import into your form template.
4.  This is where I got tripped up.  For each and every file that you want to open up from a link you will have to set its Disclosed property to True.  I accomplished this through a batch action in Acrobat.  I'm not sure what version you have, but if you're using 10 it is under File>Action Wizard>Create New Action.  These are my settings:
                Start with: A file open in Acrobat
                Under "More Tools", select "Execute JavaScript", click on "Options" and paste in this: this.addScript("This Doc is Disclosed", "this.disclosed = true;");
                Save to:  Same folder selected at start So, all you have to do when preparing your target documents is run that batch action.  Add all of your target PDFs to window that pops up and click run.  AFAIK, once you've disclosed a  PDF, you won't have to re-disclose it. 
Once you have all that setup the process to create a CD becomes fairly easy. 
1. Render XML from SSRS
2. Disclose all target PDFs
3. Import XML into the template PDF you created with LC. (actual import done via Acrobat, not LC) 4. Read the new comics on XKCD while staring intently at the screen to make the boss think you are still working diligently. 
Depending on how you want the folder structure to look like on the CD, you might have to change the way you construct your links.  I have used several methods to suit different needs, but for proof of concept, I'd probably just stick to the way I described in step 1 (resulting CD won't have a folder structure, you'll just have your "master" PDF and all of your target PDFs on the CD.  Right now I just set the target PDFs to hidden via right-click>properties before I burn them to CD.  It's lazy, but it works.) I don't know if you use an ISO program like MagicISO, or one of the others, but it will help reduce the number of ruined CDs. 
There are many places to get tripped up and I'm sure I haven't explained the process fully, so feel free to ask if you run into problems.  Also, not trying to advertise for anyone, but pdfscripting.com was a HUGE help.  Thom Parker runs it, I believe.  They sell a subscription to their website (which I would say is worth it), but they also have a ton of useful freebies. 
Anyway, I hope this can help.
Chris

Similar Messages

  • Opening a pdf file in a relative link / local

    Maybe this sounds simple.
    But I get used to AS2 code to open  a pdf file like the code below:
    getURL("pdfDocuments/pdfname.pdf","_blank")
    As I search uncle Google I'm stuck to this as equivalent to getURL in AS2.
    btn.addEventListener(MouseEvent.CLICK, btnClick);
    function btnClick(e:MouseEvent):void {
              navigateToURL( new URLRequest("pdfDocuments/pdfname.pdf"), "_blank");
    But still it did'nt work.
    Before in AS2 getURL working on mailto, pdf on a relative link and a typical url's.
    But as to AS3 navigateToURL function only works on mailto and typical url.
    Any tweaks to the code above, to get it to work? will much appreciated.
    Thanks,

    There's numerous examples if you google "call javascript from actionscript".
    Here's 1 that sums it up pretty simply, just import flash.external.ExternalInterface; then use it statically via its call() method to call javascript. Then in the javascript simply do what you want.
    http://www.hardcode.nl/archives_155/article_334-call-javascript-function-from-as3-and-vice versa.htm
    e.g. ACTIONSCRIPT:
    import flash.external.ExternalInterface;  // call javascript function passing to load relative URL "pdfs/some.pdf"ExternalInterface.call("loadPDF","pdfs/some.pdf");
    e.g. HTML
    <html><head><script type="text/javascript">// <!-- // function with the called namefunction loadPDF(pdfName){     // open a new window (or tab) to the PDF requested from AS     window.open(pdfName,"_blank"); } // --></script><body> </body></html>
    Nothing really much to it.
    Here's a reference to window.open() if you want to customize the opened window:
    http://www.w3schools.com/jsref/met_win_open.asp

  • Force PDF to open in browser to preserve relative links?

    We have thousands of PDF files that are set up to include relative links within the document to other PDF files. The issue we're having is that when people have set up their browser to open the PDF as a separate application, the relative links revert to their C drive/temporary internet files and break (the link looks something like this: file:///C|/Users/callen2/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Cont ent.IE5/purchased_systems.pdf). Is there any way to force the PDF to open within the browser so that the relative links continue to work?
    If not, is there a way to do a blanket conversion of the links from a relative link to an absolute link so we don't have to go into each document and link separately?

    Hi
    You need to set Browser File Handling  to
    Permissive.
    Open Central Administration -> Manage Web Applications -> Select web application -> General Settings >>
    Browser File Handling >> set to Permissive .
    Regards, Rajendra Singh If a post answers your question, please click Mark As Answer on that ost and Vote as Helpful http://sharepointundefind.wordpress.com/

  • Trouble opening .inx files in CS3 - links randomly replaced with foo.jpg

    I have to move a lot of CS4 InDesign files to CS3, and I often run into a bizarre problem. After opening an .inx file in InDesign CS3, sometimes perfectly normal PDF, JPG, EPS and AI files will mysteriously be replaced with a linked file called "foo.jpg" that InDesign thinks is missing (it always reports the path as "c:foo.jpg"). I then have to go figure out what the original file was actually called and where it was saved and relink it manually.
    There is no rhyme or reason to when linked files don't come over - our logo is saved in one location and linked in every single piece we make, yet sometimes it links fine when imported into CS3 and sometimes it doesn't. Going back to CS4 and exporting a new .inx file never works - a file that will not link correctly in CS3 will never show up correctly.
    It always thinks "foo" is a .jpg file, even if the original link was actually a .pdf, .eps or whatever.
    Any ideas? I'm perplexed.

    Smells like a bug to me. Did you try reporting it?
    What happens if you search the incp file for "foo"? Does it find 
    anything?
    When the vendor opens the file, what is the link name on his end?
    Harbs

  • Missing links when different users open a file

    I'll try to sum this up as best I can. All mentioned files (InDesign and linked assets) are on a server. Mac OSX 10.9.4, InDesign CC
    Some colleagues and I access the same InDesign files from time to time, what we're noticing is that when one of us opens the file all is well, however when another user opens the file all of the links are missing. If I open the file and links are missing and I relink all instances, save and close, and then another user opens the file—all the links are missing on her machine. Has anyone dealt with this before?
    Thanks,
    Jamie

    OH MY GOD TELL ME ABOUT IT!  It's the source of my frustration with this new job.  I come from a company where everyone knew production and best practices for sharing files over the network and this kind of thing never happened.  And here no one knows how to do anything but think they have this awesome workflow.  And no one knows how to use the software to it's fullest and make things so difficult.  There's insane file duplication on multiple share points of my server and no one is willing to change the way they work.  I've been here for 2 months and like every day i find something else that they do inefficiently and refuse to change. 
    Back to the issue.  I did some troubleshooting and found that when I packaged a file locally, then copied that package to the server that's when the links break because the indd file is still pointing to the local package folder.  I'm so used to packaging to the server that i didn't think of that possibility.
    Thanks for your input!  Other than their nightmare file management, this new place is great though (not that that matters with this post...just saying)

  • Templates and document relative linking.

    Im trial using DW cs5 and find that if i make a template and then
    use that template to make pages it doesnt make document relative links.
    Instead it makes links relative to my local drive. ie c/documents/foo.
    Even if I have the template file with document relative links, when I make the page it turns into local relative and to upload this to a server wont work.
    Am I missing something ?
    I can figure it out.
    CS4 did this fairly easy.
    Cheers

    I dont know how to fix this.
    My site is set to relative document linking and the template is linked that way but when I make a new page from template it reverts to local linking.
    instead of ../../ images , I get c://documents/ etc.
    I dont know whats going on.

  • Opening .rar files

    I tried opening a .rar file with no luck. What program should I get to open these zipped files. I want something free. Or maybe there is something on my iMac that I'm not aware of.
    Regards, Pat

    There's a freebie here I've used. Has worked for my use so far (for the few times I've needed to open a .rar file). rar is rarely used on the Mac, so there's little support out there for it.
    Stuffit also opens RAR files. The item linked to above is the only way to create RAR archives on the Mac. That is, from the Terminal as a command line only application. There has been no one yet that has written a RAR utility to create such files from the GUI that I've been able to find.

  • How to display related links iview in content area?

    Hi,
    I have created Related links, but they are opening in a separate windows even though I have set the attribute of the iviews to "open in portal content area".
    Please let me know how I can display the iviews of the Related links in the content area.
    -Ashwini.

    Hello Ashwini,
    I don't think you have changed the property at the right place.
    Open the iview for which related link is added. Now from the drop down box at the top right select Related Link. The related link editor will open which will show the related link iview. Select the iview and click the EDIT button at the bottom. The related link iview will open. Now Change the "Launch in new WIndow" property.
    When you add an iview as reletd link to some other iview, a delta link is created and added to the iview.
    This will solve ur problem.
    Regards
    Deb

  • File hyperlink doesn't open link file, says 'No permission'

    Hi,
    I have created some pdf file links in Evernote and when try to open them systems says "The file __ couldnt be opened because you dont have permission". I am the only user on my mac(OS 10.8.3) with admin privilege and checked all permissions it is "Read/Write" for me. Also all those files were created by me.
    But when I open the file manually in preview and close the window (Not Preview application), and then click the hyperlink it opens it. So I am not sure what to do, apparently these file links does not work when document is not opened by preview application.
    I also have a hyperlink for a document (Pages) but that opens perfectly fine.
    I searched in community forum and someone suggested to repair file permissions using disk utility. I tried all that but no results.
    Please help and thank you .
    Shan

    Back up all data. Don't continue unless you're sure you can restore from a backup, even if you're unable to log in.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1 or if it doesn't solve the problem.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • PDF export with link to document defaulting to "Open a web link" instead of "Open a file"

    I have a MS Access database and I'm trying to export reports to PDF (I have Acrobat XI Pro) that include a hyperlink to another document on the same drive on my computer.  I have tested this with hyperlinked email addresses, and emails export fine to PDF and are still functional, opening a new email in Outlook.  The hyperlinks to documents work fine in MS Access, opening a Word, PDF, or other document when clicked.
    When I export to PDF, the links to documents say, "This document is trying to connect to: file:" and my filepath.  If I say "Allow," the link tries to open in my default web browser, which comes up blank.  I've tested this on other computers in our office too.  When I right-click the link, I have the option to "Open weblink as a new document" -- this opens the document successfully, but won't be very helpful or fast for our staff.  When I examine the link with Tools - Add or Edit Link, I see that the link's action defaulted to "Open a web link" when the PDF was created.  This seems like it should be "Open a file."  To see if "Open a file" would work in theory, I tried creating a test button in a blank PDF and made the "mouse up" action "Open a file" and linked to various documents on my computer.  Each time, the button does not react to being clicked at all, like nothing happened.
    I also tried making a basic Word doc with just the hyperlink to another document.  It works fine in Word, but, when saved as a PDF, the hyperlink does the same behavior-- tries to connect to the web instead of opening the file on the computer.
    I have a lot of experience building Acrobat PDF forms and working in Acrobat, and I'm almost certain I've created links that open another file on the computer in Acrobat before, but I'm out of ideas and an internet search isn't turning up much.  I welcome any suggestions for things to try.  Thank you!

    This is what I currently have, and it attempts to open in a web browser.  Do you know of a setting in Acrobat I might need to change, or any other solution to tell Acrobat to open the "file:" URL as a document, not try to start the web browser?

  • Linking to a MS word file in Safari does not open the file

    I access a web site that has hyperlinks to MS Word files. When I click on the link the following happens.
    1. I get a new empty window
    2. I get the download window showing the file
    But the file does not load in Word.
    I have to manually click on the file to load it into word.
    When I access the same page with Firefox,and click on the hyperlink the Word file loads into Word with no action required by me.
    Is this they way Safari works or is there some preference I can set to make it load the file into Word?
    Safari does open pdf files fine.

    1. I get a new empty window
    2. I get the download window showing the file
    This is normal for a site that has the Word files links set up to open in a new page. (Which is almost necessary in Windows IE, since IE will open the Word doc in the same browser window otherwise, losing all web site navigation.) But Safari doesn't open Word files directly, so you get that blank new window while the file downloads in the background.
    But the file does not load in Word.
    What do you have in Safari > Preferences, in the General section, for "Open safe files after downloading"? If you have that box checked, files that the Mac OS considers "safe" (JPEGs, PDF files, etc.) will open automatically in the default program for that type of file. The only question is whether Word documents are considered safe. They might not be, since they can carry macro viruses. Checking now...
    I tested that, and it seems that Word files are not considered "safe" files and will not open automatically with that setting checked. The alternative: when the downloads window opens, it shows the file you just downloaded. You can double-click on the Word file's icon to open it in Word, without navigating to the downloaded file on your hard drive to open it.
    Message was edited by: Rachel R

  • Hyperlink to open a file in a new window

    I have been trying to format the hyperlink to a file so it opens on a new window. iWeb allows us to check the box 'open in new window' only for links to external pages; when we insert a link to a file, I realize the app uploads the file to the website, but I could not find a way to have it open in a new window. Is there a way we can get to and format the hyperlink reference?

    1. Create the link that connects to the file (pdf or whatever) on a separate page of your site on iWeb.
    2. Publish your site, then go on the internet to the page that has this link. Keep this page open on your Safari or some web browser you use.
    3. Go back to your iWeb and create another link on a different page (home page, for example) of your site, and connect this link to the URL of the open page in step 2 with "Link to: An External Page" option. Click to choose "Open link in new window" on the Inspector panel. Name this link that has something to do with the file of interest in step 1.
    4. On your iWeb, go the page created in step 1 and make sure "include page in navigation menu" is not selected or checked in the Inspector panel so that web visitor will not get to this page directly.
    5. Publish your site. Now go to your site on the web to the page in step 3. Click on the link and it will open a new page with the link that has the file attached. Visitor can now open the file in that new window.
    • It seems complicated, but you'll get it.
    • You may need to refresh the pages on Safari to make it work if you have left Safari on throughout your work.
    • For this method, you have to dedicate a page to carry the link that connects to the file.
    Example: I create a page that has list of links to the files for viewing. These files are weekly reports. Each file is named by its date such "March 4, 2011" "March 11, 2011" etc.. This page will be hidden from visitors at first when they visit my site. Then I create on my home page a link called "Weekly Reports" that open to "External Page" via the option I have in Inspector. Even though it says "External Page" I use the URL of the hidden page containing all the actual files. On this "hidden" page, I also has a link called "Weekly Report" but this link is connected directly to this page. I do this only because I want the "hidden" page to look like my home page in terms of displayed links.

  • Link to file hyperlinks

    How to create an InDesign document with link to file hyperlinks in InDesign to PDF and still be able to use via a USB flash drive?

    Hi Pusman,
    While setting up the links, if you choose to open the file in a new window then you won't face this issue, then you can simply switch to the previous file and bookmark view will remain as it is.
    Does that helps with your query?
    Regards,
    Rahul

  • Hyperlink - Cannot open specified file in excel

    I have created an excel document with hyperlinks to other documents on our drive. For some reason when I click on the links i get the above message. But the file pathway that is correct.
    I have over 200 link and do not want to enter them in again manually.
    PLease help

    Hi,
    Which version of Excel are you using?
    Have you changed the file path where the linked documents are saved?
    If we manually modify a problematic link, will it work correctly then?
    Please also check the following setting of your Excel. Click File > Options > Advanced, scroll to the General section, then, click the Web Options button. Make sure the check box before "Update links on save" is not checked under Files
    tab.
    In addition, we may consider to use VBA code to refresh/update your hyperlinks to see if it will make any difference. Since we are not the best resource for coding, you can post coding related question in the following forum:
    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
    Thanks for your understanding and support.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to open local file link in IE ?

    I know, this question is not APEX-related per se, but I was not able to google the fix to this problem.
    In my application, users can open a file open dialog and retrieve a complete file path that is later stored in the DB. Of course, Firefox's javascript does not allow this, but Adam Fisk's applet (https://bugzilla.mozilla.org/show_bug.cgi?id=405630#c40) does the job.
    The file path links to file:///..... . In Firefox, I have managed to open these links with NoScript settings (white list for our intranet trusted addresses and "allow local links" for trusted sites).
    Also, there is a LocalLink plugin (http://kb.mozillazine.org/Links_to_local_pages_don%27t_work) that allows to open local file links from context menu.
    However, on Internet Explorer nothing happens and LocalLink and NoScript are only for FF.
    Has anyone here managed to open local and intranet file links in IE?
    Igor

    You may find this article useful: http://balusc.blogspot.com/2007/07/fileservlet.html

Maybe you are looking for