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

John C. Turnbull ozemale at ozemail.com.au
Mon May 20 04:13:04 PDT 2013


+1

Much needed!

-----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, 20 May 2013 20:46
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