Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Loading PDF with PDFBox
Loading PDF with PDFBox [message #1784828] Wed, 04 April 2018 13:49 Go to next message
Chris Merg is currently offline Chris MergFriend
Messages: 12
Registered: January 2018
Junior Member
Hello everyone,

I'm trying to load an existing PDF into my application with PDFBox 2.0.9 but I do encounter some problems.

Here is the code I'm trying to execute:

File pdf = new File("/Users/chris/Downloads/RechnungTemplate.pdf");
PDDocument template = PDDocument.load(pdf);
System.out.println("Number of pages: " + template.getNumberOfPages());

At line 2 the application freezes and nothing happens. Even Debugging stopped at line 2.

I tried my code within a standalone program (without RAP) and it worked fine, so there is something wrong in combination with RAP.

I already tried executing the code in a Thread other than the UI-Thread but this didn't change anything.

Someone got this library working with RAP and knows how to fix the problem?

EDIT: After deploying the war it's working fine, but when trying with eclipse it's somehow not working.


[Updated on: Thu, 05 April 2018 10:37]

Report message to a moderator

Re: Loading PDF with PDFBox [message #1833646 is a reply to message #1784828] Tue, 20 October 2020 10:24 Go to previous message
Marco Descher is currently offline Marco DescherFriend
Messages: 197
Registered: October 2010
Location: Austria
Senior Member
Just touched the same problem.

PDFBox internally uses AWT, und it freezes if the library cannot be loaded. Although not in a RAP setting I faced the behaviour as I did not have "Run in UI thread" selected on executing my test.
Previous Topic:RAP e4 3.14 and clipboard
Next Topic:How to log application URL on startup?
Goto Forum:

Current Time: Wed Jul 24 11:41:37 GMT 2024

Powered by FUDForum. Page generated in 0.03830 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top