L_SetPDFInitDir
#include "l_bitmap.h"
L_LTFIL_API L_INT L_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. |
Platforms
Windows 2000 / XP/Vista.
See Also
Functions: |
|
Topics: |
|
|
Example
This example will show how to get the path of PDF initialization directories
L_INT SetPDFInitDirExample(L_VOID) { L_INT nRet; L_TCHAR *pszInitDir=NULL; pszInitDir = (L_TCHAR*)malloc(MAX_PATH*sizeof(L_TCHAR)); nRet = L_GetPDFInitDir(pszInitDir, MAX_PATH); if(nRet != SUCCESS) return nRet; nRet = L_SetPDFInitDir(pszInitDir); free(pszInitDir); return nRet; }