Dansoftowner / PDFViewerFX

A pdf viewer library for your javaFX application
Apache License 2.0
66 stars 24 forks source link

Add a way to set the PDFDisplayer's preferred width and height #20

Open stephansann opened 3 years ago

stephansann commented 3 years ago

Hi @Dansoftowner

There does not seem to be an "official" way to set the preferred width and height of the PDFDisplayer's pane.

What I do to get around it is:

WebView tmpWebView = (WebView)PDF_VIEWER.toNode();
                tmpWebView.setPrefWidth(aPrefWidth);
                tmpWebView.setPrefHeight(aPrefHeight);

Anyhow this is not really elegant, since it assumes the underlying node is a WebView (which could change).

It would be nice to have such functions on the PDFDisplayer's API.

Thanks and best regards Stephan