Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFX WebVIew - PDF on popup window

1022639Jul 4 2013

I built a desktop application using JavaFX 2.2 which uses a WebEngine to access a website built using Oracle ADF Pages. The application tracks the users actions on the pages and stores data to a database. All fine so far until the point where I need show a PDF file on a user click.

On the actual website the user clicks a button and a new popup window opens up that displays the PDF.

My problem is that due to the lack of PDF support in JavaFX I cannot display the pdf. The actual link to the PDF is dynamic and it doesn't have a .pdf at the end of it so I can't use the actual URL to send it to an external bowser or something to display it. Additionally the connection is secure so I can't open the URL with Chrome for example.

Possible solutions I thought about are to read the binary data of the response from WebView and create the PDF file locally and then open it using Adobe of Chrome or something. Is that possible at all? Another solution I thought about (while I am writing this question) is maybe to open the URL which the users default browser but how can I go about sending the secure connection cookie from the application to the browser.

Is any of the above even possible? Am I missing something?

Any help, clues, links, ideas would be very much appreciated.

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 1 2013
Added on Jul 4 2013
0 comments
1,147 views