Use Maven to build project using PdfNet SDK

Hi,
i’m trying to use PdfNet in a project that use maven to build process.

we’ve add the jar in our repository, but we would like to know if we need to integrate the native library (dll) into the pom.xml of maven.

Thanks in advance.

Julien

If you are asking whether the PDFNetC.dll is required for the java api to work, then yes, all the actual work is done in the native code dll, the jar is just an interface.

As for pom.xml and maven, that seems like a question for the maven forum, but since the native dll is required, I assume maven would also need to know about the native dll.

I will check, thank you for the response.

But the strange thing it’s if I deploy the Ejb and call the PdfNet initialize method. It’s working. But when I redeploy, I get the “Native Library Already deploy” error and if I don’t load the library if it’s already deploy, I got

java.lang.UnsatisfiedLinkError: pdftron.PDF.PDFDoc.PDFDocCreate([B)J
at pdftron.PDF.PDFDoc.PDFDocCreate(Native Method)
at pdftron.PDF.PDFDoc.(PDFDoc.java:124)

like if it’s not making the link between the jar and the native lib.
Le jeudi 19 septembre 2013 18:11:01 UTC+2, Ryan a écrit :

If you are asking whether the PDFNetC.dll is required for the java api to work, then yes, all the actual work is done in the native code dll, the jar is just an interface.

As for pom.xml and maven, that seems like a question for the maven forum, but since the native dll is required, I assume maven would also need to know about the native dll.

On Wednesday, 18 September 2013 07:11:35 UTC-7, Julien Garcia Gonzalez wrote:

Hi,
i’m trying to use PdfNet in a project that use maven to build process.

we’ve add the jar in our repository, but we would like to know if we need to integrate the native library (dll) into the pom.xml of maven.

Thanks in advance.

Julien

You might need the following in your maven setup.

-Djava.library.path=“Path/to/PDFNetC.dll/Without/FileName”, e.g. -Djava.library.path=“C:/users/me/desktop/pdfnetc/lib”

Or look in the PDFNetC/Samples/AddImageTest/JAVA/RunTest.bat file for the java settings needed.