# Library Class

> Used to create a new instance of a library object or change properties.

- Product: Adobe PDF Library 18
- Language: .NET
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/Library
- Version index: https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/llms.txt

```csharp
class Library : SystemIDisposable
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** `SystemIDisposable`

## Description

Used to create a new instance of a library object or change properties.

A Library object can be used to create a new instance of a library or change the properties of an existing library.

**Referenced by:** [`Library`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/Library.md)

**Uses types:** [`ColorProfile`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/ColorProfile.md), [`Library`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/Library.md), [`LibraryFlags`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/LibraryFlags.md), [`LogParams`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/class/LogParams.md), [`TempStoreType`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/TempStoreType.md)

## Constructors

### Library

```csharp
Datalogics.PDFL.Library.Library()
```

*constructor*

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

### Library

```csharp
Datalogics.PDFL.Library.Library(LibraryFlags flags)
```

*constructor*

**Parameters**

- `flags` ([`LibraryFlags`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/LibraryFlags.md)): PDF Library initialization flags, optional

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

### Library

```csharp
Datalogics.PDFL.Library.Library(System.Collections.Generic.IList< System.String > fontPaths)
```

*constructor*

**Parameters**

- `fontPaths` (`System.Collections.Generic.IList< System.String >`): list of directories to search for fonts

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

### Library

```csharp
Datalogics.PDFL.Library.Library(System.Collections.Generic.IList< System.String > fontPaths, LibraryFlags flags)
```

*constructor*

**Parameters**

- `fontPaths` (`System.Collections.Generic.IList< System.String >`): list of directories to search for fonts
- `flags` ([`LibraryFlags`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/LibraryFlags.md)): PDF Library initialization flags, optional

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

### Library

```csharp
Datalogics.PDFL.Library.Library(System.Collections.Generic.IList< System.String > fontPaths, string CMapPath, string UnicodePath, LibraryFlags flags)
```

*constructor*

**Parameters**

- `fontPaths` (`System.Collections.Generic.IList< System.String >`): list of directories to search for fonts
- `CMapPath` (`string`): directory to search for CMap files (pass an empty string to use the default)
- `UnicodePath` (`string`): directory to search for Unicode mapping files (pass an empty string to use the default)
- `flags` ([`LibraryFlags`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/LibraryFlags.md)): PDF Library initialization flags, optional

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

### Library

```csharp
Datalogics.PDFL.Library.Library(System.Collections.Generic.IList< System.String > fontPaths, string CMapPath, string UnicodePath, string ColorProfilePath, LibraryFlags flags)
```

*constructor*

**Parameters**

- `fontPaths` (`System.Collections.Generic.IList< System.String >`): list of directories to search for fonts
- `CMapPath` (`string`): directory to search for CMap files (pass an empty string to use the default)
- `UnicodePath` (`string`): directory to search for Unicode mapping files (pass an empty string to use the default)
- `ColorProfilePath` (`string`): directory to search for Color Profile files (pass an empty string to use the default)
- `flags` ([`LibraryFlags`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/LibraryFlags.md)): PDF Library initialization flags, optional

Initialize the PDF Library on this thread. Note that each thread needs its own instance of the library.

Multiple Library objects can be created on a thread, but they all refer to the same underlying instantiation of the library.

## Properties

### APDFLVersion

```csharp
static string Datalogics.PDFL.Library.APDFLVersion { get; }
```

*static*

### AllowOpeningXFA

```csharp
bool Datalogics.PDFL.Library.AllowOpeningXFA { get; set; }
```

### AllowRelaxedSyntax

```csharp
bool Datalogics.PDFL.Library.AllowRelaxedSyntax { get; set; }
```

### DLEVersion

```csharp
static string Datalogics.PDFL.Library.DLEVersion { get; }
```

*static*

### DefaultTempPath

```csharp
string Datalogics.PDFL.Library.DefaultTempPath { get; set; }
```

### DefaultTempStore

```csharp
TempStoreType Datalogics.PDFL.Library.DefaultTempStore { get; set; }
```

### DefaultTempStoreMemLimit

```csharp
int Datalogics.PDFL.Library.DefaultTempStoreMemLimit { get; set; }
```

### FormsExtensionVersion

```csharp
static string Datalogics.PDFL.Library.FormsExtensionVersion { get; }
```

*static*

### InstallLocation

```csharp
static string Datalogics.PDFL.Library.InstallLocation { get; }
```

*static*

### LicenseKey

```csharp
static string Datalogics.PDFL.Library.LicenseKey { get; set; }
```

*static*

### LogParams

```csharp
LogParams Datalogics.PDFL.Library.LogParams { get; set; }
```

### ResourceDirectory

```csharp
static string Datalogics.PDFL.Library.ResourceDirectory { get; }
```

*static*

## Methods

### ChangeWorkingSpaceCMYK

```csharp
void Datalogics.PDFL.Library.ChangeWorkingSpaceCMYK(ColorProfile colorProfile)
```

**Parameters**

- `colorProfile` ([`ColorProfile`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/ColorProfile.md)): The Color Profile to be used.

**Returns:** `void`

Sets the current CMYK working space to the specified ICC profile.

### ChangeWorkingSpaceCMYK

```csharp
void Datalogics.PDFL.Library.ChangeWorkingSpaceCMYK(string profilePath)
```

**Parameters**

- `profilePath` (`string`): The path on disk of the Color Profile to be used.

**Returns:** `void`

Sets the current CMYK working space to the specified ICC profile.

### ChangeWorkingSpaceGray

```csharp
void Datalogics.PDFL.Library.ChangeWorkingSpaceGray(ColorProfile colorProfile)
```

**Parameters**

- `colorProfile` ([`ColorProfile`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/ColorProfile.md)): The Color Profile to be used.

**Returns:** `void`

Sets the current Gray working space to the specified ICC profile.

### ChangeWorkingSpaceGray

```csharp
void Datalogics.PDFL.Library.ChangeWorkingSpaceGray(string profilePath)
```

**Parameters**

- `profilePath` (`string`): The path on disk of the Color Profile to be used.

**Returns:** `void`

Sets the current Gray working space to the specified ICC profile.

### ChangeWorkingSpaceRGB

```csharp
void Datalogics.PDFL.Library.ChangeWorkingSpaceRGB(ColorProfile colorProfile)
```

**Parameters**

- `colorProfile` ([`ColorProfile`](https://docs.datalogics.com/apdfl18/DotNet/APDFL18.0.5PlusP2e/enum/ColorProfile.md)): The Color Profile to be used.

**Returns:** `void`

Sets the current RGB working space to the specified ICC profile.

### ChangeWorkingSpaceRGB

```csharp
void Datalogics.PDFL.Library.ChangeWorkingSpaceRGB(string profilePath)
```

**Parameters**

- `profilePath` (`string`): The path on disk of the Color Profile to be used.

**Returns:** `void`

Sets the current RGB working space to the specified ICC profile.

### Dispose

```csharp
void Datalogics.PDFL.Library.Dispose()
```

**Returns:** `void`

### EnableLicensedBehavior

```csharp
static bool Datalogics.PDFL.Library.EnableLicensedBehavior(string arg0)
```

*static*

**Parameters**

- `arg0` (`string`): A base64-encoded string containing the encrypted license key.

**Returns:** `bool`

true if the licensed behavior has been successfully enabled.

This is used to turn on licensed behaviors in DLE.

The function parameter is a base64-encoded string containing the encrypted licensed key.

### Initialized

```csharp
static bool Datalogics.PDFL.Library.Initialized()
```

*static*

**Returns:** `bool`

true if the PDF Library is initialized on this thread

Check to see if the library is initialized

### IsFormsExtensionAvailable

```csharp
bool Datalogics.PDFL.Library.IsFormsExtensionAvailable()
```

**Returns:** `bool`

true if the Forms Extension dependencies are present, and false if they are not.

Validate the Forms Extension dependencies are present. Indicates if all of the necessary dependencies are present for the Forms extension.

### Terminate

```csharp
void Datalogics.PDFL.Library.Terminate()
```

**Returns:** `void`

Terminate the library with regard to this handle. (Note that if there are other Library objects in this thread, they may keep the library initialized.
