16

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.!

1 Answers1

0

I recommend to use the JPedalFX library. For further information see: https://stackoverflow.com/a/18219416/4823977

Community
  • 1
  • 1
Hash
  • 4,647
  • 5
  • 21
  • 39
  • 1
    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 @Mark – Bipin Kareparambil Aug 18 '16 at 11:38
  • 1
    @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. – seahorsepip Aug 21 '16 at 21:20
  • JPedalFX is a pay library?! No thanks. – Ben the Coder Jun 08 '23 at 13:59