*/
    private void startBackgroundPrinting(final PrintHelper printHelper) {
        // Create the ProgressMonitor in the Swing thread
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                // launch progress dialog
                printProgressMonitor = new ProgressMonitor(viewer,
                        messageBundle.getString("viewer.dialog.printing.status.start.msg"),
                        "", 0, printHelper.getNumberOfPages());
            }
        });

        final Thread printingThread = Thread.currentThread();

        // create background printer job
        final PrinterTask printerTask = new PrinterTask(printHelper);
        // create activity monitor
        printActivityMonitor = new Timer(500,
                new ActionListener() {
                    public void actionPerformed(ActionEvent event) {

                        int limit = printHelper.getNumberOfPages();
                        int current = printHelper.getCurrentPage();
                        // update progress and label
                        printProgressMonitor.setProgress(current);

                        // progress bar for printing
                        Object[] messageArguments = new Object[]{
                                String.valueOf(current),
                                String.valueOf(limit)
                        };
                        MessageFormat formatter =
                                new MessageFormat(
                                        messageBundle.getString("viewer.dialog.printing.status.progress.msg"));
                        printProgressMonitor.setNote(formatter.format(messageArguments));

                        // check for job completed or cancelled.
                        if (!printingThread.isAlive() || printProgressMonitor.isCanceled()) {
                            // stop the timers, monitors and thread.
                            printProgressMonitor.close();
                            printActivityMonitor.stop();
                            printerTask.cancel();
                            // enable print UI controls.
                            if (printMenuItem != null) {
                                printMenuItem.setEnabled(true);
                            }
                            if (printButton != null) {
                                printButton.setEnabled(true);
                            }
                        }
                    }
                });
        // start the timer.
        printActivityMonitor.start();

        // start print job
        printerTask.run();
    }