ICEpdf
  1. ICEpdf
  2. PDF-91

Viewer RI viewer build configuration

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0 - Beta
    • Fix Version/s: 4.0 - Beta, 4.0
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      Swing RI example
    • Assignee Priority:
      P1

      Description

      The guts of this enhancement is to make the default RI SwingViewBuilder more configurable. Currently the RI is started and you get the full viewer. A customer has asked that we make various UI elements configurable via a properties file

      Here are the main features they are looking for:

      Optional Toolbars.
      - save, print, search and rotation
      - same for annotation bar
      - can we do more ?

      Narrow zoom ranges
      - make the default zoom ranges configurable via the properties file.

      Default fit width page view
      - the document should specify this in the default catalogue however if it doesn't they would like a property to set it manually.

      We all ready have some properties in the ICEpdfDefault.properties and a loading mechanism. An analysis is need to figure out the best way to go about this enhancement.

        Activity

        Patrick Corless created issue -
        Hide
        Patrick Corless added a comment -

        Carlo can you take look and take a shot at the initial analysis.

        Show
        Patrick Corless added a comment - Carlo can you take look and take a shot at the initial analysis.
        Patrick Corless made changes -
        Field Original Value New Value
        Assignee Patrick Corless [ patrick.corless ] Carlo Guglielmin [ carlo.guglielmin ]
        Patrick Corless made changes -
        Salesforce Case []
        Fix Version/s 4.0 [ 10212 ]
        Hide
        Patrick Corless added a comment -

        Can you also make the utility pane visibility configurable? I suspect some deployments might not want to allow enable the "Annotation" pane on the the "utitlity pane". Can you also add the following to your list of features.

        Configureable Utility pane visibility for :

        • outlines
        • search and
        • annotations tab.
        Show
        Patrick Corless added a comment - Can you also make the utility pane visibility configurable? I suspect some deployments might not want to allow enable the "Annotation" pane on the the "utitlity pane". Can you also add the following to your list of features. Configureable Utility pane visibility for : outlines search and annotations tab.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19882 Tue Dec 08 11:39:59 MST 2009 carlo.guglielmin PDF-91 - Added configuration of toolbar visibility via properties file attributes such as 'application.toolbar.show.utility'
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19885 Tue Dec 08 12:38:58 MST 2009 carlo.guglielmin PDF-91 - Added properties file configuration for utility pane tabs. Also updated both toolbar and utility pane to hide themselves properly if NOTHING is enabled on them
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingController.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P1
        Hide
        Carlo Guglielmin added a comment -

        I've checked in changes that allow every set of buttons on the toolbar to be hidden, as well as tabs in the utility pane. Also note that if all child components of one of these are hidden, the parent component will also be hidden (so if you hide all buttons on the toolbar, the toolbar will go away).

        These properties will be set automatically (to true) in the properties file on the first exit of the program, and can be edited afterwards to true/false.

        Working on the default zoom ranges and default page width next...

        Show
        Carlo Guglielmin added a comment - I've checked in changes that allow every set of buttons on the toolbar to be hidden, as well as tabs in the utility pane. Also note that if all child components of one of these are hidden, the parent component will also be hidden (so if you hide all buttons on the toolbar, the toolbar will go away). These properties will be set automatically (to true) in the properties file on the first exit of the program, and can be edited afterwards to true/false. Working on the default zoom ranges and default page width next...
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19891 Tue Dec 08 15:14:05 MST 2009 carlo.guglielmin PDF-91 - Added reading of some of the basic Viewer Preferences (as noted in the PDF Specification) such as HideToolbar and HideMenubar. If not present in the document these can be overriden by the properties file. Also added a default zoom that is set from the properties file
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingController.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph ADD /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/ViewerPreferences.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/Catalog.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Hide
        Carlo Guglielmin added a comment - - edited

        Preliminary version of the ViewerPreferences reading checked in. As described in the PDF spec, a few of the basic ViewerPreferences have been implemented in the UI. For example if a PDF document catalog has "HideToolbar", this will apply properly to the UI.
        In addition, if any of these supported ViewerPreferences are not present in a document, the default behaviour can be overriden via the properties file.

        Specific implemented ViewerPreferences (for now at least?): HideToolbar, HideMenubar, FitWindow

        Also added a default zoom that is set through the properties file.

        Show
        Carlo Guglielmin added a comment - - edited Preliminary version of the ViewerPreferences reading checked in. As described in the PDF spec, a few of the basic ViewerPreferences have been implemented in the UI. For example if a PDF document catalog has "HideToolbar", this will apply properly to the UI. In addition, if any of these supported ViewerPreferences are not present in a document, the default behaviour can be overriden via the properties file. Specific implemented ViewerPreferences (for now at least?): HideToolbar, HideMenubar, FitWindow Also added a default zoom that is set through the properties file.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19897 Wed Dec 09 07:47:06 MST 2009 patrick.corless PDF-91 added null pointer check for viewerController.getWindowManagementCallback(), to get component instance of application running.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Hide
        Patrick Corless added a comment -

        I was just reviewing the code and see a potential problem with the PropertyManager being stored in the WindowMangementCallback. In the component example there is now notation of WindowManger and thus no Property Manger access.

        The simple component example builds a view using the following lines:

        SwingController controller = new SwingController();
        SwingViewBuilder factory = new SwingViewBuilder(controller);
        JPanel viewerComponentPanel = factory.buildViewerPanel();

        I would propose that you overload the SwingViewBuilder constructor or the method buildViewerPane so that an instance of the PropertiesManager can be passed as a parameter so that the simple component view can be created with your new customization properties.

        Let me know what you think.

        Show
        Patrick Corless added a comment - I was just reviewing the code and see a potential problem with the PropertyManager being stored in the WindowMangementCallback. In the component example there is now notation of WindowManger and thus no Property Manger access. The simple component example builds a view using the following lines: SwingController controller = new SwingController(); SwingViewBuilder factory = new SwingViewBuilder(controller); JPanel viewerComponentPanel = factory.buildViewerPanel(); I would propose that you overload the SwingViewBuilder constructor or the method buildViewerPane so that an instance of the PropertiesManager can be passed as a parameter so that the simple component view can be created with your new customization properties. Let me know what you think.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19904 Wed Dec 09 11:23:42 MST 2009 carlo.guglielmin PDF-95, PDF-91 - Added preliminary skeleton of permission checking before doing a save. Currently disabled until some StateManager work is completed. Also made a fix related to PDF-91 to ensure the ViewerComponentExample still works with the changed properties file. Also added an example called ViewerPropertiesExample that demonstrates building your own properties file and passing it into the SwingViewBuilder constructor
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingController.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/resources/MessageBundle.properties
        Commit graph ADD /icepdf/trunk/icepdf/examples/component/ViewerPropertiesExample.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Hide
        Carlo Guglielmin added a comment -

        I've added a SwingViewBuilder constructor that takes a PropertiesManager, so you can initialize it however you want and then pass it through to that class. Also fixed a call to windowManagerCallback since I was assuming it would never be null, but as the ViewerComponentExample demonstrates, it can be.

        Show
        Carlo Guglielmin added a comment - I've added a SwingViewBuilder constructor that takes a PropertiesManager, so you can initialize it however you want and then pass it through to that class. Also fixed a call to windowManagerCallback since I was assuming it would never be null, but as the ViewerComponentExample demonstrates, it can be.
        Carlo Guglielmin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19979 Mon Dec 14 14:55:46 MST 2009 carlo.guglielmin PDF-91 - Ensured the document.pagefitMode property applies correctly, as it was currently being ignored. For example to force a document to fit width, give the property a value of 4
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingController.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/viewer/WindowManager.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19982 Mon Dec 14 15:08:34 MST 2009 carlo.guglielmin PDF-91 - Allow the buttons in the utility pane to be hidden
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19984 Mon Dec 14 15:20:54 MST 2009 carlo.guglielmin PDF-91 - Added a command line switch '-loadproperties [path]' that allows a user to specify a different .properties file than the default. Otherwise we default to the usual home directory path.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/viewer/Launcher.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19985 Mon Dec 14 15:46:33 MST 2009 carlo.guglielmin PDF-91 - Changed search panel so the JScrollPane wrapping the search results tree fills the utility pane properly, to allow for very small height resizes
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SearchPanel.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19997 Wed Dec 16 10:06:12 MST 2009 carlo.guglielmin PDF-91 - Added an option to specify the available Zoom Ranges (shown in the dropdown in the UI) via the properties file value 'application.zoom.range.default'
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19999 Wed Dec 16 11:02:49 MST 2009 carlo.guglielmin PDF-91 - Properly handle properties file so that we can accept a custom one via the SwingViewBuilder constructor
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Hide
        Carlo Guglielmin added a comment -

        A few recent changes:

        • Added the 'application.zoom.range.default' property that lets you specify a comma separated list of float values that will populate the Zoom Ranges combobox in the UI. For example you could give it a value of "0.25,0.5,1.0" to have 25%, 50%, and 100% zoom available.
        • Added a JScrollPane around the search panel that is added to the utility pane. Both scrollbars only appear if necessary, which would really only happen if the window is incredibly short.
        • Updated the SwingViewBuilder constructor so any PropertiesManager assigned via the constructor is applied correctly to the non-SwingController code (like setting zoom ranges and toolbar visibility).
        • Added a command line switch "-loadproperties [path]" that allows a user to specify a different .properties file than the default
        • Added better granularity to the buttons on the first toolbar so you can remove specific buttons like Print, Save, etc.
        • Applied the existing property "document.pagefitMode" since it was previously being ignored.
        Show
        Carlo Guglielmin added a comment - A few recent changes: Added the 'application.zoom.range.default' property that lets you specify a comma separated list of float values that will populate the Zoom Ranges combobox in the UI. For example you could give it a value of "0.25,0.5,1.0" to have 25%, 50%, and 100% zoom available. Added a JScrollPane around the search panel that is added to the utility pane. Both scrollbars only appear if necessary, which would really only happen if the window is incredibly short. Updated the SwingViewBuilder constructor so any PropertiesManager assigned via the constructor is applied correctly to the non-SwingController code (like setting zoom ranges and toolbar visibility). Added a command line switch "-loadproperties [path] " that allows a user to specify a different .properties file than the default Added better granularity to the buttons on the first toolbar so you can remove specific buttons like Print, Save, etc. Applied the existing property "document.pagefitMode" since it was previously being ignored.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20008 Wed Dec 16 15:55:57 MST 2009 carlo.guglielmin PDF-91 - Added an override to the system property for the highlight color
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Hide
        Carlo Guglielmin added a comment -

        Recently added the ability to set the "org.icepdf.core.views.page.text.highlightColor" property in the local properties file, even though it's a system property. If a -D parameter is passed on startup that will take precedence.

        Show
        Carlo Guglielmin added a comment - Recently added the ability to set the "org.icepdf.core.views.page.text.highlightColor" property in the local properties file, even though it's a system property. If a -D parameter is passed on startup that will take precedence.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20100 Mon Jan 04 10:27:16 MST 2010 carlo.guglielmin PDF-91 - Cleaned up highlightColor property retrieval to prevent it throwing an error
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20152 Fri Jan 08 10:52:28 MST 2010 carlo.guglielmin PDF-91 - Ensure that a property file specified via the constructor (ie: from the command line or through a custom created UI) will be loaded immediately. This means that any properties that apply to setting up the home directory (via setupHomeDir) will be grabbed from the specified property file instead of the global defaults. Then if we don't have a specified property file we will load it as normal after the home dir has been found. This was related to the 'application.showLocalStorageDialogs' property not being handled from a local properties file.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/viewer/Launcher.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20333 Thu Jan 21 15:37:15 MST 2010 carlo.guglielmin PDF-91 - Added a 'application.statusbar.show.viewmode' property to show/hide the page view mode buttons in the bottom right of the status bar. Defaults to true.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Hide
        Carlo Guglielmin added a comment -

        Recently added a "application.statusbar.show.viewmode" property to show/hide the page view mode (one page, continuous, etc.) buttons that are in the bottom right of the status bar. Defaults to true.

        Show
        Carlo Guglielmin added a comment - Recently added a "application.statusbar.show.viewmode" property to show/hide the page view mode (one page, continuous, etc.) buttons that are in the bottom right of the status bar. Defaults to true.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20374 Tue Jan 26 11:57:06 MST 2010 patrick.corless PDF-91 addition of properties to control the visibility of the status bar and the left and right child panles, status label and view mode controls respectively.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/util/PropertiesManager.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingViewBuilder.java
        Hide
        Patrick Corless added a comment -

        Added two more properties to control the status bar.

        • (new)
        • (new) application.statusbar.show.statuslabel
        • (existing) application.statusbar.show.viewmode

        The property application.statusbar will hide the status bar complete and as a result the two child properties for status label and view mode will have no effect.

        I also added the statusLabel property encase they wanted to show the status bar but only with the view mode buttons.

        Show
        Patrick Corless added a comment - Added two more properties to control the status bar. (new) (new) application.statusbar.show.statuslabel (existing) application.statusbar.show.viewmode The property application.statusbar will hide the status bar complete and as a result the two child properties for status label and view mode will have no effect. I also added the statusLabel property encase they wanted to show the status bar but only with the view mode buttons.
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 10222 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20382 Tue Jan 26 14:38:52 MST 2010 patrick.corless PDF-91 removing properties example for until we get a change to align the properites and removed redundant or none functioning properties.
        Files Changed
        Commit graph DEL /icepdf/trunk/icepdf/examples/component/ViewerPropertiesExample.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Carlo Guglielmin
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: