Library Class Documentation

class Library

Namespace:com::datalogics::PDFL

Detailed Description

Used to create a new instance of a library object or change properties. A Library object can be used to create a new instance of a library or change the properties of an existing library.

Uses types

Constructor & Destructor Documentation

Library

Library()

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

Library

Library(java.util.EnumSet< LibraryFlags > flags)

Parameters

flags: java.util.EnumSet< LibraryFlags >

PDF Library initialization flags, optional

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

Library

Library(java.util.List< String > fontPaths)

Parameters

fontPaths: java.util.List< String >

list of directories to search for fonts

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

Library

Library(java.util.List< String > fontPaths, java.util.EnumSet< LibraryFlags > flags)

Parameters

fontPaths: java.util.List< String >

list of directories to search for fonts

flags: java.util.EnumSet< LibraryFlags >

PDF Library initialization flags, optional

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

Library

Library(java.util.List< String > fontPaths, String CMapPath, String UnicodePath, java.util.EnumSet< LibraryFlags > flags)

Parameters

fontPaths: java.util.List< String >

list of directories to search for fonts

CMapPath: String

directory to search for CMap files (pass an empty string to use the default)

UnicodePath: String

directory to search for Unicode mapping files (pass an empty string to use the default)

flags: java.util.EnumSet< LibraryFlags >

PDF Library initialization flags, optional

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

Library

Library(java.util.List< String > fontPaths, String CMapPath, String UnicodePath, String ColorProfilePath, java.util.EnumSet< LibraryFlags > flags)

Parameters

fontPaths: java.util.List< String >

list of directories to search for fonts

CMapPath: String

directory to search for CMap files (pass an empty string to use the default)

UnicodePath: String

directory to search for Unicode mapping files (pass an empty string to use the default)

ColorProfilePath: String

directory to search for Color Profile files (pass an empty string to use the default)

flags: java.util.EnumSet< LibraryFlags >

PDF Library initialization flags, optional

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

Library

Library(String[] fontPaths)

Parameters

fontPaths: String[]

list of directories to search for fonts

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

Library

Library(String[] fontPaths, java.util.EnumSet< LibraryFlags > flags)

Parameters

fontPaths: String[]

list of directories to search for fonts

flags: java.util.EnumSet< LibraryFlags >

PDF Library initialization flags, optional

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

Member Function Documentation

changeWorkingSpaceCMYK

void changeWorkingSpaceCMYK(ColorProfile colorProfile)

Parameters

colorProfile: ColorProfile

The Color Profile to be used.

Returns:

void

Sets the current CMYK working space to the specified ICC profile.

changeWorkingSpaceCMYK

void changeWorkingSpaceCMYK(String profilePath)

Parameters

profilePath: String

The path on disk of the Color Profile to be used.

Returns:

void

Sets the current CMYK working space to the specified ICC profile.

changeWorkingSpaceGray

void changeWorkingSpaceGray(ColorProfile colorProfile)

Parameters

colorProfile: ColorProfile

The Color Profile to be used.

Returns:

void

Sets the current Gray working space to the specified ICC profile.

changeWorkingSpaceGray

void changeWorkingSpaceGray(String profilePath)

Parameters

profilePath: String

The path on disk of the Color Profile to be used.

Returns:

void

Sets the current Gray working space to the specified ICC profile.

changeWorkingSpaceRGB

void changeWorkingSpaceRGB(ColorProfile colorProfile)

Parameters

colorProfile: ColorProfile

The Color Profile to be used.

Returns:

void

Sets the current RGB working space to the specified ICC profile.

changeWorkingSpaceRGB

void changeWorkingSpaceRGB(String profilePath)

Parameters

profilePath: String

The path on disk of the Color Profile to be used.

Returns:

void

Sets the current RGB working space to the specified ICC profile.

delete

synchronized void delete(Boolean disposing)

Parameters

disposing: Boolean

Returns:

synchronized void

delete

synchronized void delete()

Returns:

synchronized void

Destroy this handle to the PDF Library. Also terminate the library if this is the last Library object on this thread.

enableLicensedBehavior

static boolean enableLicensedBehavior(String arg0)

Parameters

arg0: String

A base64-encoded string containing the encrypted license key.

Returns:

boolean

true if the licensed behavior has been successfully enabled.

This is used to turn on licensed behaviors in DLE. The function parameter is a base64-encoded string containing the encrypted licensed key.

finalize

void finalize()

Returns:

void

Destroy this handle to the PDF Library. Also terminate the library if this is the last Library object on this thread.

getAPDFLVersion

static String getAPDFLVersion()

Returns:

String

The version of the C/C++ SDK, as reported in legacy versions of APDFL.

E.g., 18.0.5P1a

getAllowOpeningXFA

boolean getAllowOpeningXFA()

Returns:

boolean

Allow opening PDF files that contain XFA forms. By default, an exception will be raised when attempting to open this type of document.

getAllowRelaxedSyntax

boolean getAllowRelaxedSyntax()

Returns:

boolean

true if these minor errors are ignored.

Check to see if minor parsing errors are ignored while opening PDF files.

getDLEVersion

static String getDLEVersion()

Returns:

String

The version of the .NET/Java SDK, as reported in legacy versions of APDFL.

E.g., 18.0.5.0

getDefaultTempPath

String getDefaultTempPath()

Returns:

String

string with current default directory for temporary files, or null if none was set by the user.

Gets the default temporary directory.

getDefaultTempStore

TempStoreType getDefaultTempStore()

Returns:

TempStoreType

current temporary storage type.

Gets default temporary storage.PDFL uses Disk storage type by default.

getDefaultTempStoreMemLimit

int getDefaultTempStoreMemLimit()

Returns:

int

current memory limit. It returns zero value for cases when unlimited memory amount is used or when current storage type is Disk. Call DefaultTempStore to get the exact meaning of the zero value

Gets current memory limit.

getFormsExtensionVersion

static String getFormsExtensionVersion()

Returns:

String

The Forms Extension Version

Forms Extension Version

getInstallLocation

static String getInstallLocation()

Returns:

String

the installation location as a UTF-8 path.

The installation location.

This is inferred from the location of the native code and returned as a UTF-8 path.

getLicenseKey

static String getLicenseKey()

Returns:

String

A string containing a license key, as an alternative to using a license file. Only applicable to License-Managed versions.

getLogParams

LogParams getLogParams()

Returns:

LogParams

The LogParams object which contains currently used logging settings.

Gets LogParams object with preferences for logging.

getResourceDirectory

static String getResourceDirectory()

Returns:

String

the resource directory as a UTF-8 path

The resource directory.

initialized

static boolean initialized()

Returns:

boolean

true if the PDF Library is initialized on this thread

Check to see if the library is initialized

isFormsExtensionAvailable

boolean isFormsExtensionAvailable()

Returns:

boolean

true if the Forms Extension dependencies are present, and false if they are not.

Validate the Forms Extension dependencies are present. Indicates if all of the necessary dependencies are present for the Forms extension.

setAllowOpeningXFA

void setAllowOpeningXFA(boolean xfaSetting)

Parameters

xfaSetting: boolean

Returns:

void

Allow opening PDF files that contain XFA forms. By default, an exception will be raised when attempting to open this type of document.

setAllowRelaxedSyntax

void setAllowRelaxedSyntax(boolean allowRelaxedSyntax)

Parameters

allowRelaxedSyntax: boolean

Returns:

void

Ignore minor parsing errors while opening PDF files.By default, exceptions are raised when such errors occur.

setDefaultTempPath

void setDefaultTempPath(String defTempPath)

Parameters

defTempPath: String

Returns:

void

Sets the default temporary path to the directory indicated by the specified path name. Pass null as the path to use the system default temporary file directory.

setDefaultTempStore

void setDefaultTempStore(TempStoreType tempStore)

Parameters

tempStore: TempStoreType

temporary storage type.

Returns:

void

Allows to switch between different types of temporary storages. Use Disk type to turn off in-memory file system usage. Use Memory type to turn on in-memory file system with unlimited RAM amount by default.

setDefaultTempStoreMemLimit

void setDefaultTempStoreMemLimit(int memoryLimit)

Parameters

memoryLimit: int

Returns:

void

Sets memory limit for Memory storage type. Accepts any positive integer to set threshold for using RAM in kilobytes. When occupied memory exceeds specified threshold, temporary files creation will be redirected to physical disk.

Throws an exception if current storage type is Disk. Throws an exception if input value less than 0;

setLicenseKey

static void setLicenseKey(String licenses)

Parameters

licenses: String

Returns:

void

A string containing a license, as an alternative to using a license file. Only applicable to License-Managed versions.

setLogParams

void setLogParams(LogParams logParams)

Parameters

logParams: LogParams

the new parameters for logging.

Returns:

void

Sets LogParams object with preferences for logging.

terminate

void terminate()

Returns:

void

Terminate the library with regard to this handle. (Note that if there are other Library objects in this thread, they may keep the library initialized.