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

        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.
        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.
        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...
        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.
        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.
        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.
        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.
        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.
        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.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: