Re[2]: JavaFx: webview print with scale 100%

Александр Свиридов ooo_saturn7 at
Sat Jun 27 06:30:45 UTC 2015

 Hi Anton,

I send all files. If you open index.html in IE and printpreview->set scale 100% -> print , you will get 16.8 cm of div on paper.

If you you print via application I did you will get quite different size.

Пятница, 19 июня 2015, 17:03 +03:00 от "Anton V. Tarasov" <anton.tarasov at>:
>Hi Alexander,
>Could you please create and send a simple test case (fully functioning) with the exact URL of a page 
>you're printing?
>On 15.06.2015 8:53, Александр Свиридов wrote:
>> To print my html page I use the following code:
>> PrinterJob job =PrinterJob.createPrinterJob();if(job !=null&& job.showPrintDialog(null)){
>>        webView.getEngine().print(job);
>>        job.endJob();}
>> The problem is that webview changes the scale of printing page. For example, when I print this html page in IE with fit to size 100% I get 16.8 cm. When I print in my java application I get 11.4cm. The size in html file I set in pt - my width is 475pt(A4 width=595pt,so 475pt=16.8cm). How to print with webview and to have 100% width and height?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: index.html
URL: <>

More information about the openjfx-dev mailing list