[API Review] RT-17666: Webview and HTMLEditor should support printing their content

John Smith John_Smith at symantec.com
Mon May 20 10:01:31 PDT 2013


Will these methods use print media css style rules defined on the pages if those rules have been defined?

http://www.w3.org/TR/CSS21/media.html

-----Original Message-----
From: openjfx-dev-bounces at openjdk.java.net [mailto:openjfx-dev-bounces at openjdk.java.net] On Behalf Of Peter Zhelezniakov
Sent: Monday, May 20, 2013 3:46 AM
To: openjfx-dev at openjdk.java.net
Subject: [API Review] RT-17666: Webview and HTMLEditor should support printing their content

Hi all,

I propose adding two printing methods to WebEngine and HTMLEditor. This work is covered by RT-17666.

Currently both components can only be printed in "screenshot mode" just like any other Node. Obviously this is not what people want most of the time. The proposed methods print components' content as a document.

For WebEngine, the new methods is:

     /**
      * Prints the current Web page using the given printer job.
      * <p>This method does not modify the state of the job, nor does it call
      * {@link PrinterJob#endJob}, so the job may be safely reused afterwards.
      *
      * @param job printer job used for printing
      */
     public void print(PrinterJob job);

and a similar one for HTMLEditor:

     /**
      * Prints the content of the editor using the given printer job.
      * <p>This method does not modify the state of the job, nor does it call
      * {@link PrinterJob#endJob}, so the job may be safely reused afterwards.
      *
      * @param job printer job used for printing
      */
     public void print(PrinterJob job);

Thanks!
--
Peter


More information about the openjfx-dev mailing list