Library Class Documentation
classLibraryNamespace:datalogics_interface
Detailed Description
A Library object can be used to create a new instance of a library or change the properties of an existing library.
Threading: per-thread. Each thread that touches the SDK must construct its own Library before creating any Document, Page, or PDFObject, and that Library must outlive every object it backs. Do not share a Library instance across threads. See datalogics_interface.hpp for the full threading model.
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(const std::vector< std::string > &font_paths)Parameters
font_paths: const std::vector< std::string > &
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(const std::vector< std::string > &font_paths, const std::string &cmap_path, const std::string &unicode_path, const std::string &color_profile_path, LibraryFlagsflags)Parameters
font_paths: const std::vector< std::string > &cmap_path: const std::string &unicode_path: const std::string &color_profile_path: const std::string &flags: LibraryFlags
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(const std::vector< std::string > &font_paths, const std::string &cmap_path, const std::string &unicode_path, LibraryFlagsflags)Parameters
font_paths: const std::vector< std::string > &cmap_path: const std::string &unicode_path: const std::string &flags: LibraryFlags
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(const std::vector< std::string > &font_paths, LibraryFlagsflags)Parameters
font_paths: const std::vector< std::string > &flags: LibraryFlags
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(Library &&)Parameters
Library
Library(LibraryFlagsflags)Parameters
flags: LibraryFlags
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()Destroy this handle to the PDF Library. Also terminate the library if this is the last Library object on this thread.
Member Function Documentation
change_working_space_cmyk
voidchange_working_space_cmyk(ColorProfileprofile)Parameters
profile: ColorProfileThe path on disk of the Color Profile to be used.
Returns:
voidSets the current CMYK working space to the specified ICC profile.
change_working_space_cmyk
voidchange_working_space_cmyk(const std::string &profile_path)Parameters
profile_path: const std::string &The path on disk of the Color Profile to be used.
Returns:
voidSets the current CMYK working space to the specified ICC profile.
change_working_space_gray
voidchange_working_space_gray(ColorProfileprofile)Parameters
profile: ColorProfileThe path on disk of the Color Profile to be used.
Returns:
voidSets the current Gray working space to the specified ICC profile.
change_working_space_gray
voidchange_working_space_gray(const std::string &profile_path)Parameters
profile_path: const std::string &The path on disk of the Color Profile to be used.
Returns:
voidSets the current Gray working space to the specified ICC profile.
change_working_space_rgb
voidchange_working_space_rgb(ColorProfileprofile)Parameters
profile: ColorProfileThe path on disk of the Color Profile to be used.
Returns:
voidSets the current RGB working space to the specified ICC profile.
change_working_space_rgb
voidchange_working_space_rgb(const std::string &profile_path)Parameters
profile_path: const std::string &The path on disk of the Color Profile to be used.
Returns:
voidSets the current RGB working space to the specified ICC profile.
enable_licensed_behavior
static boolenable_licensed_behavior(const std::string &key)Parameters
key: const std::string &A base64-encoded string containing the encrypted license key.
Returns:
true if the licensed behavior has been successfully enabled.The function parameter is a base64-encoded string containing the encrypted licensed key.
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.
get_allow_opening_xfa
boolget_allow_opening_xfa()Returns:
boolAllow opening PDF files that contain XFA forms. By default, an exception will be raised when attempting to open this type of document.
get_allow_relaxed_syntax
boolget_allow_relaxed_syntax()Returns:
true if these minor errors are ignored.Check to see if minor parsing errors are ignored while opening PDF files.
get_apdfl_version
static std::stringget_apdfl_version()Returns:
std::stringThe version of the C/C++ SDK, as reported in legacy versions of APDFL.
E.g., 21.0.0P1a
get_default_temp_path
std::stringget_default_temp_path()Returns:
string with current default directory for temporary files, or null if none was set by the user.Gets the default temporary directory.
get_default_temp_store
TempStoreTypeget_default_temp_store()Returns:
current temporary storage type.Gets default temporary storage. PDFL uses Disk storage type by default.
get_default_temp_store_mem_limit
intget_default_temp_store_mem_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 valueGets current memory limit.
get_forms_extension_version
static std::stringget_forms_extension_version()Returns:
The Forms Extension Versionget_install_location
static std::stringget_install_location()Returns:
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.
get_license_key
static std::stringget_license_key()Returns:
std::stringA string containing a license key, as an alternative to using a license file. Only applicable to License-Managed versions.
get_log_params
LogParamsget_log_params()Returns:
The LogParams object which contains currently used logging settings.Gets LogParams object with preferences for logging.
get_resource_directory
static std::stringget_resource_directory()Returns:
the resource directory as a UTF-8 pathThe resource directory.
get_version
static std::stringget_version()Returns:
std::stringThe version of the SDK, as reported in legacy versions of APDFL.
E.g., 21.0.0.0
initialized
static boolinitialized()Returns:
true if the PDF Library is initialized on this threadCheck to see if the library is initialized
is_forms_extension_available
boolis_forms_extension_available()Returns:
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.
operator=
Library &operator=(Library &&)Parameters
Returns:
Library &set_allow_opening_xfa
voidset_allow_opening_xfa(boolallow)Parameters
allow: booltrue to allow opening PDF files that contain XFA forms; false to throw an exception on such files.
Returns:
voidAllow opening PDF files that contain XFA forms. By default, an exception will be raised when attempting to open this type of document.
set_allow_relaxed_syntax
voidset_allow_relaxed_syntax(boolallow)Parameters
allow: boolthe ignore minor parsing errors while opening PDF files. By default, exceptions are raised when such errors occur
Returns:
voidIgnore minor parsing errors while opening PDF files. By default, exceptions are raised when such errors occur.
set_default_temp_path
voidset_default_temp_path(const std::string &path)Parameters
path: const std::string &the default temporary path to the directory indicated by the specified path name
Returns:
voidPass null as the path to use the system default temporary file directory.
set_default_temp_store
voidset_default_temp_store(TempStoreTypetype)Parameters
type: TempStoreTypetemporary storage type.
Returns:
voidUse 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.
set_default_temp_store_mem_limit
voidset_default_temp_store_mem_limit(intlimit_kb)Parameters
limit_kb: int
Returns:
voidAccepts 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;
set_license_key
static voidset_license_key(const std::string &key)Parameters
key: const std::string &a string containing a license, as an alternative to using a license file. Only applicable to License-Managed versions
Returns:
voidA string containing a license, as an alternative to using a license file. Only applicable to License-Managed versions.
set_log_params
voidset_log_params(const LogParams ¶ms)Parameters
params: const LogParams &the new parameters for logging.
Returns:
voidSets LogParams object with preferences for logging.
terminate
voidterminate()Returns:
voidTerminate the library with regard to this handle. (Note that if there are other Library objects in this thread, they may keep the library initialized.