ICEpdf
  1. ICEpdf
  2. PDF-407

Add Default Number of Copies to Print

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.2
    • Fix Version/s: 5.0
    • Component/s: API, Core/Parsing
    • Labels:
      None
    • Environment:
      All

      Description

      It would be nice to be able to specify the number of copies of the pdf are to print when the print dialog is shown (or even when it is printed silently). We made the change to the source code to make this possible and it didn't seem too difficult at all. Our use case defaults 3 copies when our users print a bill of lading since they always need a copy for themselves and two for the trucker. Hence why having a default other than the hard-coded 1 copy would be useful.

      Our implementation into the source code adds a method "setDefaultNumberOfCopies(int)" to SwingController. A local int is used in the "initialisePrinting(boolean)" instead of 1.

      canPrint = printHelper.setupPrintService(
                      0,
                      document.getNumberOfPages() - 1,
                      copies, // default number of copies -- changed from 1 <--
                      viewModel.isShrinkToPrintableArea(), // shrink to printable area
                      withDialog // show print dialogl
              );

        Activity

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

        Thanks for posting your comments. I'll make sure the print helper modification makes the next release.

        Show
        Patrick Corless added a comment - Thanks for posting your comments. I'll make sure the print helper modification makes the next release.
        Patrick Corless made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 5.0 [ 10314 ]
        Hide
        Patrick Corless added a comment -

        Update SwingController and ViewModel to store a copies count. Very similar to the suggested API change.

        Number of copies can be set as follows:

        swingController.getViewModel().setPrintCopies(int printCopies);

        Show
        Patrick Corless added a comment - Update SwingController and ViewModel to store a copies count. Very similar to the suggested API change. Number of copies can be set as follows: swingController.getViewModel().setPrintCopies(int printCopies);
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34195 Tue Apr 02 14:34:12 MDT 2013 patrick.corless PDF-407 updated the SwingController and View model so that number of copies can be programmatically set.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/ViewModel.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/SwingController.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: