Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4, 5.0.0 alpha1, 5.0
    • Component/s: API, Viewer RI
    • Labels:
      None
    • Environment:
      ICEpdf

      Description


      Problem:
      If I print a document with the print button in the toolbar, the default setting for the printer page is "letter" (the first entry in the ComboBox.
      Is there a possibility to set the format "A4 (ISO/DIN ...) as the default format in the source code when I built the viewer panel?

      The following did not worked:

      The Viewer RI source code there is a class org.icepdf.ri.common.PrintHelper that does most of the lifting for printing. The constructor for this class let the user specify the paper size if needed. The Viewer RI by default set the default paper size to letter as you witnessed. If you want to set the default paper size to A4 there are couple ways to go.
      1. Get the source bundle of ICEpdf.
      2. Go to ./viewer/src/org/icepdf/ri/viewer/res/ICEpdfDefault.properties.
      3. There are comments in this file that give common dimensions in millimeters so the user can change the default paper size. Change those and re-build ICEpdf with Ant. (default target is build.all)

      The following change worked:

      from: MediaSizeName mediaSizeName = loadDefaultPrinterProperties();
      to: MediaSizeName mediaSizeName = MediaSizeName.ISO_A4;

      in the next methods of org.icepdf.ri.common.SwingConroller:

      public void showPrintSetupDialog()
      private void initialisePrinting(final boolean withDialog) { ...


      The customer suggested to implement a method in the SwingController such us
      setDefaultMediaSize(MediaSize mediaSize). Which will allow to perform this operation more easily without further code modifications

        Activity

        Migration created issue -
        Migration made changes -
        Field Original Value New Value
        Reporter Migration [ remote ] Evgheni Sadovoi [ evgheni.sadovoi ]
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 5.0 [ 10314 ]
        Resolution Fixed [ 1 ]
        Patrick Corless made changes -
        Fix Version/s 5.0.0 alpha1 [ 10676 ]
        Patrick Corless made changes -
        Fix Version/s 4.4 [ 10670 ]
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Evgheni Sadovoi
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: