JDK-8208169 : can not print selected pages of web page
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8,9,10,openjfx11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86_64
  • Submitted: 2018-07-23
  • Updated: 2020-09-25
  • Resolved: 2020-06-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8u271Fixed openjfx11.0.9Fixed
Description
A DESCRIPTION OF THE PROBLEM :
when choosing page 1,2 everything is ok
but page 3,4  are not printed - always is printed page 2
to print pages 3,4 you must print whole document

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
load simple web page print , open print dialog, choose to print page nr 3



EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
printed page nr 3 or 4
ACTUAL -
printed page nr 2

---------- BEGIN SOURCE ----------
private void handlePrintButtonAction(ActionEvent event) {
        PrinterJob job = PrinterJob.createPrinterJob();
        if (job != null) {
            Window window = webView.getScene() != null ? webView.getScene().getWindow() : null;
            if (job.showPageSetupDialog(window)) {
                if (job.showPrintDialog(window)) {
                    webView.getEngine().print(job);
                    job.endJob();
                }
            }
        }
    }


---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
cannot - must print everything

FREQUENCY : always



Comments
Changeset: 8440b64b Author: bhawesh <bhawesh.choudhary@oracle.com> Committer: Kevin Rushforth <kcr@openjdk.org> Date: 2020-06-17 19:03:01 +0000 URL: https://git.openjdk.java.net/jfx/commit/8440b64b
17-06-2020

Issue is reproducible in all JDK - 8u40, 8u181, latest Openjfx. When given pages 3 to 4 in print dialog, it always prints first 2 (1-2) pages.
25-07-2018