JavaFx view pdf in Popup without using JxBrowser Plugin
Asked Answered
C

1

17

I am trying to develop a javafx webview browser. I have a website developed in PHP that I need to display through the javafx web browser. Popups browser window is generated using javascript window.load() function, and the content of pdf is is in base64 format.

Following is the javascript code showing popup

window.open("data:application/pdf;base64, " + <BASE64_STRING>,"_blank","menubar=no,location=no,resizable=yes,scrollbars=yes,status=yes,width=600,height=700");

I stuck displaying pdf files on browser popup. When I am running the same website in chrome or safari it works fine showing popup with pdf or doc files. Since javafx don't have pdf support by deafult I may need some third party libraries or some other techniques. I still badly consuming 2 days for finding the solution. Can anyone help me in this case please? Thank you very much in advance.!

Conch answered 12/8, 2016 at 8:49 Comment(0)
D
0

I recommend to use the JPedalFX library. For further information see: https://mcmap.net/q/562902/-displaying-pdf-in-javafx-closed

Doubleteam answered 17/8, 2016 at 21:1 Comment(3)
I followed JPedalFX libarary, there we should provide the path of pdf file. but my case is display pdf from base64 encrypted data and it generated dynamically. I followed jxBrowser it has full featured functionalities. But its a bit costly. Thank you for reply @MarkConch
@BipinKareparambil Convert the base64 string to a blob and save it as a file temporarily in the temp folder? Or you might be able to use the blob as file object to open JPedalFX.Dwarf
JPedalFX is a pay library?! No thanks.Molnar

© 2022 - 2024 — McMap. All rights reserved.