That worked, but the image it displayed was very mangled.  Most of the
content of the .pdf was missing.


On Tue, Dec 19, 2017 at 12:01 PM, Claudius Teodorescu <
[email protected]> wrote:

> Hi,
>
>
> It is displayed page by page, with a function like the following:
>
> public Image goToPage(int pageNumber) {
> BufferedImage pageImage = null;
> try {
> pageImage = renderer.renderImage(pageNumber);
>
> } catch (IOException ex) {
> Logger.getLogger(TAG).log(Level.SEVERE, null, ex);
> }
>
> return SwingFXUtils.toFXImage(pageImage, null);
> }
> .
>
> The FXML correspondant:
>
> <ScrollPane fx:id="centerSourcePane" fitToHeight="true"
> fitToWidth="true" pannable="true">
> <content>
> <StackPane>
> <children>
> <ImageView fx:id="contentSourcePane" cache="true" />
> </children>
> </StackPane>
> </content>
> </ScrollPane>
>
> Clauidus
>
> On Tue, Dec 19, 2017 at 8:05 PM, Dean Schulze <[email protected]>
> wrote:
>
> > I need to display a .pdf file in a JavaFX application.  I've found
> various
> > examples of others doing this PDFBox 1.8 with
> >
> > PDPage.convertToImage();
> >
> > and then displaying the image.
> >
> > But there is no PDPage.convertToImage() in PDFBox 2.0.  How do I display
> a
> > .pdf file in PDFBox 2.0?
> >
> > Thanks.
> >
>
>
>
> --
> http://kuberam.ro
>

Reply via email to