tags:

views:

111

answers:

1

Hi,

I would like to build the latest version of PDFBox (http://pdfbox.apache.org/userguide/dot_net.html) for use within my .NET project.

I have no experience with Java whatsoever but I am using the steps defined here: http://www.ikvm.net/userguide/tutorial.html

I am using the following versions:
- IKVM (0.42.0.6)
- PDFBox (1.2.1) JAR file

The problem is that when I try to create the DLL a series of error messages are displayed - i.e. "java.lang.NoClassDefFoundError". I am facing the same problem as the author here (http://stackoverflow.com/questions/2314759/how-to-use-pdfbox-1-0-in-net-c-environment-using-ikvm) and tried the fix suggested - "lkvmc.exe -target:library -out:"[Output Path]\netpdfbox.dll" "[PDFBox Path]*.jar" but the result is the same - the error messages are still displayed.

Thanks in advance,

Jose

A: 

You have to include all needed *.jar files in classpath. I translated latest version with same setup and main problem was that there were no default log class, so I included jar's for log4j and it seems that now is working OK, but I was only doing text extraction. And version 0.7.3 was throwing exceptions on some PDF files and this new build works OK on same PDF files. You can download dll's from :

http://www.antoniob.com/pdfbox-121-for-net-binaries.aspx

Antonio Bakula