Closed storkeu closed 3 years ago
Hi!
Thanks for opening this issue!
I made a little performance improvement in v0.7
, hopefully that makes it smoother.
PDFViewerFX is based on the pdf.js javascript library, so a lot of things are depend on that.
PDF.js internationalizes itself according to your system's language, but probably you can change this behaviour
through javascript (use the pdfDisplayer.executeScript(...)
method for executing js code). If I find a way, I will include it in
a future release.
SceneBuilder/FXML is not supported yet but thanks for your comment on this, I will think about that.
CSS customization is a difficult thing because the PDF.js UI is loaded through a WebView
, but at least you can style the scrollbars/context menus. An example:
/* Styling scrollbars */
.scroll-bar:horizontal,
.scroll-bar:vertical {
-fx-background-color: #474a48;
}
.scroll-bar:horizontal .thumb, .scroll-bar:vertical .thumb { -fx-background-color: #9d9b9b; -fx-background-radius: 0em; }
.scroll-bar .corner { -fx-background-color: #dbdbdb; -fx-disabled: true; }
But again, you can use `executeScript` for styling specific elements, for example:
```java
displayer.executeScript("document.getElementById('secondaryToolbarToggle').style.backgroundColor = 'blue';")
Read more about this here.
I hope this was helpful! Best regards
Cool tool, but not rendering all pdf's. Are there plans to improve performance? Thanks