Use Maven to build project using PdfNet SDK

970 views
Skip to first unread message

Julien Garcia Gonzalez

unread,
Sep 18, 2013, 10:11:35 AM9/18/13
to pdfne...@googlegroups.com
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

Ryan

unread,
Sep 19, 2013, 12:11:01 PM9/19/13
to pdfne...@googlegroups.com
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.

Julien Garcia Gonzalez

unread,
Sep 20, 2013, 4:31:35 AM9/20/13
to pdfne...@googlegroups.com
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.<init>(PDFDoc.java:124)

like if it's not making the link between the jar and the native lib.

Ryan Barr

unread,
Sep 20, 2013, 5:20:15 PM9/20/13
to PDFTron PDFNet SDK on behalf of Julien Garcia Gonzalez
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.


--
You received this message because you are subscribed to the "PDFTron PDFNet SDK" group (http://www.pdftron.com/pdfnet/forum.html).
---
You received this message because you are subscribed to the Google Groups "PDFTron PDFNet SDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-sdk+...@googlegroups.com.
To post to this group, send email to pdfne...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages