NameDateSize

..24-Nov-201211

businesscard.javaH A D24-Nov-20122.7 KiB

chartab.javaH A D24-Nov-20123.1 KiB

hello.javaH A D24-Nov-20121.3 KiB

image.javaH A D24-Nov-20121.6 KiB

invoice.javaH A D24-Nov-20125 KiB

Java.dspH A D24-Nov-20123.1 KiB

jsp/H24-Nov-20129

MakefileH A D24-Nov-20122.5 KiB

pdfclock.javaH A D24-Nov-20123 KiB

pdflib.javaH A D24-Nov-201252.6 KiB

pdflib_java.cH A D24-Nov-201269 KiB

PDFlibException.javaH A D24-Nov-20121.9 KiB

quickreference.javaH A D24-Nov-20122.3 KiB

readme.txtH A D24-Nov-20128.5 KiB

servlet/H24-Nov-20129

readme.txt

1Using the JSP and servlet examples
2==================================
3
4Before using the examples you must either copy the relevant
5image and PDF files to an appropriate location, or modify
6the paths in the source code to point to the sample files.
7
8Note: If you find corrections to the instructions below, or
9can contribute configuration hints for other environments
10we'll be happy to hear from you -- please send all suggestions
11to support@pdflib.com.
12
13
14Exception: PDFlib already loaded in another classloader
15=======================================================
16
17When using PDFlib (on any platform) with an application server you
18may encounter the following exception:
19
20java.lang.UnsatisfiedLinkError: Native Library
21C:\WINNT\system32\pdf_java.dll already loaded in another classloader
22
23This is caused by multiple classloaders trying to load the PDFlib class,
24and therefore the PDFlib native libary, into the server's address space
25simultaneously. The problem can be avoided by putting pdflib.jar into
26the global class path instead of the classpath of the web application.
27The PDFlib shared library/DLL should still be placed in an accessible
28system directory.
29
30For example, for Tomcat consider the following directories for pdflib.jar: 
31bad:	WEB-INF/lib
32good:	$CATALINA_HOME/shared/lib
33
34
35Using PDFlib with IBM Visual Age for Java
36==========================================
37
38- Add pdflib.jar to your project.
39
40- Place pdf_java.dll in the \winnt\system32 directory, or some 
41  other directory contained in the PATH environment variable.
42
43- Relative pathnames in PDFlib function calls are interpreted relative
44  to the java bin directory, not the project directory. For this reason
45  the output of the supplied PDFlib samples may end up in some strange
46  place. Absolute path names work.
47
48
49Using PDFlib with Borland JBuilder
50==================================
51
52- Having pdflib.java in the same directory as the project file
53  seems to confuse JBuilder.
54
55- On Windows pdf_java.dll must be placed in the \winnt\system32 directory,
56  or some other directory contained in the PATH environment variable.
57  On Linux libpdf_java.so should be placed in /usr/lib or a similar
58  well-known (to the system) directory.
59
60- Relative pathnames in PDFlib function calls are interpreted relative
61  to the JBuilder bin directory, not the project directory.  For this
62  reason the output of the supplied PDFlib samples may end up in some
63  strange place. Absolute path names work.
64
65
66Using PDFlib with MacroMedia ColdFusion MX
67==========================================
68
69We recommend the PDFlib Java edition (instead of the COM edition) for
70use with ColdFusion MX. Install the PDFlib Java edition by extracting
71pdflib.jar and pdf_java.dll into a folder defined in ColdFusion MX's 
72Java classpath and the system's PATH variable (might as well just use 
73C:/CFusionMX/lib). If you previously used the PDFlib COM edition
74with ColdFusion you have to change the <cfobject> tag parameters in
75the CF file as follows:
76
77<cfobject type="Java" name="oPDF" class="com.pdflib.pdflib" action="create">
78
79
80Using PDFlib with Allaire JRun
81==============================
82
83In order to use PDFlib with JRun the following is suggested:
84
85- Copy PDFlib.jar and lib_java.dll to the .../JRun/servers/lib directory.
86
87- Make sure that the lib directory is contained in the servlet.jnipath
88  property. This property can be set from the management console, or
89  specified in a local.properties file.
90
91
92Using PDFlib with J2EE-compliant servers
93========================================
94
95In order to use PDFlib with J2EE do the following:
96
97- Add the following lines in the file $J2EE_HOME/lib/security/server.policy
98  in order to allow the PDFlib native library to be loaded:
99
100  // default permissions granted to all domains
101  grant {
102          permission java.lang.RuntimePermission "loadLibrary.*";
103          permission java.lang.RuntimePermission "accessClassInPackage.*";
104          ...
105
106- Use the deployment tool to add pdflib.jar to the project as an external
107  jar library.
108  It seems that pdflib.jar must be placed in the %J2EE_HOME%/lib directory;
109  otherwise the server will attempt to load the PDFlib shared library
110  multiply, resulting in the error message "shared library already loaded".
111
112- pdf_java.dll or libpdf_java.so must be accessible in some system path,
113  e.g. \winnt\system32 or /usr/local/lib, or via PATH/LD_LIBRARY_PATH.
114
115- The PATH and CLASSPATH variables should point to the bin subdirectories
116  of J2EE and JDK.
117
118
119Using PDFlib with Tomcat
120========================
121
122In order to use PDFlib with Apache Tomcat do the following:
123
124- Put the PDFlib shared library or DLL (e.g. pdf_java.dll) into a directly
125  which is accessible systemwide (e.g. C:\winnt\system32).
126
127- It is suggested to load PDFlib as early as possible. Loading PDFlib later
128  in the servlet (e.g., via repositories) may fail due to different
129  class loaders.
130
131- Put pdflib.jar into
132  $CATALINA_HOME/common/lib (Tomcat 3) or
133  $CATALINA_HOME/shared/lib (Tomcat 4).
134
135- Add a line similar to the file tomcat.properties:
136
137    wrapper.env="/usr/local/lib:/usr/lib:/lib"
138
139- After building or installing PDFlib it may help to update the shared
140  library cache via
141
142  ldconfig -v		(or similar command depending on your Unix version)
143
144
145
146Using PDFlib with IBM WebSphere Application Server
147==================================================
148
149The instructions in this section apply to WebSphere 3 and 4.
150For WebSphere 5 please refer to the section above on J2EE-compliant
151servers.
152
153Servlets are loaded with a custom class loader. For this reason,
154the pdflib.jar file has to be located in the Application Server's
155classpath rather than the web application's classpath.  
156
157To locate the pdflib.jar file in the app server's classpath, place the jar 
158file in the \<WAS app-server's path>\lib directory and edit the 
159admin.config file.  In the admin.config file add the path to the jar file 
160to the setting labeled:
161
162com.ibm.ejs.sm.adminserver.classpath
163
164If you use the Websphere Application Assembly Tool you can add pdflib.jar
165to your project. 
166
167The DLL or .so must be located somewhere on the machine's path.
168The winnt\system32 directory works for Windows, the bin directory
169of WAS on Solaris.
170
171On the AS/400 make sure that the PDFLIB and PDF_JAVA SRVPGM can be
172found in the library list of the jobs running your Java apps. The
173easiest way to achieve this is to copy these SRVPGMs to the QGPL
174library. In most cases this library is found in every LIBL.
175
176
177Using PDFlib on Mac OS X
178========================
179
180On Mac OS X the shared PDFlib library for Java, which has a default file
181name of libpdf_java.dylib, must be renamed to libpdf_java.jnilib. The
182PDFlib build process does this automatically.
183
184The default search path for JNI libraries on OS X is as follows:
185
186    .:/usr/lib:/usr/lib/java:/lib:
187    /System/Library/Frameworks/JavaVM.framework/Versions/1.2/Libraries
188
189You can extend the JNI search path by defining the DYLD_LIBRARY_PATH
190with more directories.
191
192
193Using PDFlib with Apple WebObjects
194==================================
195
196To the best of our knowledge, the following should be sufficient in order
197to use PDFlib with WebObjects:
198
199- Use the java-framework-maker tool to create a new WebObjects Framework,
200  and select PDFlib.jar as input package.
201
202- Add the new framework to your project.
203
204
205Using PDFlib with Lotus Notes
206=============================
207
208We don't have first-hand experience with deploying PDFlib in Notes.
209However, a user contributed the following information:
210
211> Apparently when you compile the Java code and then you run the code, Domino
212> is not using the same paths.  To compile the code you need to add the
213> pdflib.jar to the project.  This can be done by clicking the Edit Project
214> button and browsing to the directory where the file is located and then
215> adding the file to the project.  This will allow you to compile the code
216> without errors.  If you are a programmer you will assume that since the
217> code compiled therefore Domino knows where the Java class resides but you
218> know what happens when you assume.  The second thing that you need to do is
219> create a "\com\pdflib" directory within your Notes directory and put the
220> pdflib.class file in that directory.  When you specify "import
221> com.pdflib.pdflib" this is where Java will go to look for the class
222> then it executes it.  I found documentation that said that you can add a
223> path my adding a line in the notes.ini file "JavaUserClasses=yourpath" but
224> it did not work.
225
226
227Using PDFlib on SGI IRIX
228========================
229
230Use the LD_LIBRARYN32_PATH environment variable (as opposed to the
231traditional LD_LIBRARY_PATH) in order to set the directory where the
232PDFlib shared library for Java will be found.
233