JagPDF
Prev Up Home Next

3.10.  Miscellaneous

JagPDF enables parallel composition of multiple documents in a single process. The only limitation is that the objects returned from JagPDF cannot be passed among threads. There is one exception to this rule - Profile object. A single Profile instance can be passed to multiple threads. However, Profile itself does not internally implement any synchronization so if you intend to modify a Profile instance concurrently you have to ensure synchronized access in order to prevent race conditions.

Python

Python uses the Global Interpreter Lock (GIL). In short, it means that only one thread that acquired GIL may operate on Python objects or call Python/C API functions.

This is not a limitation for JagPDF. Whenever the Python interpreter makes a call to JagPDF it releases GIL and calls the JagPDF core code which is written in C++ and does not interact with Python at all. When the call is finished the interpreter acquires GIL and continues executing Python code. As a result, if you are composing documents in a single process on multiple threads, despite GIL, the JagPDF core code can be executed truly concurrently which can improve scalability of your application.

Overview

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

Run-time Checks

Use version() to determine the JagPDF version at run-time.

Compile-time Checks

A C/C++ application can be compiled with a different JagPDF version than it will be actually used in run-time. For that reason, compile-time constants are provided.

C/C++ Compile-time Version Constants

version

C

C++

Java

major

jag_this_version_major

jag::pdf::this_version_major

com.jagpdf.this_version_major

minor

jag_this_version_minor

jag::pdf::this_version_minor

com.jagpdf.this_version_minor

patch

jag_this_version_patch

jag::pdf::this_version_patch

com.jagpdf.this_version_patch

Compatibility Examples

Original Version

New Version

Compatible?

2.2.3

2.2.4

Yes

Compatibility across patch versions is guaranteed.

2.2.3

2.2.1

Yes

Compatibility across patch versions is guaranteed.

2.2.3

2.3.1

Yes

Compatibility with later minor versions is guaranteed.

2.2.3

2.1.7

No

Compatibility with prior minor versions is not guaranteed.

2.2.3

3.0.0

No

Compatibility with different major versions is not guaranteed.

2.2.3

1.4.7

No

Compatibility with different major versions is not guaranteed.

[Note]

While some of the cells say no, it is possible that the versions may be compatible, depending very precisely upon the particular APIs used by the application.

Some functions accept an options string. It is a semicolon separated list of options. An option can be:

  • keyword=value pair, where value is either a scalar value or a comma separated list of values
  • standalone value
'value; keyword=value; array=1, 10, 100'
Prev Up Home Next