JavaFx: webview print with scale 100%
Anton V. Tarasov
anton.tarasov at oracle.com
Tue Jun 30 18:43:06 UTC 2015
Hi Alexander,
Thanks for posting the samples. I'll check the printing stuff and will update on results.
Regards,
Anton.
On 27.06.2015 9:30, Александр Свиридов wrote:
> 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 oracle.com>:
>
> Hi Alexander,
>
> Could you please create and send a simple test case (fully functioning) with the exact URL of
> a page
> you're printing?
>
> Regards,
> Anotn.
>
> 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?
>
>
More information about the openjfx-dev
mailing list