ICEpdf
  1. ICEpdf
  2. PDF-162

Links to external files no longer working

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.1
    • Fix Version/s: 4.0.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      -

      Description

      Note from customer:

      The external links can either be a web address or a link to another file; I am attaching two files, where TI-NspireCASHelp_EN.pdf is the file to be opened in the embedded ICEpdf Viewer, and the TI-NspireCAS_ReferenceGuide_EN.pdf file (which is saved in the same location that the Help file) should be opened in the default pdf viewer of the system when the link in the Help file is clicked on.
      1. TI-NspireCAS_ReferenceGuide_EN.pdf
        4.77 MB
        Tyler Johnson
      2. TI-NspireCASHelp_EN.PDF
        2.86 MB
        Tyler Johnson

        Activity

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Attachment TI-NspireCAS_ReferenceGuide_EN.pdf [ 12219 ]
        Attachment TI-NspireCASHelp_EN.PDF [ 12220 ]
        Tyler Johnson made changes -
        Salesforce Case [5007000000AqR8f]
        Patrick Corless made changes -
        Issue Type Bug [ 1 ] New Feature [ 2 ]
        Fix Version/s 4.1 [ 10227 ]
        Hide
        Tyler Johnson added a comment -

        Clicking on the link produces the following output:

        00018513 <D> <class org.icepdf.ri.common.MyAnnotationCallback> Annotation ANNOTA
        TION= {A=3879 0R,Border=[0, 0, 0],Type=Annot,Rect=[3.09277, 136.186, 206.443, 15
        3.97],BS=

        {W=0, Type=Border, S=S}

        ,H=I,Subtype=Link,} 3878 0R
        00018513 <D> <class org.icepdf.ri.common.MyAnnotationCallback> Action: org.ic
        epdf.core.pobjects.actions.LaunchAction=

        {S=Launch, F=3882 0R, NewWindow=true}

        Show
        Tyler Johnson added a comment - Clicking on the link produces the following output: 00018513 <D> <class org.icepdf.ri.common.MyAnnotationCallback> Annotation ANNOTA TION= {A=3879 0R,Border= [0, 0, 0] ,Type=Annot,Rect=[3.09277, 136.186, 206.443, 15 3.97],BS= {W=0, Type=Border, S=S} ,H=I,Subtype=Link,} 3878 0R 00018513 <D> <class org.icepdf.ri.common.MyAnnotationCallback> Action: org.ic epdf.core.pobjects.actions.LaunchAction= {S=Launch, F=3882 0R, NewWindow=true}
        Tyler Johnson made changes -
        Summary Cannot open external document Links to external files no longer working
        Hide
        Patrick Corless added a comment -

        It's actually not a bug. The Annotation callback can be implemented/extended to handle this type of annotation action. We've avoided adding this feature as it could potentially create a security hole in the viewer.

        Show
        Patrick Corless added a comment - It's actually not a bug. The Annotation callback can be implemented/extended to handle this type of annotation action. We've avoided adding this feature as it could potentially create a security hole in the viewer.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20693 Thu Feb 18 14:43:32 MST 2010 patrick.corless PDF-162 - addition of ctr-wheel mouse functionality for zoom in zoom out.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/MouseWheelListenerPageChanger.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/AbstractDocumentView.java
        Hide
        Patrick Corless added a comment -

        I did a little testing in and around this request and it appears the BareBonesBrowserLaunch handles this well for us on Windows, not sure about other OS's. If worse came to worse we could write a BareBonesFileLauncher for opening files with the native OS's file association.

        Around line 105 of the MyAnnotationCallback the stub for the LaunchAction instance of check would look like this.

        else if (action instanceof LaunchAction)

        { LaunchAction launchAction = (LaunchAction) action; String file = launchAction.getExternalFile(); String location = documentViewController.getDocument().getDocumentLocation(); location = location.substring(0, location.lastIndexOf(File.separator)+1); BareBonesBrowserLaunch.openURL(location+file); }
        Show
        Patrick Corless added a comment - I did a little testing in and around this request and it appears the BareBonesBrowserLaunch handles this well for us on Windows, not sure about other OS's. If worse came to worse we could write a BareBonesFileLauncher for opening files with the native OS's file association. Around line 105 of the MyAnnotationCallback the stub for the LaunchAction instance of check would look like this. else if (action instanceof LaunchAction) { LaunchAction launchAction = (LaunchAction) action; String file = launchAction.getExternalFile(); String location = documentViewController.getDocument().getDocumentLocation(); location = location.substring(0, location.lastIndexOf(File.separator)+1); BareBonesBrowserLaunch.openURL(location+file); }
        Ken Fyten made changes -
        Fix Version/s 4.0.1 [ 10228 ]
        Fix Version/s 4.1 [ 10227 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21115 Wed Mar 31 09:01:25 MDT 2010 patrick.corless PDF-162 addition of launch annotation file handling.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/BareBonesBrowserLaunch.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/Page.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/MyAnnotationCallback.java
        Hide
        Patrick Corless added a comment -

        Update the barebones launcher to handle file paths as well as urls. Now when a luanch action is clicked on the default annotation callback will launch the specified file using the os's default program for the file extension in question.

        Show
        Patrick Corless added a comment - Update the barebones launcher to handle file paths as well as urls. Now when a luanch action is clicked on the default annotation callback will launch the specified file using the os's default program for the file extension in question.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: