2022-04-04 17:06:06 +02:00
|
|
|
Jcpdf: Java interface to the cpdf PDF tools
|
|
|
|
===========================================
|
|
|
|
|
|
|
|
The DLLs "libcpdf" and "libjcpdf" are required.
|
2022-04-03 16:48:26 +02:00
|
|
|
|
|
|
|
Before using the library, you must make sure your project or build environment
|
2022-04-04 17:06:06 +02:00
|
|
|
has access to the cpdf DLL, which is not part of the Java .jar. You can add as
|
|
|
|
am external requirement in your Java IDE. Or, you can install it in a standard
|
|
|
|
location, such as the Windows system folder.
|
2022-04-03 16:48:26 +02:00
|
|
|
|
2022-04-04 17:06:06 +02:00
|
|
|
On Windows, The DLL libcpdf.dll must be renamed to cpdf.dll, for Jcpdf to be
|
|
|
|
able to find it.
|
2022-04-03 16:48:26 +02:00
|
|
|
|
2022-04-04 17:06:06 +02:00
|
|
|
Follow the instructions at the end of Chapter 1 to write your first program. In
|
|
|
|
addition, the Jcpdf package provides documentation with each function, which
|
|
|
|
you can view in your IDE.
|
2022-04-03 16:48:26 +02:00
|
|
|
|
2022-04-04 17:06:06 +02:00
|
|
|
Usage
|
|
|
|
-----
|
2022-04-03 16:48:26 +02:00
|
|
|
|
2022-04-04 17:06:06 +02:00
|
|
|
Create an instance of the library with, for example:
|
2022-04-03 16:48:26 +02:00
|
|
|
|
2022-04-04 17:06:06 +02:00
|
|
|
Jcpdf.jcpdf = new Jcpdf()
|
2022-04-03 16:48:26 +02:00
|
|
|
|
2022-04-04 17:06:06 +02:00
|
|
|
You must call startup() to initialise the library prior to calling any other
|
|
|
|
function.
|
2022-04-03 16:48:26 +02:00
|
|
|
|
2022-04-04 17:06:06 +02:00
|
|
|
PDFs are of type Jcpdf.Pdf. Page ranges are of type Jcpdf.Range. Both PDFs and
|
|
|
|
ranges are not automatically garbage-collected. Use try or the close() method
|
|
|
|
to dispose of them.
|
2022-04-03 16:48:26 +02:00
|
|
|
|
2022-04-04 17:06:06 +02:00
|
|
|
Exceptions are of type Jcpdf.CpdfError and may be raised by any function.
|