Class Library
-
Constructor Summary
ConstructorsConstructorDescriptionLibrary()Initialize the PDF Library on this thread.Initialize the PDF Library on this thread.Library(String[] fontPaths, EnumSet<LibraryFlags> flags) Initialize the PDF Library on this thread.Library(EnumSet<LibraryFlags> flags) Initialize the PDF Library on this thread.Initialize the PDF Library on this thread.Library(List<String> fontPaths, String CMapPath, String UnicodePath, String ColorProfilePath, EnumSet<LibraryFlags> flags) Initialize the PDF Library on this thread.Initialize the PDF Library on this thread.Library(List<String> fontPaths, EnumSet<LibraryFlags> flags) Initialize the PDF Library on this thread. -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeWorkingSpaceCMYK(ColorProfile colorProfile) Sets the current CMYK working space to the specified ICC profile.voidchangeWorkingSpaceCMYK(String profilePath) Sets the current CMYK working space to the specified ICC profile.voidchangeWorkingSpaceGray(ColorProfile colorProfile) Sets the current Gray working space to the specified ICC profile.voidchangeWorkingSpaceGray(String profilePath) Sets the current Gray working space to the specified ICC profile.voidchangeWorkingSpaceRGB(ColorProfile colorProfile) Sets the current RGB working space to the specified ICC profile.voidchangeWorkingSpaceRGB(String profilePath) Sets the current RGB working space to the specified ICC profile.voiddelete()Destroy this handle to the PDF Library.static booleanenableLicensedBehavior(String arg0) This is used to turn on licensed behaviors in DLE. The function parameter is a base64-encoded string containing the encrypted licensed key.booleanAllow opening PDF files that contain XFA forms.booleanCheck to see if minor parsing errors are ignored while opening PDF files.static StringThe version of the C/C++ SDK, as reported in legacy versions of APDFL.Gets the default temporary directory.Gets default temporary storage. PDFL uses Disk storage type by default.intGets current memory limit.static StringThe version of the .NET/Java SDK, as reported in legacy versions of APDFL.static StringForms Extension Versionstatic StringThe installation location.static StringA string containing a license key, as an alternative to using a license file.Gets LogParams object with preferences for logging.static StringThe resource directory.static booleanCheck to see if the library is initializedbooleanValidate the Forms Extension dependencies are present.voidsetAllowOpeningXFA(boolean xfaSetting) Allow opening PDF files that contain XFA forms.voidsetAllowRelaxedSyntax(boolean allowRelaxedSyntax) Ignore minor parsing errors while opening PDF files. By default, exceptions are raised when such errors occur.voidsetDefaultTempPath(String defTempPath) Sets the default temporary path to the directory indicated by the specified path name.voidsetDefaultTempStore(TempStoreType tempStore) Allows to switch between different types of temporary storages.voidsetDefaultTempStoreMemLimit(int memoryLimit) Sets memory limit for Memory storage type.static voidsetLicenseKey(String licenses) A string containing a license, as an alternative to using a license file.voidsetLogParams(LogParams logParams) Sets LogParams object with preferences for logging.voidTerminate the library with regard to this handle.
-
Constructor Details
-
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.
- Parameters:
fontPaths- list of directories to search for fonts
-
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.
- Parameters:
fontPaths- list of directories to search for fontsflags- PDF Library initialization flags, optional
-
Library
public 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
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.
- Parameters:
flags- PDF Library initialization flags, optional
-
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.
- Parameters:
fontPaths- list of directories to search for fonts
-
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.
- Parameters:
fontPaths- list of directories to search for fontsflags- PDF Library initialization flags, optional
-
Library
public Library(List<String> fontPaths, String CMapPath, String UnicodePath, EnumSet<LibraryFlags> flags) 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.
- Parameters:
fontPaths- list of directories to search for fontsCMapPath- directory to search for CMap files (pass an empty string to use the default)UnicodePath- directory to search for Unicode mapping files (pass an empty string to use the default)flags- PDF Library initialization flags, optional
-
Library
public Library(List<String> fontPaths, String CMapPath, String UnicodePath, String ColorProfilePath, EnumSet<LibraryFlags> flags) 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.
- Parameters:
fontPaths- list of directories to search for fontsCMapPath- directory to search for CMap files (pass an empty string to use the default)UnicodePath- directory to search for Unicode mapping files (pass an empty string to use the default)ColorProfilePath- directory to search for Color Profile files (pass an empty string to use the default)flags- PDF Library initialization flags, optional
-
-
Method Details
-
delete
public void delete()Destroy this handle to the PDF Library. Also terminate the library if this is the last Library object on this thread. -
terminate
public void terminate()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. -
initialized
public static boolean initialized()Check to see if the library is initialized- Returns:
- true if the PDF Library is initialized on this thread
-
enableLicensedBehavior
This is used to turn on licensed behaviors in DLE. The function parameter is a base64-encoded string containing the encrypted licensed key.- Returns:
- true if the licensed behavior has been successfully enabled. NOTE: When using the Render bypass key, this requires you also set the BypassCopyPerm property to true of the DrawParams or PageImageParams classes for it to work.
-
getDLEVersion
The version of the .NET/Java SDK, as reported in legacy versions of APDFL.E.g., 18.0.5.0
-
getAPDFLVersion
The version of the C/C++ SDK, as reported in legacy versions of APDFL.E.g., 18.0.5P1a
-
getInstallLocation
The installation location.This is inferred from the location of the native code.
- Returns:
- the installation location as a path.
-
getResourceDirectory
The resource directory.- Returns:
- the resource directory as a path
-
setLicenseKey
A string containing a license, as an alternative to using a license file. Only applicable to License-Managed versions. -
getLicenseKey
A string containing a license key, as an alternative to using a license file. Only applicable to License-Managed versions. -
getAllowOpeningXFA
public boolean getAllowOpeningXFA()Allow opening PDF files that contain XFA forms. By default, an exception will be raised when attempting to open this type of document. -
setAllowOpeningXFA
public void setAllowOpeningXFA(boolean xfaSetting) Allow opening PDF files that contain XFA forms. By default, an exception will be raised when attempting to open this type of document. -
getDefaultTempPath
Gets the default temporary directory.- Returns:
- string with current default directory for temporary files, or null if none was set by the user.
-
setDefaultTempPath
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. -
getDefaultTempStore
Gets default temporary storage. PDFL uses Disk storage type by default.- Returns:
- current temporary storage type.
-
setDefaultTempStore
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.- Parameters:
tempStore- temporary storage type.
-
getDefaultTempStoreMemLimit
public int getDefaultTempStoreMemLimit()Gets current memory limit.- Returns:
- 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
-
setDefaultTempStoreMemLimit
public void setDefaultTempStoreMemLimit(int memoryLimit) 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;
- Parameters:
memoryLimit-
-
getLogParams
Gets LogParams object with preferences for logging.- Returns:
- The LogParams object which contains currently used logging settings.
-
setLogParams
Sets LogParams object with preferences for logging.- Parameters:
logParams- the new parameters for logging.
-
getAllowRelaxedSyntax
public boolean getAllowRelaxedSyntax()Check to see if minor parsing errors are ignored while opening PDF files.- Returns:
- true if these minor errors are ignored.
-
setAllowRelaxedSyntax
public void setAllowRelaxedSyntax(boolean allowRelaxedSyntax) Ignore minor parsing errors while opening PDF files. By default, exceptions are raised when such errors occur. -
changeWorkingSpaceRGB
Sets the current RGB working space to the specified ICC profile.- Parameters:
profilePath- The path on disk of the Color Profile to be used.
-
changeWorkingSpaceRGB
Sets the current RGB working space to the specified ICC profile.- Parameters:
colorProfile- The Color Profile to be used.
-
changeWorkingSpaceCMYK
Sets the current CMYK working space to the specified ICC profile.- Parameters:
profilePath- The path on disk of the Color Profile to be used.
-
changeWorkingSpaceCMYK
Sets the current CMYK working space to the specified ICC profile.- Parameters:
colorProfile- The Color Profile to be used.
-
changeWorkingSpaceGray
Sets the current Gray working space to the specified ICC profile.- Parameters:
profilePath- The path on disk of the Color Profile to be used.
-
changeWorkingSpaceGray
Sets the current Gray working space to the specified ICC profile.- Parameters:
colorProfile- The Color Profile to be used.
-
isFormsExtensionAvailable
public boolean isFormsExtensionAvailable()Validate the Forms Extension dependencies are present. Indicates if all of the necessary dependencies are present for the Forms extension.- Returns:
- true if the Forms Extension dependencies are present, and false if they are not.
-
getFormsExtensionVersion
Forms Extension Version- Returns:
- The Forms Extension Version
-