ImageGear .NET v25.0 - Updated
Initialize(String,String) Method




ImageGear.Formats.Pdf Assembly > ImageGear.Formats.PDF Namespace > ImGearPDF Class > Initialize Method : Initialize(String,String) Method
Path to PDF/PS library. If null or empty, ImageGear attempts to find it automatically, as when Initialize is called without arguments.
Path used by the PS library to store temporary files. If null or empty, the system temp folder is used, as when Initialize is called without arguments
Initializes PDF and PS libraries.
Syntax
'Declaration
 
Public Overloads Shared Sub Initialize( _
   ByVal resourcePath As String, _
   ByVal postScriptTempDirectory As String _
) 
'Usage
 
Dim resourcePath As String
Dim postScriptTempDirectory As String
 
ImGearPDF.Initialize(resourcePath, postScriptTempDirectory)
public static void Initialize( 
   string resourcePath,
   string postScriptTempDirectory
)
public: static void Initialize( 
   string* resourcePath,
   string* postScriptTempDirectory
) 
public:
static void Initialize( 
   String^ resourcePath,
   String^ postScriptTempDirectory
) 

Parameters

resourcePath
Path to PDF/PS library. If null or empty, ImageGear attempts to find it automatically, as when Initialize is called without arguments.
postScriptTempDirectory
Path used by the PS library to store temporary files. If null or empty, the system temp folder is used, as when Initialize is called without arguments
Remarks
This initialization method must be called for each thread in the multi-threaded application.

A call to an Initialize() method should be paired with a call to the Terminate method. The very first call to Initialize() will initialize the entire PDF library, while its paired call to Terminate method will de-initialize and release its memory. Multiple PDF initialization/termination pairs are supported in a multi-threaded PDF application, because it is required to initialize and terminate PDF in each child thread.

PDF support requires ImGearFileFormats.Filters.Add(ImGearPDF.CreatePDFFormat()) call be made before the first call to ImGearPDF.Initialize().

PS support requires both ImGearFileFormats.Filters.Add(ImGearPDF.CreatePDFFormat(path)) and ImGearFileFormats.Filters.Add(ImGearPDF.CreatePSFormat(path)) calls be made before the first call to ImGearPDF.Initialize(path).

See Also

Reference

ImGearPDF Class
ImGearPDF Members
Overload List
Terminate Method