This function is used to initialize the ImageGear PDF Component.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_PDF_initialize( LPVOID lpVoid ); |
Name | Type | Description |
---|---|---|
lpVoid | LPVOID | Reserved, must be set to NULL. |
Error count
This function does not process image pixels.
Copy Code
|
|
---|---|
AT_ERRCOUNT ErrCount = 0; static char* pdf_path = "<Home directory>/Accusoft/ImageGear19/bin/Resource/PDF"; static char* ps_path = "<Home directory>/Accusoft/ImageGear19/bin/Resource/PS"; IG_gctrl_item_set("PDF.PDF_RESOURCE_PATH", AM_TID_MAKELP(AM_TID_CHAR), (LPVOID)pdf_path, strlen(pdf_path) + 1, NULL); IG_gctrl_item_set("PDF.PS_RESOURCE_PATH", AM_TID_MAKELP(AM_TID_CHAR), (LPVOID)ps_path, strlen(ps_path) + 1, NULL); ErrCount += IG_PDF_initialize(NULL); //... ErrCount += IG_PDF_terminate(); |
Use /Accusoft/ImageGear19-64/bin/ for 64-bit platforms.
To initialize the ImageGear PDF component it needs to be attached to the core ImageGear and then IG_PDF_initialize() function must be called.
The following resource content is required by the ImageGear PDF component initialization routine:
Resource\PDF\CIDFont\ | PDF CID fonts directory. |
Resource\PDF\CMap\ | PDF font CMaps directory. |
Resource\PDF\Font\ | PDF fonts directory. |
Resource\PDF\Unicode\ | PDF unicode mappings directory. |
Resource\PS\ColorRendering\ | Color rendering PostScript. |
Resource\PS\ICCProfiles\ |
Directory containing the ICC profiles that allow using the Adobe® Color Engine® (ACE®).
The profiles in this directory must be placed in the system folder named, which on Windows is named \Windows\System32\Color.
|
Resource\PS\Fonts\ | PS fonts directory. |
Resource\PS\ProcSet\ | PostScript procedures. |
Resource\PS\ps.vm | A file for initializing the PostScript Interpreter's virtual memory. |
Resource\PS\startupNORM.ps | Startup PostScript program used to initialize the PostScript Interpreter. |
Resource\PS\superatm.db | Adobe® Type Manager® (ATM®) database used to substitute missing fonts. |
ImageGear PDF component uses the following PDF global control parameters to locate resource content:
PDF.PDF_RESOURCE_PATH | Path to the Resource\PDF directory |
PDF.PS_RESOURCE_PATH | Path to the Resource\PS directory |
PDF.HOST_FONT_PATH | Path to the system font directory |
PDF.TMP_PATH | Path to the TEMP directory |
Examples provided below demonstrate setting and getting the value of PDF.PDF_RESOURCE_PATH control parameter.
Copy Code
|
|
---|---|
// Path to the Resource\PDF directory. IG_gctrl_item_set("PDF.PDF_RESOURCE_PATH", AM_TID_MAKELP(AM_TID_CHAR), szResourcePath, (DWORD)strlen(szResourcePath) + 1, ""); |
Copy Code
|
|
---|---|
// Get path to the Resource\PDF directory. IG_gctrl_item_get("PDF.PDF_RESOURCE_PATH", NULL, (LPVOID)&szResourcePath, sizeof(szResourcePath) - 1, NULL, NULL, 0, NULL); |
If the PDF global parameters are not defined, the ImageGear PDF Component behavior depends on the OS: