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

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: