ImageGear for C and C++ on Linux v20.0 - Updated
Getting Started with PDF
[No Target Defined] > [No Target Defined] > Formats with Additional Functionality > PDF > Getting Started with PDF

Once you've created your first PDF project in ImageGear, you'll be ready for more advanced functionality. You can start with our How to... topics, or dig right into the PDF API.

This topic provides information needed to:

Attach the PDF Component

To use the ImageGear PDF Component, you have attach this component to core ImageGear using the function IG_comm_comp_attach:

C and C++
Copy Code

To check if the Component is attached successfully, use the function IG_comm_comp_check:

C and C++
Copy Code

This function (method) returns TRUE if the Component is attached.

Initialize the Component

To initialize the ImageGear PDF component, the "PDF" component needs to be attached to the ImageGear component manager. Then, each thread that uses PDF functionality must call IG_PDF_initialize. Please see Process PDF Using Multiple Threads for additional information.

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)
Resource\PS\Fonts\ PS fonts directory
Resource\PS\ProcSet\ PostScript procedures
Resource\PS\ps.vm A file for initialization the PostScript Interpreter's virtual memory
Resource\PS\ Startup PostScript program used to initialize the PostScript Interpreter
Resource\PS\superatm.db Adobe® Type Manager® (ATM®) database used to substitute missing fonts

Enable PostScript Support

The PDF.ENABLE_POSTSCRIPT boolean global control parameter is used to enable/disable PostScript support in the PDF component.

By default, the ImageGear PDF Component enables PDF and PostScript file format support. But it is possible to disable PostScript file format support if it is not required.

To disable PostScript use:

C and C++
Copy Code
AT_BOOL bEnable = FALSE;
IG_gctrl_item_set( "PDF.ENABLE_POSTSCRIPT", AM_TID_AT_BOOL, &bEnable, sizeof(AT_BOOL), NULL ); 

Retrieve Info about the Component

To retrieve information about the attached Component, call the function IG_comm_comp_list:

C and C++
Copy Code
IG_comm_comp_list(LPUINT *lpnCount, UINT nIndex, LPCHAR lpComp, DWORD dwCompSize,
        LPUINT lpnRevMajor, LPUINT lpnRevMinor, LPUINT lpnRevUpdate,
        LPCHAR lpBuildDate, UINT nBDSize, LPCHAR lpInfoStr, UINT nISSize)

This function provides you with the full list of info about the component determined by nIndex index from the list of currently attached components whose numbers are returned through lpnCount argument.

For more detailed information about these functions usage see Attaching Components.

Is this page helpful?
Yes No
Thanks for your feedback.