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

Peter Zhelezniakov Peter.Zhelezniakov at oracle.com
Mon May 20 03:46:28 PDT 2013


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