While I was writing the PDF to HTML5 conversion code, I went to a talk at Javaone2011 last month showing a plugin making JavaFX code which you could call from the NetBeans IDE. This free plugin does conversion of files into Java2D or JavaFX. We thought it would be really cool if you could add similar functionality in NetBeans to convert PDF files into JavaFX.
It turned out to relatively straight-forward using a subset of the new code for PDF to HTML5 conversion. So here is a screenshot of our current development which is running on our machines a month later (it is our ‘fun’ end of the day project). It does not need JavaFX to do the conversion (you can see all the errors in the screenshot), but it does need JavaFX installed to run the Java code produced.
Fonts are substituted but correctly positioned and the images, shapes and text are all carried across and become JavaFX commands. There are some rough edges still (page shading is not carried across and rotated text on the right is wrong in the example), but we think it looks promising enough to warrant a 1.0 release.
Can we help you to solve any of these problems?
IDRsolutions has been helping companies to solve these problems since 1999.
So, just to make sure I understand, you’ve got a working prototype where you can display a PDF within a JavaFX scene?
If so, that is very cool – keep up the great work 🙂
— Jonathan
You can now try it!
http://blog.idrsolutions.com/2011/12/netbeans-pdf-to-javafx-plugin-released/
Yes. The images, text and Vector commands are all translated into the matching JavaFX commands
Very cool. I would like to be able to embed a PDF viewer into an app that can display or print to a printer (including headless mode) without needing to generate Java source code and compile for every PDF.
There is a batch conversion tool now at http://www.jpedal.org/support_javafx.php
The NetBeans plugin will be uploaded tomorrow and we also have an update out for our original JavaFX viewer which displays PDF pages inside a JavaFX viewer out this week. So you can display PDF in JavaFX or as JavaFX!
JavaFX cannot be used for printing yet – you will still need Swing for that.