문제

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 (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

도움이 되었습니까?

해결책

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

다른 팁

There is also a new site that will be releasing .NET DLLs for every PDFBox release until the actual project begins doing an official .NET release. So far they only have 1.6.0 (the latest version at the time of this writing), but hopefully they keep it up. See http://pdfbox.lehmi.de

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top