Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
#include "ltwrappr.h"
static L_INT LFileSettings::SetPDFInitDir(pszInitDir)
L_TCHAR * pszInitDir; |
/* path of the initialization directory */ |
Overrides the default path of PDF initialization directories.
Parameter |
Description |
pszInitDir |
Character string containing the new path of the initialization directory. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The user calls this function to override the default path of the PDF initialization directories. This allows the user to choose which PDF runtime library his or her application loads at runtime.
The default PDF initialization directories path is stored in the system registry key: "HKEY_LOCAL_MACHINE\SOFTWARE\LEAD Technologies, Inc.\Pdf\GS_LIB"
If you call this function with an empty string (length = 0), then the engine will look for the PDF initialization files in the default PDF initialization directories path (specified by the registry key).
The new path must both exist prior to calling the function and contain the Lib, Font, and Resource directories for the PDF Filter. If either of the above is not true, the engine fails and returns an error when the user attempts to load a PDF file.
Required DLLs and Libraries
LTFIL For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
See Also
Functions: |
|
Topics: |
|
|
Example
L_INT LFileSettings__SetPDFInitDirExample() { L_INT nRet; L_TCHAR *pszInitDir=NULL; pszInitDir = (L_TCHAR*)malloc(MAX_PATH*sizeof(L_TCHAR)); nRet = LFileSettings::GetPDFInitDir(pszInitDir, MAX_PATH); if(nRet != SUCCESS) return nRet; nRet = LFileSettings::SetPDFInitDir(pszInitDir); free(pszInitDir); return SUCCESS; }