• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using PDFBox

 
Ranch Hand
Posts: 77
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I've been trying to install the libaries in Netbeans for PDFBox 2.0.24.  I added the library files shown under 2.0.24 here: https://pdfbox.apache.org/download.html.

In Netbean I right-clicked on properties, and then library, and then the plus sign next to CLASSPATH, and added the six libraries.

Once all the classes are imported, everything looks OK, but then I do this simple test to create a blank PDF document:



The IDE does not show any errors, but when I run it, it gives error of "java.lang.NoClassDefFoundError".  I can't really figure out what to do as there is not much documentation on this and I haven't done much with external libraries before. Can anyone help?

 
Saloon Keeper
Posts: 7611
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgot the details of what's required in which situation, but I generally just download the latest pdfbox-app-xxx.jar file, and that contains everything I need. Certainly the code you showed would compile with just that.

Agree about the scant documentation; I found some useful PDFBox code examples online.
 
Antonio Moretti
Ranch Hand
Posts: 77
2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:I forgot the details of what's required in which situation, but I generally just download the latest pdfbox-app-xxx.jar file, and that contains everything I need. Certainly the code you showed would compile with just that.

Agree about the scant documentation; I found some useful PDFBox code examples online.



Thanks. Can you give me a link so I can be sure to use the correct one?

[Edit] Ah don't worry, I found it and used that one. It works now. Cheers.
 
I don't even know how to spell CIA. But this tiny ad does:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic