Library Class Documentation
class LibraryNamespace:datalogics_interface
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.
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, LibraryFlags flags)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, LibraryFlags flags)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, LibraryFlags flags)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(LibraryFlags flags)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
void change_working_space_cmyk(ColorProfile profile)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
void change_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
void change_working_space_gray(ColorProfile profile)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
void change_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
void change_working_space_rgb(ColorProfile profile)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
void change_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 bool enable_licensed_behavior(const std::string & key)Parameters
key: const std::string &A base64-encoded string containing the encrypted license key.
Returns:
booltrue 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.
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.
get_allow_opening_xfa
bool get_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
bool get_allow_relaxed_syntax()Returns:
booltrue if these minor errors are ignored.
Check to see if minor parsing errors are ignored while opening PDF files.
get_apdfl_version
static std::string get_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::string get_default_temp_path()Returns:
std::stringstring 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
TempStoreType get_default_temp_store()Returns:
TempStoreTypecurrent temporary storage type.
Gets default temporary storage. PDFL uses Disk storage type by default.
get_default_temp_store_mem_limit
int get_default_temp_store_mem_limit()Returns:
intcurrent 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.
get_forms_extension_version
static std::string get_forms_extension_version()Returns:
std::stringThe Forms Extension Version
get_install_location
static std::string get_install_location()Returns:
std::stringthe 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::string get_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
LogParams get_log_params()Returns:
LogParamsThe LogParams object which contains currently used logging settings.
Gets LogParams object with preferences for logging.
get_resource_directory
static std::string get_resource_directory()Returns:
std::stringthe resource directory as a UTF-8 path
The resource directory.
get_version
static std::string get_version()Returns:
std::stringThe version of the SDK, as reported in legacy versions of APDFL.
E.g., 21.0.0.0
initialized
static bool initialized()Returns:
booltrue if the PDF Library is initialized on this thread
Check to see if the library is initialized
is_forms_extension_available
bool is_forms_extension_available()Returns:
booltrue 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
void set_allow_opening_xfa(bool allow)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
void set_allow_relaxed_syntax(bool allow)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
void set_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:
voidSets 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.
set_default_temp_store
void set_default_temp_store(TempStoreType type)Parameters
type: TempStoreTypetemporary storage type.
Returns:
voidAllows 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.
set_default_temp_store_mem_limit
void set_default_temp_store_mem_limit(int limit_kb)Parameters
limit_kb: int
Returns:
voidSets 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;
set_license_key
static void set_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
void set_log_params(const LogParams & params)Parameters
params: const LogParams &the new parameters for logging.
Returns:
voidSets LogParams object with preferences for logging.
terminate
void terminate()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.