开发者

PDFBox - Building the latest version for .NET using IKVM

开发者 https://www.devze.com 2023-01-10 23:15 出处:网络
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 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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号