[]
        
(Showing Draft Content)

connectDsPdf

DsPdfJS API v9.1.0


DsPdfJS API / connectDsPdf

Function: connectDsPdf()

connectDsPdf(): Promise<boolean>

Establishes a connection to the DsPdf module.

Attempts to connect using the default instance from DsPdf.instance if available. If no default instance exists, creates a new DsPdf instance and attempts to connect.

Returns

Promise<boolean>

A promise that resolves to true if the connection was successfully established, false otherwise.

Throws

If the connection fails due to underlying module errors.

Example

// Connect to DsPdf module
const isConnected = await connectDsPdf();
if (isConnected) {
  console.log('Successfully connected to DsPdf');
} else {
  console.error('Failed to connect to DsPdf');
}