Q: Where, in my system, should I install the PDFNet library?
C/C++/PHP/Python/Ruby
A: It depends both upon the variant of the PDFNet SDK you’re using, and upon your operating system.
Windows
To install PDFNetC.dll on Windows, you’ll need to put it in the search
path used by Windows to locate a DLL. According to
http://msdn.microsoft.com/en-us/library/7d83bc18%28v=vs.90%29.aspx
Windows searches for DLLs in the following sequence:
- The directory where the executable module for the current process is
located. - The current directory.
- The Windows system directory. The GetSystemDirectory function
retrieves the path of this directory. - The Windows directory. The GetWindowsDirectory function retrieves
the path of this directory. - The directories listed in the PATH environment variable.
OS X
libPDFNetC.dylib is loaded by the OS X dynamic linker:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man1/dyld.1.html
The dynamic linker uses the directories pointed to by DYLD_LIBRARY_PATH.
By default, this environment variable points to:
$(HOME)/lib
/usr/local/lib
/lib
/usr/lib
Thus you can place libPDFNetC.dylib into one of these directories. We
recommend using /usr/local/lib.
Alternatively, you can customize the directories searched for by the
dynamic linker. It’s recommended to add the path to DYLD_FALLBACK_LIBRARY_PATH
instead of changing DYLD_LIBRARY_PATH, since changing DYLD_LIBRARY_PATH could
have wide effects on your system if misconfigured. For more details, see:
Linux
libPDFNetC.so is loaded by the program loader:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
The program loader uses the directories pointed to by the LD_LIBRARY_PATH,
as well as the contents of /etc/ld.so.conf. The standard directories can vary
by distribution, but might be one of:
/lib
/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
Java
All Platforms
Installing PDFNet support for Java can be acheived by installing PDFNetC.dll,
libPDFNetC.dylib, or libPDFNetC.so on the system as described above.
Alternatively, you can use the -Djava.library.path option. For more
details, see:
OS X
Although the above methods work on OS X, you could also install PDFNet
support for Java by copying libPDFNetC.dylib to to
/Library/Java/Extensions/libPDFNetC.jnilib.