Library PDFlibDylib;
{$LIBSUFFIX '.dylib'}

uses
  PDFlibWindows,
  PDFlibExtra,
  System.SyncObjs,
  PDFlibrary;
// {$R *.RES} // Resource file not available, create if needed

Type
  TPDFlibBuffer = Class
  Public
    Store: Array Of AnsiChar;
    StoreLength: Integer;
    StorePosition: Integer;
  End;

  TPDFlibInstance = Class
  Public
    PDFlibrary: TPDFlib;
    InstanceID: Integer;
    ReturnString: AnsiString;
    WideReturnString: WideString;
    Buffers: Array Of TPDFlibBuffer;
    AnsiMode: Integer;
    Function FindBuffer(Buffer: PAnsiChar): TPDFlibBuffer;
    Function ReleaseBuffer(Buffer: PAnsiChar): Boolean;
    Function GetString(Str: PAnsiChar): AnsiString;
    Function GetWideString(Str: PWideChar): WideString;
    Function GetWideStringFromAnsi(Str: PAnsiChar): WideString;
    Constructor Create;
    Destructor Destroy; Override;
  End;

Var
  InstanceList: Array Of TPDFlibInstance;
  CriticalSection: TCriticalSection;
  { TPDFlibInstance }

Constructor TPDFlibInstance.Create;
Begin
  PDFlibrary := TPDFlib.Create;
  InstanceID := Integer(PDFlibrary);
  ReturnString := '';
  WideReturnString := '';
  AnsiMode := 0;
  SetLength(Buffers, 0);
End;

Destructor TPDFlibInstance.Destroy;
Var
  X: Integer;
Begin
  For X := 0 To Length(Buffers) - 1 Do
    Buffers[X].Free;
  PDFlibrary.Free;
  Inherited;
End;

Function TPDFlibInstance.FindBuffer(Buffer: PAnsiChar): TPDFlibBuffer;
Var
  X: Integer;
Begin
  X := 0;
  Result := Nil;
  While (Not Assigned(Result)) And (X < Length(Buffers)) Do
    If @Buffers[X].Store = Buffer Then
      Result := Buffers[X]
    Else
      Inc(X);
End;

Function TPDFlibInstance.GetString(Str: PAnsiChar): AnsiString;
Var
  BufferObj: TPDFlibBuffer;
Begin
  BufferObj := FindBuffer(Str);
  If Assigned(BufferObj) Then
  Begin
    SetLength(Result, BufferObj.StoreLength);
    Move(BufferObj.Store[0], Result[1], BufferObj.StoreLength);
  End
  Else
    Result := Str;
End;

Function TPDFlibInstance.GetWideString(Str: PWideChar): WideString;
Var
  BufferObj: TPDFlibBuffer;
  L: Integer;
Begin
  BufferObj := FindBuffer(PAnsiChar(Str));
  If Assigned(BufferObj) Then
  Begin
    L := BufferObj.StoreLength;
    If L Mod 2 = 1 Then
      Dec(L);
    SetLength(Result, L Div 2);
    Move(BufferObj.Store[0], Result[1], L);
  End
  Else
    Result := Str;
End;

Function TPDFlibInstance.GetWideStringFromAnsi(Str: PAnsiChar): WideString;
Var
  A: AnsiString;
Begin
  A := GetString(Str);
  If (AnsiMode = 0) Then
  Begin
    Result := WideString(A);
  End
  Else If (AnsiMode = 1) Then
  Begin
    Result := PLUTF8Decode(A);
  End
  Else
  Begin
    Result := '';
  End;
End;

Function TPDFlibInstance.ReleaseBuffer(Buffer: PAnsiChar): Boolean;
Var
  X: Integer;
  I: Integer;
Begin
  Result := False;
  I := -1;
  X := 0;
  While (I < 0) And (X < Length(Buffers)) Do
    If @Buffers[X].Store = Buffer Then
      I := X
    Else
      Inc(X);
  If I >= 0 Then
  Begin
    Buffers[I].Free;
    For X := I To Length(Buffers) - 2 Do
      Buffers[X] := Buffers[X + 1];
    SetLength(Buffers, Length(Buffers) - 1);
  End;
End;

Function FindInstance(InstanceID: Integer; Var Index: Integer): Boolean;
Var
  X: Integer;
Begin
  Result := False;
  CriticalSection.Enter;
  Try
    If (InstanceID = 0) Then
    Begin
      If (Length(InstanceList) = 0) Then
      Begin
        SetLength(InstanceList, 1);
        InstanceList[0] := TPDFlibInstance.Create;
      End;
      Result := True;
      Index := 0;
    End;
    X := 1;
    While (Not Result) And (X < Length(InstanceList)) Do
    Begin
      If Assigned(InstanceList[X]) And (InstanceList[X].InstanceID = InstanceID) Then
      Begin
        Result := True;
        Index := X;
      End
      Else
        Inc(X);
    End;
  Finally
    CriticalSection.Leave;
  End;
End;

Function DLAddArcToPath(InstanceID: Integer; CenterX, CenterY, TotalAngle: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddArcToPath(CenterX, CenterY, TotalAngle);
  End
  Else
    Result := 0;
End;

Function DLAddBoxToPath(InstanceID: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddBoxToPath(Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLAddCJKFont(InstanceID, CJKFontID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddCJKFont(CJKFontID);
  End
  Else
    Result := 0;
End;

Function DLAddCurveToPath(InstanceID: Integer; CtAX, CtAY, CtBX, CtBY, EndX, EndY: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddCurveToPath(CtAX, CtAY, CtBX, CtBY, EndX, EndY);
  End
  Else
    Result := 0;
End;

Function DLAddEmbeddedFile(InstanceID: Integer; FileName, MIMEType: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddEmbeddedFile(InstanceList[I].GetWideString(FileName), InstanceList[I].GetWideString(MIMEType));
  End
  Else
    Result := 0;
End;

Function DLAddFileAttachment(InstanceID: Integer; Title: PWideChar; EmbeddedFileID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddFileAttachment(InstanceList[I].GetWideString(Title), EmbeddedFileID);
  End
  Else
    Result := 0;
End;

Function DLAddFormFieldChoiceSub(InstanceID, Index: Integer; SubName, DisplayName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddFormFieldChoiceSub(Index, InstanceList[I].GetWideString(SubName), InstanceList[I].GetWideString(DisplayName));
  End
  Else
    Result := 0;
End;

Function DLAddFormFieldSub(InstanceID, Index: Integer; SubName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddFormFieldSub(Index, InstanceList[I].GetWideString(SubName));
  End
  Else
    Result := 0;
End;

Function DLAddFormFont(InstanceID, FontID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddFormFont(FontID);
  End
  Else
    Result := 0;
End;

Function DLAddFreeTextAnnotation(InstanceID: Integer; Left, Top, Width, Height: Double; Text: PWideChar; Angle, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddFreeTextAnnotation(Left, Top, Width, Height, InstanceList[I].GetWideString(Text), Angle, Options);
  End
  Else
    Result := 0;
End;

Function DLAddFreeTextAnnotationEx(InstanceID: Integer; Left, Top, Width, Height: Double; Text: PWideChar; Angle, Options, Transparency: Integer)
  : Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddFreeTextAnnotationEx(Left, Top, Width, Height, InstanceList[I].GetWideString(Text), Angle, Options, Transparency);
  End
  Else
    Result := 0;
End;

Function DLAddGlobalJavaScript(InstanceID: Integer; PackageName, JavaScript: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddGlobalJavaScript(InstanceList[I].GetWideString(PackageName), InstanceList[I].GetWideString(JavaScript));
  End
  Else
    Result := 0;
End;

Function DLAddImageFromFile(InstanceID: Integer; FileName: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddImageFromFile(InstanceList[I].GetWideString(FileName), Options);
  End
  Else
    Result := 0;
End;

Function DLAddImageFromFileOffset(InstanceID: Integer; FileName: PWideChar; Offset, DataLength, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddImageFromFileOffset(InstanceList[I].GetWideString(FileName), Offset, DataLength, Options);
  End
  Else
    Result := 0;
End;

Function DLAddImageFromString(InstanceID: Integer; Source: PAnsiChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddImageFromString(InstanceList[I].GetString(Source), Options);
  End
  Else
    Result := 0;
End;

Function DLAddLGIDictToPage(InstanceID: Integer; DictContent: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLGIDictToPage(InstanceList[I].GetWideString(DictContent));
  End
  Else
    Result := 0;
End;

Function DLAddLineToPath(InstanceID: Integer; EndX, EndY: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLineToPath(EndX, EndY);
  End
  Else
    Result := 0;
End;

Function DLAddLinkToDestination(InstanceID: Integer; Left, Top, Width, Height: Double; DestID, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLinkToDestination(Left, Top, Width, Height, DestID, Options);
  End
  Else
    Result := 0;
End;

Function DLAddLinkToEmbeddedFile(InstanceID: Integer; Left, Top, Width, Height: Double; EmbeddedFileID: Integer; Title, Contents: PWideChar;
  IconType, Transpareny: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLinkToEmbeddedFile(Left, Top, Width, Height, EmbeddedFileID, InstanceList[I].GetWideString(Title),
      InstanceList[I].GetWideString(Contents), IconType, Transpareny);
  End
  Else
    Result := 0;
End;

Function DLAddLinkToFile(InstanceID: Integer; Left, Top, Width, Height: Double; FileName: PWideChar; Page: Integer; Position: Double;
  NewWindow, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLinkToFile(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName), Page, Position, NewWindow, Options);
  End
  Else
    Result := 0;
End;

Function DLAddLinkToFileDest(InstanceID: Integer; Left, Top, Width, Height: Double; FileName, NamedDest: PWideChar; Position: Double;
  NewWindow, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLinkToFileDest(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName),
      InstanceList[I].GetWideString(NamedDest), Position, NewWindow, Options);
  End
  Else
    Result := 0;
End;

Function DLAddLinkToFileEx(InstanceID: Integer; Left, Top, Width, Height: Double; FileName: PWideChar; DestPage, NewWindow, Options, Zoom, DestType: Integer;
  DestLeft, DestTop, DestRight, DestBottom: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLinkToFileEx(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName), DestPage, NewWindow, Options, Zoom,
      DestType, DestLeft, DestTop, DestRight, DestBottom);
  End
  Else
    Result := 0;
End;

Function DLAddLinkToJavaScript(InstanceID: Integer; Left, Top, Width, Height: Double; JavaScript: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLinkToJavaScript(Left, Top, Width, Height, InstanceList[I].GetWideString(JavaScript), Options);
  End
  Else
    Result := 0;
End;

Function DLAddLinkToLocalFile(InstanceID: Integer; Left, Top, Width, Height: Double; FileName: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLinkToLocalFile(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName), Options);
  End
  Else
    Result := 0;
End;

Function DLAddLinkToPage(InstanceID: Integer; Left, Top, Width, Height: Double; Page: Integer; Position: Double; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLinkToPage(Left, Top, Width, Height, Page, Position, Options);
  End
  Else
    Result := 0;
End;

Function DLAddLinkToWeb(InstanceID: Integer; Left, Top, Width, Height: Double; Link: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddLinkToWeb(Left, Top, Width, Height, InstanceList[I].GetWideString(Link), Options);
  End
  Else
    Result := 0;
End;

Function DLAddNoteAnnotation(InstanceID: Integer; Left, Top: Double; AnnotType: Integer; PopupLeft, PopupTop, PopupWidth, PopupHeight: Double;
  Title, Contents: PWideChar; Red, Green, Blue: Double; Open: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddNoteAnnotation(Left, Top, AnnotType, PopupLeft, PopupTop, PopupWidth, PopupHeight,
      InstanceList[I].GetWideString(Title), InstanceList[I].GetWideString(Contents), Red, Green, Blue, Open);
  End
  Else
    Result := 0;
End;

Function DLAddOpenTypeFontFromFile(InstanceID: Integer; FileName: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddOpenTypeFontFromFile(InstanceList[I].GetWideString(FileName), Options);
  End
  Else
    Result := 0;
End;

Function DLAddPageLabels(InstanceID, Start, Style, Offset: Integer; Prefix: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddPageLabels(Start, Style, Offset, InstanceList[I].GetWideString(Prefix));
  End
  Else
    Result := 0;
End;

Function DLAddPageMatrix(InstanceID: Integer; xscale, yscale, xoffset, yoffset: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddPageMatrix(xscale, yscale, xoffset, yoffset);
  End
  Else
    Result := 0;
End;

Function DLAddRelativeLinkToFile(InstanceID: Integer; Left, Top, Width, Height: Double; FileName: PWideChar; Page: Integer; Position: Double;
  NewWindow, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddRelativeLinkToFile(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName), Page, Position,
      NewWindow, Options);
  End
  Else
    Result := 0;
End;

Function DLAddRelativeLinkToFileDest(InstanceID: Integer; Left, Top, Width, Height: Double; FileName, NamedDest: PWideChar; Position: Double;
  NewWindow, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddRelativeLinkToFileDest(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName),
      InstanceList[I].GetWideString(NamedDest), Position, NewWindow, Options);
  End
  Else
    Result := 0;
End;

Function DLAddRelativeLinkToFileEx(InstanceID: Integer; Left, Top, Width, Height: Double; FileName: PWideChar;
  DestPage, NewWindow, Options, Zoom, DestType: Integer; DestLeft, DestTop, DestRight, DestBottom: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddRelativeLinkToFileEx(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName), DestPage, NewWindow,
      Options, Zoom, DestType, DestLeft, DestTop, DestRight, DestBottom);
  End
  Else
    Result := 0;
End;

Function DLAddRelativeLinkToLocalFile(InstanceID: Integer; Left, Top, Width, Height: Double; FileName: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddRelativeLinkToLocalFile(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName), Options);
  End
  Else
    Result := 0;
End;

Function DLAddSVGAnnotationFromFile(InstanceID: Integer; Left, Top, Width, Height: Double; FileName: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddSVGAnnotationFromFile(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName), Options);
  End
  Else
    Result := 0;
End;

Function DLAddSWFAnnotationFromFile(InstanceID: Integer; Left, Top, Width, Height: Double; FileName, Title: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddSWFAnnotationFromFile(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName),
      InstanceList[I].GetWideString(Title), Options);
  End
  Else
    Result := 0;
End;

Function DLAddSeparationColor(InstanceID: Integer; ColorName: PWideChar; C, M, Y, K: Double; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddSeparationColor(InstanceList[I].GetWideString(ColorName), C, M, Y, K, Options);
  End
  Else
    Result := 0;
End;

Function DLAddStampAnnotation(InstanceID: Integer; Left, Top, Width, Height: Double; StampType: Integer; Title, Contents: PWideChar; Red, Green, Blue: Double;
  Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddStampAnnotation(Left, Top, Width, Height, StampType, InstanceList[I].GetWideString(Title),
      InstanceList[I].GetWideString(Contents), Red, Green, Blue, Options);
  End
  Else
    Result := 0;
End;

Function DLAddStampAnnotationFromImage(InstanceID: Integer; Left, Top, Width, Height: Double; FileName, Title, Contents: PWideChar; Red, Green, Blue: Double;
  Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddStampAnnotationFromImage(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName),
      InstanceList[I].GetWideString(Title), InstanceList[I].GetWideString(Contents), Red, Green, Blue, Options);
  End
  Else
    Result := 0;
End;

Function DLAddStampAnnotationFromImageID(InstanceID: Integer; Left, Top, Width, Height: Double; ImageID: Integer; Title, Contents: PWideChar;
  Red, Green, Blue: Double; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddStampAnnotationFromImageID(Left, Top, Width, Height, ImageID, InstanceList[I].GetWideString(Title),
      InstanceList[I].GetWideString(Contents), Red, Green, Blue, Options);
  End
  Else
    Result := 0;
End;

Function DLAddStandardFont(InstanceID, StandardFontID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddStandardFont(StandardFontID);
  End
  Else
    Result := 0;
End;

Function DLAddSubsettedFont(InstanceID: Integer; FontName: PWideChar; CharsetIndex: Integer; SubsetChars: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddSubsettedFont(InstanceList[I].GetWideString(FontName), CharsetIndex, InstanceList[I].GetWideString(SubsetChars));
  End
  Else
    Result := 0;
End;

Function DLAddTextMarkupAnnotation(InstanceID, MarkupType: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddTextMarkupAnnotation(MarkupType, Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLAddToBuffer(InstanceID: Integer; Buffer, Source: PAnsiChar; SourceLength: Integer): Integer; Cdecl;
Var
  I: Integer;
  BufferObj: TPDFlibBuffer;
Begin
  Result := 0;
  If FindInstance(InstanceID, I) Then
  Begin
    BufferObj := InstanceList[I].FindBuffer(Buffer);
    If Assigned(BufferObj) Then
    Begin
      If SourceLength > (BufferObj.StoreLength - BufferObj.StorePosition) Then
        SourceLength := BufferObj.StoreLength - BufferObj.StorePosition;
      If SourceLength > 0 Then
      Begin
        Move(Source^, BufferObj.Store[BufferObj.StorePosition], SourceLength);
        Inc(BufferObj.StorePosition, SourceLength);
        Result := BufferObj.StoreLength - BufferObj.StorePosition;
      End;
    End;
  End;
End;

Function DLAddToFileList(InstanceID: Integer; ListName, FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddToFileList(InstanceList[I].GetWideString(ListName), InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLAddTrueTypeFont(InstanceID: Integer; FontName: PWideChar; Embed: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddTrueTypeFont(InstanceList[I].GetWideString(FontName), Embed);
  End
  Else
    Result := 0;
End;

Function DLAddTrueTypeFontFromFile(InstanceID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddTrueTypeFontFromFile(InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLAddTrueTypeSubsettedFont(InstanceID: Integer; FontName, SubsetChars: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddTrueTypeSubsettedFont(InstanceList[I].GetWideString(FontName), InstanceList[I].GetWideString(SubsetChars), Options);
  End
  Else
    Result := 0;
End;

Function DLAddType1Font(InstanceID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddType1Font(InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLAddU3DAnnotationFromFile(InstanceID: Integer; Left, Top, Width, Height: Double; FileName: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AddU3DAnnotationFromFile(Left, Top, Width, Height, InstanceList[I].GetWideString(FileName), Options);
  End
  Else
    Result := 0;
End;

Function DLAnalyseFile(InstanceID: Integer; InputFileName, Password: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AnalyseFile(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(Password));
  End
  Else
    Result := 0;
End;

Function DLAnnotationCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AnnotationCount;
  End
  Else
    Result := 0;
End;

Function DLAnsiStringResultLength(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := Length(InstanceList[I].ReturnString);
  End
  Else
    Result := 0;
End;

Function DLAppendSpace(InstanceID: Integer; RelativeSpace: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AppendSpace(RelativeSpace);
  End
  Else
    Result := 0;
End;

Function DLAppendTableColumns(InstanceID, TableID, NewColumnCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AppendTableColumns(TableID, NewColumnCount);
  End
  Else
    Result := 0;
End;

Function DLAppendTableRows(InstanceID, TableID, NewRowCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AppendTableRows(TableID, NewRowCount);
  End
  Else
    Result := 0;
End;

Function DLAppendText(InstanceID: Integer; Text: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AppendText(InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLAppendToFile(InstanceID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AppendToFile(InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLAppendToString(InstanceID, AppendMode: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.AppendToString(AppendMode);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLApplyStyle(InstanceID: Integer; StyleName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ApplyStyle(InstanceList[I].GetWideString(StyleName));
  End
  Else
    Result := 0;
End;

Function DLAttachAnnotToForm(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.AttachAnnotToForm(Index);
  End
  Else
    Result := 0;
End;

Function DLBalanceContentStream(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.BalanceContentStream;
  End
  Else
    Result := 0;
End;

Function DLBalancePageTree(InstanceID, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.BalancePageTree(Options);
  End
  Else
    Result := 0;
End;

Function DLBeginPageUpdate(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.BeginPageUpdate;
  End
  Else
    Result := 0;
End;

Function DLCapturePage(InstanceID, Page: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CapturePage(Page);
  End
  Else
    Result := 0;
End;

Function DLCapturePageEx(InstanceID, Page, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CapturePageEx(Page, Options);
  End
  Else
    Result := 0;
End;

Function DLCharWidth(InstanceID, CharCode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CharWidth(CharCode);
  End
  Else
    Result := 0;
End;

Function DLCheckFileCompliance(InstanceID: Integer; InputFileName, Password: PWideChar; ComplianceTest, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CheckFileCompliance(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(Password),
      ComplianceTest, Options);
  End
  Else
    Result := 0;
End;

Function DLCheckObjects(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CheckObjects;
  End
  Else
    Result := 0;
End;

Function DLCheckPageAnnots(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CheckPageAnnots;
  End
  Else
    Result := 0;
End;

Function DLCheckPassword(InstanceID: Integer; Password: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CheckPassword(InstanceList[I].GetWideString(Password));
  End
  Else
    Result := 0;
End;

Function DLClearFileList(InstanceID: Integer; ListName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ClearFileList(InstanceList[I].GetWideString(ListName));
  End
  Else
    Result := 0;
End;

Function DLClearImage(InstanceID, ImageID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ClearImage(ImageID);
  End
  Else
    Result := 0;
End;

Function DLClearPageLabels(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ClearPageLabels;
  End
  Else
    Result := 0;
End;

Function DLClearTextFormatting(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ClearTextFormatting;
  End
  Else
    Result := 0;
End;

Function DLCloneOutlineAction(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CloneOutlineAction(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLClonePages(InstanceID, StartPage, EndPage, RepeatCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ClonePages(StartPage, EndPage, RepeatCount);
  End
  Else
    Result := 0;
End;

Function DLCloseOutline(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CloseOutline(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLClosePath(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ClosePath;
  End
  Else
    Result := 0;
End;

Function DLCombineContentStreams(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CombineContentStreams;
  End
  Else
    Result := 0;
End;

Function DLCompareOutlines(InstanceID, FirstOutlineID, SecondOutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CompareOutlines(FirstOutlineID, SecondOutlineID);
  End
  Else
    Result := 0;
End;

Function DLCompressContent(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CompressContent;
  End
  Else
    Result := 0;
End;

Function DLCompressFonts(InstanceID, Compress: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CompressFonts(Compress);
  End
  Else
    Result := 0;
End;

Function DLCompressImages(InstanceID, Compress: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CompressImages(Compress);
  End
  Else
    Result := 0;
End;

Function DLCompressPage(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CompressPage;
  End
  Else
    Result := 0;
End;

Function DLContentStreamCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ContentStreamCount;
  End
  Else
    Result := 0;
End;

Function DLContentStreamSafe(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ContentStreamSafe;
  End
  Else
    Result := 0;
End;

Function DLCopyPageRanges(InstanceID, DocumentID: Integer; RangeList: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CopyPageRanges(DocumentID, InstanceList[I].GetWideString(RangeList));
  End
  Else
    Result := 0;
End;

Function DLCopyPageRangesEx(InstanceID, DocumentID: Integer; RangeList: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CopyPageRangesEx(DocumentID, InstanceList[I].GetWideString(RangeList), Options);
  End
  Else
    Result := 0;
End;

Function DLCreateBuffer(InstanceID, BufferLength: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
  L: Integer;
  Buffer: TPDFlibBuffer;
Begin
  If (BufferLength > 0) And FindInstance(InstanceID, I) Then
  Begin
    L := Length(InstanceList[I].Buffers);
    SetLength(InstanceList[I].Buffers, L + 1);
    Buffer := TPDFlibBuffer.Create;
    InstanceList[I].Buffers[L] := Buffer;
    SetLength(Buffer.Store, BufferLength);
    Result := @Buffer.Store;
    Buffer.StoreLength := BufferLength;
    Buffer.StorePosition := 0;
  End
  Else
    Result := Nil;
End;

Function DLCreateLibrary: Integer; Cdecl;
Var
  X: Integer;
  I: Integer;
  L: Integer;
Begin
  CriticalSection.Enter;
  Try
    If (Length(InstanceList) = 0) Then
    Begin
      SetLength(InstanceList, 1);
      InstanceList[0] := TPDFlibInstance.Create;
    End;
    L := Length(InstanceList);
    I := -1;
    X := 0;
    While (I < 0) And (X < L) Do
      If Not Assigned(InstanceList[X]) Then
        I := X
      Else
        Inc(X);
    If I < 0 Then
    Begin
      SetLength(InstanceList, L + 1);
      I := L;
    End;
    InstanceList[I] := TPDFlibInstance.Create;
    Result := InstanceList[I].InstanceID;
  Finally
    CriticalSection.Leave;
  End;
End;

Function DLCreateNewObject(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CreateNewObject;
  End
  Else
    Result := 0;
End;

Function DLCreateTable(InstanceID, RowCount, ColumnCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.CreateTable(RowCount, ColumnCount);
  End
  Else
    Result := 0;
End;

Function DLDAAppendFile(InstanceID, FileHandle: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAAppendFile(FileHandle);
  End
  Else
    Result := 0;
End;

Function DLDACapturePage(InstanceID, FileHandle, PageRef: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DACapturePage(FileHandle, PageRef);
  End
  Else
    Result := 0;
End;

Function DLDACapturePageEx(InstanceID, FileHandle, PageRef, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DACapturePageEx(FileHandle, PageRef, Options);
  End
  Else
    Result := 0;
End;

Function DLDACloseFile(InstanceID, FileHandle: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DACloseFile(FileHandle);
  End
  Else
    Result := 0;
End;

Function DLDADrawCapturedPage(InstanceID, FileHandle, DACaptureID, DestPageRef: Integer; PntLeft, PntBottom, PntWidth, PntHeight: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DADrawCapturedPage(FileHandle, DACaptureID, DestPageRef, PntLeft, PntBottom, PntWidth, PntHeight);
  End
  Else
    Result := 0;
End;

Function DLDADrawRotatedCapturedPage(InstanceID, FileHandle, DACaptureID, DestPageRef: Integer; PntLeft, PntBottom, PntWidth, PntHeight, Angle: Double)
  : Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DADrawRotatedCapturedPage(FileHandle, DACaptureID, DestPageRef, PntLeft, PntBottom, PntWidth, PntHeight, Angle);
  End
  Else
    Result := 0;
End;

Function DLDAEmbedFileStreams(InstanceID, FileHandle: Integer; RootPath: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAEmbedFileStreams(FileHandle, InstanceList[I].GetWideString(RootPath));
  End
  Else
    Result := 0;
End;

Function DLDAExtractPageText(InstanceID, FileHandle, PageRef, Options: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.DAExtractPageText(FileHandle, PageRef, Options);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAExtractPageTextBlocks(InstanceID, FileHandle, PageRef, ExtractOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAExtractPageTextBlocks(FileHandle, PageRef, ExtractOptions);
  End
  Else
    Result := 0;
End;

Function DLDAFindPage(InstanceID, FileHandle, Page: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAFindPage(FileHandle, Page);
  End
  Else
    Result := 0;
End;

Function DLDAGetAnnotationCount(InstanceID, FileHandle, PageRef: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetAnnotationCount(FileHandle, PageRef);
  End
  Else
    Result := 0;
End;

Function DLDAGetFormFieldCount(InstanceID, FileHandle: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetFormFieldCount(FileHandle);
  End
  Else
    Result := 0;
End;

Function DLDAGetFormFieldTitle(InstanceID, FileHandle, FieldIndex: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.DAGetFormFieldTitle(FileHandle, FieldIndex);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAGetFormFieldValue(InstanceID, FileHandle, FieldIndex: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.DAGetFormFieldValue(FileHandle, FieldIndex);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAGetImageDataToString(InstanceID, FileHandle, ImageListID, ImageIndex: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.DAGetImageDataToString(FileHandle, ImageListID, ImageIndex);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAGetImageDblProperty(InstanceID, FileHandle, ImageListID, ImageIndex, PropertyID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetImageDblProperty(FileHandle, ImageListID, ImageIndex, PropertyID);
  End
  Else
    Result := 0;
End;

Function DLDAGetImageIntProperty(InstanceID, FileHandle, ImageListID, ImageIndex, PropertyID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetImageIntProperty(FileHandle, ImageListID, ImageIndex, PropertyID);
  End
  Else
    Result := 0;
End;

Function DLDAGetImageListCount(InstanceID, FileHandle, ImageListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetImageListCount(FileHandle, ImageListID);
  End
  Else
    Result := 0;
End;

Function DLDAGetInformation(InstanceID, FileHandle: Integer; Key: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.DAGetInformation(FileHandle, InstanceList[I].GetWideString(Key));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAGetObjectCount(InstanceID, FileHandle: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetObjectCount(FileHandle);
  End
  Else
    Result := 0;
End;

Function DLDAGetObjectToString(InstanceID, FileHandle, ObjectNumber: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.DAGetObjectToString(FileHandle, ObjectNumber);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAGetPageBox(InstanceID, FileHandle, PageRef, BoxIndex, Dimension: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetPageBox(FileHandle, PageRef, BoxIndex, Dimension);
  End
  Else
    Result := 0;
End;

Function DLDAGetPageContentToString(InstanceID, FileHandle, PageRef: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.DAGetPageContentToString(FileHandle, PageRef);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAGetPageCount(InstanceID, FileHandle: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetPageCount(FileHandle);
  End
  Else
    Result := 0;
End;

Function DLDAGetPageHeight(InstanceID, FileHandle, PageRef: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetPageHeight(FileHandle, PageRef);
  End
  Else
    Result := 0;
End;

Function DLDAGetPageImageList(InstanceID, FileHandle, PageRef: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetPageImageList(FileHandle, PageRef);
  End
  Else
    Result := 0;
End;

Function DLDAGetPageWidth(InstanceID, FileHandle, PageRef: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetPageWidth(FileHandle, PageRef);
  End
  Else
    Result := 0;
End;

Function DLDAGetTextBlockAsString(InstanceID, TextBlockListID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.DAGetTextBlockAsString(TextBlockListID, Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAGetTextBlockBound(InstanceID, TextBlockListID, Index, BoundIndex: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetTextBlockBound(TextBlockListID, Index, BoundIndex);
  End
  Else
    Result := 0;
End;

Function DLDAGetTextBlockCharWidth(InstanceID, TextBlockListID, Index, CharIndex: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetTextBlockCharWidth(TextBlockListID, Index, CharIndex);
  End
  Else
    Result := 0;
End;

Function DLDAGetTextBlockColor(InstanceID, TextBlockListID, Index, ColorComponent: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetTextBlockColor(TextBlockListID, Index, ColorComponent);
  End
  Else
    Result := 0;
End;

Function DLDAGetTextBlockColorType(InstanceID, TextBlockListID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetTextBlockColorType(TextBlockListID, Index);
  End
  Else
    Result := 0;
End;

Function DLDAGetTextBlockCount(InstanceID, TextBlockListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetTextBlockCount(TextBlockListID);
  End
  Else
    Result := 0;
End;

Function DLDAGetTextBlockFontName(InstanceID, TextBlockListID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.DAGetTextBlockFontName(TextBlockListID, Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAGetTextBlockFontSize(InstanceID, TextBlockListID, Index: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAGetTextBlockFontSize(TextBlockListID, Index);
  End
  Else
    Result := 0;
End;

Function DLDAGetTextBlockText(InstanceID, TextBlockListID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.DAGetTextBlockText(TextBlockListID, Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDAHasPageBox(InstanceID, FileHandle, PageRef, BoxIndex: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAHasPageBox(FileHandle, PageRef, BoxIndex);
  End
  Else
    Result := 0;
End;

Function DLDAHidePage(InstanceID, FileHandle, PageRef: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAHidePage(FileHandle, PageRef);
  End
  Else
    Result := 0;
End;

Function DLDAMovePage(InstanceID, FileHandle, PageRef, TargetPageRef, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAMovePage(FileHandle, PageRef, TargetPageRef, Options);
  End
  Else
    Result := 0;
End;

Function DLDANewPage(InstanceID, FileHandle: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DANewPage(FileHandle);
  End
  Else
    Result := 0;
End;

Function DLDANewPages(InstanceID, FileHandle, PageCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DANewPages(FileHandle, PageCount);
  End
  Else
    Result := 0;
End;

Function DLDANormalizePage(InstanceID, FileHandle, PageRef, NormalizeOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DANormalizePage(FileHandle, PageRef, NormalizeOptions);
  End
  Else
    Result := 0;
End;

Function DLDAOpenFile(InstanceID: Integer; InputFileName, Password: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAOpenFile(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(Password));
  End
  Else
    Result := 0;
End;

Function DLDAOpenFileReadOnly(InstanceID: Integer; InputFileName, Password: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAOpenFileReadOnly(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(Password));
  End
  Else
    Result := 0;
End;

Function DLDAPageRotation(InstanceID, FileHandle, PageRef: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAPageRotation(FileHandle, PageRef);
  End
  Else
    Result := 0;
End;

Function DLDAReleaseImageList(InstanceID, FileHandle, ImageListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAReleaseImageList(FileHandle, ImageListID);
  End
  Else
    Result := 0;
End;

Function DLDAReleaseTextBlocks(InstanceID, TextBlockListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAReleaseTextBlocks(TextBlockListID);
  End
  Else
    Result := 0;
End;

Function DLDARemoveUsageRights(InstanceID, FileHandle: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DARemoveUsageRights(FileHandle);
  End
  Else
    Result := 0;
End;

Function DLDARenderPageToDC(InstanceID, FileHandle, PageRef: Integer; DPI: Double; DC: HDC): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DARenderPageToDC(FileHandle, PageRef, DPI, DC);
  End
  Else
    Result := 0;
End;

Function DLDARenderPageToFile(InstanceID, FileHandle, PageRef, Options: Integer; DPI: Double; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DARenderPageToFile(FileHandle, PageRef, Options, DPI, InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLDARenderPageToString(InstanceID, FileHandle, PageRef, Options: Integer; DPI: Double): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.DARenderPageToString(FileHandle, PageRef, Options, DPI);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDARotatePage(InstanceID, FileHandle, PageRef, Angle, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DARotatePage(FileHandle, PageRef, Angle, Options);
  End
  Else
    Result := 0;
End;

Function DLDASaveAsFile(InstanceID, FileHandle: Integer; OutputFileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASaveAsFile(FileHandle, InstanceList[I].GetWideString(OutputFileName));
  End
  Else
    Result := 0;
End;

Function DLDASaveImageDataToFile(InstanceID, FileHandle, ImageListID, ImageIndex: Integer; ImageFileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASaveImageDataToFile(FileHandle, ImageListID, ImageIndex, InstanceList[I].GetWideString(ImageFileName));
  End
  Else
    Result := 0;
End;

Function DLDASetInformation(InstanceID, FileHandle: Integer; Key, NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASetInformation(FileHandle, InstanceList[I].GetWideString(Key), InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLDASetPageBox(InstanceID, FileHandle, PageRef, BoxIndex: Integer; X1, Y1, X2, Y2: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASetPageBox(FileHandle, PageRef, BoxIndex, X1, Y1, X2, Y2);
  End
  Else
    Result := 0;
End;

Function DLDASetPageLayout(InstanceID, FileHandle, NewPageLayout: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASetPageLayout(FileHandle, NewPageLayout);
  End
  Else
    Result := 0;
End;

Function DLDASetPageMode(InstanceID, FileHandle, NewPageMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASetPageMode(FileHandle, NewPageMode);
  End
  Else
    Result := 0;
End;

Function DLDASetPageSize(InstanceID, FileHandle, PageRef: Integer; PntWidth, PntHeight: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASetPageSize(FileHandle, PageRef, PntWidth, PntHeight);
  End
  Else
    Result := 0;
End;

Function DLDASetTextExtractionArea(InstanceID: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASetTextExtractionArea(Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLDASetTextExtractionOptions(InstanceID, OptionID, NewValue: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASetTextExtractionOptions(OptionID, NewValue);
  End
  Else
    Result := 0;
End;

Function DLDASetTextExtractionScaling(InstanceID, Options: Integer; Horizontal, Vertical: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASetTextExtractionScaling(Options, Horizontal, Vertical);
  End
  Else
    Result := 0;
End;

Function DLDASetTextExtractionWordGap(InstanceID: Integer; NewWordGap: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DASetTextExtractionWordGap(NewWordGap);
  End
  Else
    Result := 0;
End;

Function DLDAShiftedHeader(InstanceID, FileHandle: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DAShiftedHeader(FileHandle);
  End
  Else
    Result := 0;
End;

Function DLDecrypt(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.Decrypt;
  End
  Else
    Result := 0;
End;

Function DLDecryptFile(InstanceID: Integer; InputFileName, OutputFileName, Password: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DecryptFile(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(OutputFileName),
      InstanceList[I].GetWideString(Password));
  End
  Else
    Result := 0;
End;

Function DLDeleteAnalysis(InstanceID, AnalysisID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DeleteAnalysis(AnalysisID);
  End
  Else
    Result := 0;
End;

Function DLDeleteAnnotation(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DeleteAnnotation(Index);
  End
  Else
    Result := 0;
End;

Function DLDeleteContentStream(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DeleteContentStream;
  End
  Else
    Result := 0;
End;

Function DLDeleteFormField(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DeleteFormField(Index);
  End
  Else
    Result := 0;
End;

Function DLDeleteOptionalContentGroup(InstanceID, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DeleteOptionalContentGroup(OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLDeletePageLGIDict(InstanceID, DictIndex: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DeletePageLGIDict(DictIndex);
  End
  Else
    Result := 0;
End;

Function DLDeletePages(InstanceID, StartPage, PageCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DeletePages(StartPage, PageCount);
  End
  Else
    Result := 0;
End;

Function DLDocJavaScriptAction(InstanceID: Integer; ActionType, JavaScript: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DocJavaScriptAction(InstanceList[I].GetWideString(ActionType), InstanceList[I].GetWideString(JavaScript));
  End
  Else
    Result := 0;
End;

Function DLDocumentCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DocumentCount;
  End
  Else
    Result := 0;
End;

Function DLDrawArc(InstanceID: Integer; XPos, YPos, Radius, StartAngle, EndAngle: Double; Pie, DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawArc(XPos, YPos, Radius, StartAngle, EndAngle, Pie, DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawBarcode(InstanceID: Integer; Left, Top, Width, Height: Double; Text: PWideChar; Barcode, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawBarcode(Left, Top, Width, Height, InstanceList[I].GetWideString(Text), Barcode, Options);
  End
  Else
    Result := 0;
End;

Function DLDrawBox(InstanceID: Integer; Left, Top, Width, Height: Double; DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawBox(Left, Top, Width, Height, DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawCapturedPage(InstanceID, CaptureID: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawCapturedPage(CaptureID, Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLDrawCapturedPageMatrix(InstanceID, CaptureID: Integer; M11, M12, M21, M22, MDX, MDY: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawCapturedPageMatrix(CaptureID, M11, M12, M21, M22, MDX, MDY);
  End
  Else
    Result := 0;
End;

Function DLDrawCircle(InstanceID: Integer; XPos, YPos, Radius: Double; DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawCircle(XPos, YPos, Radius, DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawDataMatrixSymbol(InstanceID: Integer; Left, Top, ModuleSize: Double; Text: PWideChar; Encoding, SymbolSize, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawDataMatrixSymbol(Left, Top, ModuleSize, InstanceList[I].GetWideString(Text), Encoding, SymbolSize, Options);
  End
  Else
    Result := 0;
End;

Function DLDrawEllipse(InstanceID: Integer; XPos, YPos, Width, Height: Double; DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawEllipse(XPos, YPos, Width, Height, DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawEllipticArc(InstanceID: Integer; XPos, YPos, Width, Height, StartAngle, EndAngle: Double; Pie, DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawEllipticArc(XPos, YPos, Width, Height, StartAngle, EndAngle, Pie, DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawHTMLText(InstanceID: Integer; Left, Top, Width: Double; HTMLText: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawHTMLText(Left, Top, Width, InstanceList[I].GetWideString(HTMLText));
  End
  Else
    Result := 0;
End;

Function DLDrawHTMLTextBox(InstanceID: Integer; Left, Top, Width, Height: Double; HTMLText: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.DrawHTMLTextBox(Left, Top, Width, Height, InstanceList[I].GetWideString(HTMLText));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDrawHTMLTextBoxMatrix(InstanceID: Integer; Width, Height: Double; HTMLText: PWideChar; M11, M12, M21, M22, MDX, MDY: Double): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.DrawHTMLTextBoxMatrix(Width, Height, InstanceList[I].GetWideString(HTMLText), M11, M12, M21,
      M22, MDX, MDY);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLDrawHTMLTextMatrix(InstanceID: Integer; Width: Double; HTMLText: PWideChar; M11, M12, M21, M22, MDX, MDY: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawHTMLTextMatrix(Width, InstanceList[I].GetWideString(HTMLText), M11, M12, M21, M22, MDX, MDY);
  End
  Else
    Result := 0;
End;

Function DLDrawImage(InstanceID: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawImage(Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLDrawImageMatrix(InstanceID: Integer; M11, M12, M21, M22, MDX, MDY: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawImageMatrix(M11, M12, M21, M22, MDX, MDY);
  End
  Else
    Result := 0;
End;

Function DLDrawIntelligentMailBarcode(InstanceID: Integer; Left, Top, BarWidth, FullBarHeight, TrackerHeight, SpaceWidth: Double; BarcodeData: PWideChar;
  Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawIntelligentMailBarcode(Left, Top, BarWidth, FullBarHeight, TrackerHeight, SpaceWidth,
      InstanceList[I].GetWideString(BarcodeData), Options);
  End
  Else
    Result := 0;
End;

Function DLDrawLine(InstanceID: Integer; StartX, StartY, EndX, EndY: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawLine(StartX, StartY, EndX, EndY);
  End
  Else
    Result := 0;
End;

Function DLDrawMultiLineText(InstanceID: Integer; XPos, YPos: Double; Delimiter, Text: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawMultiLineText(XPos, YPos, InstanceList[I].GetWideString(Delimiter), InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLDrawPDF417Symbol(InstanceID: Integer; Left, Top: Double; Text: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawPDF417Symbol(Left, Top, InstanceList[I].GetWideString(Text), Options);
  End
  Else
    Result := 0;
End;

Function DLDrawPDF417SymbolEx(InstanceID: Integer; Left, Top: Double; Text: PWideChar; Options, FixedColumns, FixedRows, ErrorLevel: Integer;
  ModuleSize, HeightWidthRatio: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawPDF417SymbolEx(Left, Top, InstanceList[I].GetWideString(Text), Options, FixedColumns, FixedRows, ErrorLevel,
      ModuleSize, HeightWidthRatio);
  End
  Else
    Result := 0;
End;

Function DLDrawPath(InstanceID, PathOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawPath(PathOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawPathEvenOdd(InstanceID, PathOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawPathEvenOdd(PathOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawPostScriptXObject(InstanceID, PSRef: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawPostScriptXObject(PSRef);
  End
  Else
    Result := 0;
End;

Function DLDrawQRCode(InstanceID: Integer; Left, Top, SymbolSize: Double; Text: PWideChar; EncodeOptions, DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawQRCode(Left, Top, SymbolSize, InstanceList[I].GetWideString(Text), EncodeOptions, DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawRotatedBox(InstanceID: Integer; Left, Bottom, Width, Height, Angle: Double; DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawRotatedBox(Left, Bottom, Width, Height, Angle, DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawRotatedCapturedPage(InstanceID, CaptureID: Integer; Left, Bottom, Width, Height, Angle: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawRotatedCapturedPage(CaptureID, Left, Bottom, Width, Height, Angle);
  End
  Else
    Result := 0;
End;

Function DLDrawRotatedImage(InstanceID: Integer; Left, Bottom, Width, Height, Angle: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawRotatedImage(Left, Bottom, Width, Height, Angle);
  End
  Else
    Result := 0;
End;

Function DLDrawRotatedMultiLineText(InstanceID: Integer; XPos, YPos, Angle: Double; Delimiter, Text: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawRotatedMultiLineText(XPos, YPos, Angle, InstanceList[I].GetWideString(Delimiter),
      InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLDrawRotatedText(InstanceID: Integer; XPos, YPos, Angle: Double; Text: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawRotatedText(XPos, YPos, Angle, InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLDrawRotatedTextBox(InstanceID: Integer; Left, Top, Width, Height, Angle: Double; Text: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawRotatedTextBox(Left, Top, Width, Height, Angle, InstanceList[I].GetWideString(Text), Options);
  End
  Else
    Result := 0;
End;

Function DLDrawRotatedTextBoxEx(InstanceID: Integer; Left, Top, Width, Height, Angle: Double; Text: PWideChar; Options, Border, Radius, DrawOptions: Integer)
  : Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawRotatedTextBoxEx(Left, Top, Width, Height, Angle, InstanceList[I].GetWideString(Text), Options, Border, Radius,
      DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawRoundedBox(InstanceID: Integer; Left, Top, Width, Height, Radius: Double; DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawRoundedBox(Left, Top, Width, Height, Radius, DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawRoundedRotatedBox(InstanceID: Integer; Left, Bottom, Width, Height, Radius, Angle: Double; DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawRoundedRotatedBox(Left, Bottom, Width, Height, Radius, Angle, DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawScaledImage(InstanceID: Integer; Left, Top, Scale: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawScaledImage(Left, Top, Scale);
  End
  Else
    Result := 0;
End;

Function DLDrawSpacedText(InstanceID: Integer; XPos, YPos, Spacing: Double; Text: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawSpacedText(XPos, YPos, Spacing, InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLDrawTableRows(InstanceID, TableID: Integer; Left, Top, Height: Double; FirstRow, LastRow: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawTableRows(TableID, Left, Top, Height, FirstRow, LastRow);
  End
  Else
    Result := 0;
End;

Function DLDrawText(InstanceID: Integer; XPos, YPos: Double; Text: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawText(XPos, YPos, InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLDrawTextArc(InstanceID: Integer; XPos, YPos, Radius, Angle: Double; Text: PWideChar; DrawOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawTextArc(XPos, YPos, Radius, Angle, InstanceList[I].GetWideString(Text), DrawOptions);
  End
  Else
    Result := 0;
End;

Function DLDrawTextBox(InstanceID: Integer; Left, Top, Width, Height: Double; Text: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawTextBox(Left, Top, Width, Height, InstanceList[I].GetWideString(Text), Options);
  End
  Else
    Result := 0;
End;

Function DLDrawTextBoxMatrix(InstanceID: Integer; Width, Height: Double; Text: PWideChar; Options: Integer; M11, M12, M21, M22, MDX, MDY: Double)
  : Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawTextBoxMatrix(Width, Height, InstanceList[I].GetWideString(Text), Options, M11, M12, M21, M22, MDX, MDY);
  End
  Else
    Result := 0;
End;

Function DLDrawWrappedText(InstanceID: Integer; XPos, YPos, Width: Double; Text: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.DrawWrappedText(XPos, YPos, Width, InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLEditableContentStream(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EditableContentStream;
  End
  Else
    Result := 0;
End;

Function DLEmbedFile(InstanceID: Integer; Title, FileName, MIMEType: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EmbedFile(InstanceList[I].GetWideString(Title), InstanceList[I].GetWideString(FileName),
      InstanceList[I].GetWideString(MIMEType));
  End
  Else
    Result := 0;
End;

Function DLEmbeddedFileCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EmbeddedFileCount;
  End
  Else
    Result := 0;
End;

Function DLEncapsulateContentStream(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EncapsulateContentStream;
  End
  Else
    Result := 0;
End;

Function DLEncodePermissions(InstanceID, CanPrint, CanCopy, CanChange, CanAddNotes, CanFillFields, CanCopyAccess, CanAssemble, CanPrintFull: Integer)
  : Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EncodePermissions(CanPrint, CanCopy, CanChange, CanAddNotes, CanFillFields, CanCopyAccess, CanAssemble, CanPrintFull);
  End
  Else
    Result := 0;
End;

Function DLEncrypt(InstanceID: Integer; Owner, User: PWideChar; Strength, Permissions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.Encrypt(InstanceList[I].GetWideString(Owner), InstanceList[I].GetWideString(User), Strength, Permissions);
  End
  Else
    Result := 0;
End;

Function DLEncryptFile(InstanceID: Integer; InputFileName, OutputFileName, Owner, User: PWideChar; Strength, Permissions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EncryptFile(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(OutputFileName),
      InstanceList[I].GetWideString(Owner), InstanceList[I].GetWideString(User), Strength, Permissions);
  End
  Else
    Result := 0;
End;

Function DLEncryptWithFingerprint(InstanceID: Integer; Fingerprint: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EncryptWithFingerprint(InstanceList[I].GetWideString(Fingerprint));
  End
  Else
    Result := 0;
End;

Function DLEncryptionAlgorithm(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EncryptionAlgorithm;
  End
  Else
    Result := 0;
End;

Function DLEncryptionStatus(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EncryptionStatus;
  End
  Else
    Result := 0;
End;

Function DLEncryptionStrength(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EncryptionStrength;
  End
  Else
    Result := 0;
End;

Function DLEndPageUpdate(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EndPageUpdate;
  End
  Else
    Result := 0;
End;

Function DLEndSignProcessToFile(InstanceID, SignProcessID: Integer; OutputFile: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.EndSignProcessToFile(SignProcessID, InstanceList[I].GetWideString(OutputFile));
  End
  Else
    Result := 0;
End;

Function DLEndSignProcessToString(InstanceID, SignProcessID: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.EndSignProcessToString(SignProcessID);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLExtractFilePageContentToString(InstanceID: Integer; InputFileName, Password: PWideChar; Page: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.ExtractFilePageContentToString(InstanceList[I].GetWideString(InputFileName),
      InstanceList[I].GetWideString(Password), Page);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLExtractFilePageText(InstanceID: Integer; InputFileName, Password: PWideChar; Page, Options: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.ExtractFilePageText(InstanceList[I].GetWideString(InputFileName),
      InstanceList[I].GetWideString(Password), Page, Options);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLExtractFilePageTextBlocks(InstanceID: Integer; InputFileName, Password: PWideChar; Page, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ExtractFilePageTextBlocks(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(Password),
      Page, Options);
  End
  Else
    Result := 0;
End;

Function DLExtractFilePages(InstanceID: Integer; InputFileName, Password, OutputFileName, RangeList: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ExtractFilePages(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(Password),
      InstanceList[I].GetWideString(OutputFileName), InstanceList[I].GetWideString(RangeList));
  End
  Else
    Result := 0;
End;

Function DLExtractFilePagesEx(InstanceID: Integer; InputFileName, Password, OutputFileName, RangeList: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ExtractFilePagesEx(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(Password),
      InstanceList[I].GetWideString(OutputFileName), InstanceList[I].GetWideString(RangeList), Options);
  End
  Else
    Result := 0;
End;

Function DLExtractPageRanges(InstanceID: Integer; RangeList: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ExtractPageRanges(InstanceList[I].GetWideString(RangeList));
  End
  Else
    Result := 0;
End;

Function DLExtractPageTextBlocks(InstanceID, ExtractOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ExtractPageTextBlocks(ExtractOptions);
  End
  Else
    Result := 0;
End;

Function DLExtractPages(InstanceID, StartPage, PageCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ExtractPages(StartPage, PageCount);
  End
  Else
    Result := 0;
End;

Function DLFileListCount(InstanceID: Integer; ListName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FileListCount(InstanceList[I].GetWideString(ListName));
  End
  Else
    Result := 0;
End;

Function DLFileListItem(InstanceID: Integer; ListName: PWideChar; Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.FileListItem(InstanceList[I].GetWideString(ListName), Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLFindFonts(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FindFonts;
  End
  Else
    Result := 0;
End;

Function DLFindFormFieldByTitle(InstanceID: Integer; Title: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FindFormFieldByTitle(InstanceList[I].GetWideString(Title));
  End
  Else
    Result := 0;
End;

Function DLFindImages(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FindImages;
  End
  Else
    Result := 0;
End;

Function DLFitImage(InstanceID: Integer; Left, Top, Width, Height: Double; HAlign, VAlign, Rotate: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FitImage(Left, Top, Width, Height, HAlign, VAlign, Rotate);
  End
  Else
    Result := 0;
End;

Function DLFitRotatedTextBox(InstanceID: Integer; Left, Top, Width, Height, Angle: Double; Text: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FitRotatedTextBox(Left, Top, Width, Height, Angle, InstanceList[I].GetWideString(Text), Options);
  End
  Else
    Result := 0;
End;

Function DLFitTextBox(InstanceID: Integer; Left, Top, Width, Height: Double; Text: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FitTextBox(Left, Top, Width, Height, InstanceList[I].GetWideString(Text), Options);
  End
  Else
    Result := 0;
End;

Function DLFlattenAnnot(InstanceID, Index, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FlattenAnnot(Index, Options);
  End
  Else
    Result := 0;
End;

Function DLFlattenFormField(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FlattenFormField(Index);
  End
  Else
    Result := 0;
End;

Function DLFontCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FontCount;
  End
  Else
    Result := 0;
End;

Function DLFontFamily(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.FontFamily;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLFontHasKerning(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FontHasKerning;
  End
  Else
    Result := 0;
End;

Function DLFontName(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.FontName;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLFontReference(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.FontReference;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLFontSize(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FontSize;
  End
  Else
    Result := 0;
End;

Function DLFontType(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FontType;
  End
  Else
    Result := 0;
End;

Function DLFormFieldCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FormFieldCount;
  End
  Else
    Result := 0;
End;

Function DLFormFieldHasParent(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FormFieldHasParent(Index);
  End
  Else
    Result := 0;
End;

Function DLFormFieldJavaScriptAction(InstanceID, Index: Integer; ActionType, JavaScript: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FormFieldJavaScriptAction(Index, InstanceList[I].GetWideString(ActionType), InstanceList[I].GetWideString(JavaScript));
  End
  Else
    Result := 0;
End;

Function DLFormFieldWebLinkAction(InstanceID, Index: Integer; ActionType, Link: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.FormFieldWebLinkAction(Index, InstanceList[I].GetWideString(ActionType), InstanceList[I].GetWideString(Link));
  End
  Else
    Result := 0;
End;

Function DLGetActionDest(InstanceID, ActionID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetActionDest(ActionID);
  End
  Else
    Result := 0;
End;

Function DLGetActionType(InstanceID, ActionID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetActionType(ActionID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetActionURL(InstanceID, ActionID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetActionURL(ActionID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetAnalysisInfo(InstanceID, AnalysisID, AnalysisItem: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetAnalysisInfo(AnalysisID, AnalysisItem);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetAnnotActionID(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetAnnotActionID(Index);
  End
  Else
    Result := 0;
End;

Function DLGetAnnotDblProperty(InstanceID, Index, Tag: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetAnnotDblProperty(Index, Tag);
  End
  Else
    Result := 0;
End;

Function DLGetAnnotDest(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetAnnotDest(Index);
  End
  Else
    Result := 0;
End;

Function DLGetAnnotEmbeddedFileName(InstanceID, Index, Options: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetAnnotEmbeddedFileName(Index, Options);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetAnnotEmbeddedFileToFile(InstanceID, Index, Options: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetAnnotEmbeddedFileToFile(Index, Options, InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLGetAnnotEmbeddedFileToString(InstanceID, Index, Options: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetAnnotEmbeddedFileToString(Index, Options);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetAnnotIntProperty(InstanceID, Index, Tag: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetAnnotIntProperty(Index, Tag);
  End
  Else
    Result := 0;
End;

Function DLGetAnnotQuadCount(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetAnnotQuadCount(Index);
  End
  Else
    Result := 0;
End;

Function DLGetAnnotQuadPoints(InstanceID, Index, QuadNumber, PointNumber: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetAnnotQuadPoints(Index, QuadNumber, PointNumber);
  End
  Else
    Result := 0;
End;

Function DLGetAnnotSoundToFile(InstanceID, Index, Options: Integer; SoundFileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetAnnotSoundToFile(Index, Options, InstanceList[I].GetWideString(SoundFileName));
  End
  Else
    Result := 0;
End;

Function DLGetAnnotSoundToString(InstanceID, Index, Options: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetAnnotSoundToString(Index, Options);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetAnnotStrProperty(InstanceID, Index, Tag: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetAnnotStrProperty(Index, Tag);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetBarcodeWidth(InstanceID: Integer; NominalWidth: Double; Text: PWideChar; Barcode: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetBarcodeWidth(NominalWidth, InstanceList[I].GetWideString(Text), Barcode);
  End
  Else
    Result := 0;
End;

Function DLGetBaseURL(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetBaseURL;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetCSDictEPSG(InstanceID, CSDictID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetCSDictEPSG(CSDictID);
  End
  Else
    Result := 0;
End;

Function DLGetCSDictType(InstanceID, CSDictID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetCSDictType(CSDictID);
  End
  Else
    Result := 0;
End;

Function DLGetCSDictWKT(InstanceID, CSDictID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetCSDictWKT(CSDictID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetCanvasDC(InstanceID, CanvasWidth, CanvasHeight: Integer): HDC; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetCanvasDC(CanvasWidth, CanvasHeight);
  End
  Else
    Result := 0;
End;

Function DLGetCanvasDCEx(InstanceID, CanvasWidth, CanvasHeight, ReferenceDC: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetCanvasDCEx(CanvasWidth, CanvasHeight, ReferenceDC);
  End
  Else
    Result := 0;
End;

Function DLGetCatalogInformation(InstanceID: Integer; Key: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetCatalogInformation(InstanceList[I].GetWideString(Key));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetContentStreamToString(InstanceID: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetContentStreamToString;
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetCustomInformation(InstanceID: Integer; Key: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetCustomInformation(InstanceList[I].GetWideString(Key));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetCustomKeys(InstanceID, Location: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetCustomKeys(Location);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetDefaultPrinterName(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetDefaultPrinterName;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetDestName(InstanceID, DestID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetDestName(DestID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetDestPage(InstanceID, DestID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetDestPage(DestID);
  End
  Else
    Result := 0;
End;

Function DLGetDestType(InstanceID, DestID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetDestType(DestID);
  End
  Else
    Result := 0;
End;

Function DLGetDestValue(InstanceID, DestID, ValueKey: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetDestValue(DestID, ValueKey);
  End
  Else
    Result := 0;
End;

Function DLGetDocJavaScript(InstanceID: Integer; ActionType: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetDocJavaScript(InstanceList[I].GetWideString(ActionType));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetDocumentFileName(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetDocumentFileName;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetDocumentFileSize(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetDocumentFileSize;
  End
  Else
    Result := 0;
End;

Function DLGetDocumentID(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetDocumentID(Index);
  End
  Else
    Result := 0;
End;

Function DLGetDocumentIdentifier(InstanceID, Part, Options: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetDocumentIdentifier(Part, Options);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetDocumentMetadata(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetDocumentMetadata;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetDocumentRepaired(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetDocumentRepaired;
  End
  Else
    Result := 0;
End;

Function DLGetDocumentResourceList(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetDocumentResourceList;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetEmbeddedFileContentToFile(InstanceID, Index: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetEmbeddedFileContentToFile(Index, InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLGetEmbeddedFileContentToString(InstanceID, Index: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetEmbeddedFileContentToString(Index);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetEmbeddedFileID(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetEmbeddedFileID(Index);
  End
  Else
    Result := 0;
End;

Function DLGetEmbeddedFileIntProperty(InstanceID, Index, Tag: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetEmbeddedFileIntProperty(Index, Tag);
  End
  Else
    Result := 0;
End;

Function DLGetEmbeddedFileStrProperty(InstanceID, Index, Tag: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetEmbeddedFileStrProperty(Index, Tag);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetEncryptionFingerprint(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetEncryptionFingerprint;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFileMetadata(InstanceID: Integer; InputFileName, Password: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFileMetadata(InstanceList[I].GetWideString(InputFileName),
      InstanceList[I].GetWideString(Password));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFirstChildOutline(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFirstChildOutline(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLGetFirstOutline(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFirstOutline;
  End
  Else
    Result := 0;
End;

Function DLGetFontEncoding(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFontEncoding;
  End
  Else
    Result := 0;
End;

Function DLGetFontFlags(InstanceID, FontFlagItemID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFontFlags(FontFlagItemID);
  End
  Else
    Result := 0;
End;

Function DLGetFontID(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFontID(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFontIsEmbedded(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFontIsEmbedded;
  End
  Else
    Result := 0;
End;

Function DLGetFontIsSubsetted(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFontIsSubsetted;
  End
  Else
    Result := 0;
End;

Function DLGetFontMetrics(InstanceID, MetricType: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFontMetrics(MetricType);
  End
  Else
    Result := 0;
End;

Function DLGetFontObjectNumber(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFontObjectNumber;
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldActionID(InstanceID, Index: Integer; TriggerEvent: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldActionID(Index, InstanceList[I].GetWideString(TriggerEvent));
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldAlignment(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldAlignment(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldAnnotFlags(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldAnnotFlags(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldBackgroundColor(InstanceID, Index, ColorComponent: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldBackgroundColor(Index, ColorComponent);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldBackgroundColorType(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldBackgroundColorType(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldBorderColor(InstanceID, Index, ColorComponent: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldBorderColor(Index, ColorComponent);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldBorderColorType(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldBorderColorType(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldBorderProperty(InstanceID, Index, PropKey: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldBorderProperty(Index, PropKey);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldBorderStyle(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldBorderStyle(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldBound(InstanceID, Index, Edge: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldBound(Index, Edge);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldCaption(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldCaption(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldCaptionEx(InstanceID, Index, StringType: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldCaptionEx(Index, StringType);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldCheckStyle(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldCheckStyle(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldChildTitle(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldChildTitle(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldChoiceType(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldChoiceType(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldColor(InstanceID, Index, ColorComponent: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldColor(Index, ColorComponent);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldComb(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldComb(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldDefaultValue(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldDefaultValue(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldDescription(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldDescription(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldFlags(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldFlags(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldFontName(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldFontName(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldJavaScript(InstanceID, Index: Integer; ActionType: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldJavaScript(Index, InstanceList[I].GetWideString(ActionType));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldKidCount(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldKidCount(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldKidTempIndex(InstanceID, Index, SubIndex: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldKidTempIndex(Index, SubIndex);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldMaxLen(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldMaxLen(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldNoExport(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldNoExport(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldPage(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldPage(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldPrintable(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldPrintable(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldReadOnly(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldReadOnly(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldRequired(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldRequired(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldRichTextString(InstanceID, Index: Integer; Key: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldRichTextString(Index, InstanceList[I].GetWideString(Key));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldRotation(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldRotation(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldSubCount(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldSubCount(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldSubDisplayName(InstanceID, Index, SubIndex: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldSubDisplayName(Index, SubIndex);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldSubName(InstanceID, Index, SubIndex: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldSubName(Index, SubIndex);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldSubmitActionString(InstanceID, Index: Integer; ActionType: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldSubmitActionString(Index, InstanceList[I].GetWideString(ActionType));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldTabOrder(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldTabOrder(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldTabOrderEx(InstanceID, Index, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldTabOrderEx(Index, Options);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldTextFlags(InstanceID, Index, ValueKey: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldTextFlags(Index, ValueKey);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldTextSize(InstanceID, Index: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldTextSize(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldTitle(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldTitle(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldType(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldType(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldValue(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldValue(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldValueByTitle(InstanceID: Integer; Title: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldValueByTitle(InstanceList[I].GetWideString(Title));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFieldVisible(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFieldVisible(Index);
  End
  Else
    Result := 0;
End;

Function DLGetFormFieldWebLink(InstanceID, Index: Integer; ActionType: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFieldWebLink(Index, InstanceList[I].GetWideString(ActionType));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetFormFontCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetFormFontCount;
  End
  Else
    Result := 0;
End;

Function DLGetFormFontName(InstanceID, FontIndex: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetFormFontName(FontIndex);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetGlobalJavaScript(InstanceID: Integer; PackageName: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetGlobalJavaScript(InstanceList[I].GetWideString(PackageName));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetHTMLTextHeight(InstanceID: Integer; Width: Double; HTMLText: PWideChar): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetHTMLTextHeight(Width, InstanceList[I].GetWideString(HTMLText));
  End
  Else
    Result := 0;
End;

Function DLGetHTMLTextLineCount(InstanceID: Integer; Width: Double; HTMLText: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetHTMLTextLineCount(Width, InstanceList[I].GetWideString(HTMLText));
  End
  Else
    Result := 0;
End;

Function DLGetHTMLTextWidth(InstanceID: Integer; MaxWidth: Double; HTMLText: PWideChar): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetHTMLTextWidth(MaxWidth, InstanceList[I].GetWideString(HTMLText));
  End
  Else
    Result := 0;
End;

Function DLGetImageID(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetImageID(Index);
  End
  Else
    Result := 0;
End;

Function DLGetImageListCount(InstanceID, ImageListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetImageListCount(ImageListID);
  End
  Else
    Result := 0;
End;

Function DLGetImageListItemDataToString(InstanceID, ImageListID, ImageIndex, Options: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetImageListItemDataToString(ImageListID, ImageIndex, Options);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetImageListItemDblProperty(InstanceID, ImageListID, ImageIndex, PropertyID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetImageListItemDblProperty(ImageListID, ImageIndex, PropertyID);
  End
  Else
    Result := 0;
End;

Function DLGetImageListItemFormatDesc(InstanceID, ImageListID, ImageIndex, Options: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetImageListItemFormatDesc(ImageListID, ImageIndex, Options);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetImageListItemIntProperty(InstanceID, ImageListID, ImageIndex, PropertyID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetImageListItemIntProperty(ImageListID, ImageIndex, PropertyID);
  End
  Else
    Result := 0;
End;

Function DLGetImageMeasureDict(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetImageMeasureDict;
  End
  Else
    Result := 0;
End;

Function DLGetImagePageCount(InstanceID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetImagePageCount(InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLGetImagePageCountFromString(InstanceID: Integer; Source: PAnsiChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetImagePageCountFromString(InstanceList[I].GetString(Source));
  End
  Else
    Result := 0;
End;

Function DLGetImagePtDataDict(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetImagePtDataDict;
  End
  Else
    Result := 0;
End;

Function DLGetInformation(InstanceID, Key: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetInformation(Key);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetInstalledFontsByCharset(InstanceID, CharsetIndex, Options: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetInstalledFontsByCharset(CharsetIndex, Options);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetInstalledFontsByCodePage(InstanceID, CodePage, Options: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetInstalledFontsByCodePage(CodePage, Options);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetKerning(InstanceID: Integer; CharPair: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetKerning(InstanceList[I].GetWideString(CharPair));
  End
  Else
    Result := 0;
End;

Function DLGetLatestPrinterNames(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetLatestPrinterNames;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetMaxObjectNumber(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMaxObjectNumber;
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictBoundsCount(InstanceID, MeasureDictID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictBoundsCount(MeasureDictID);
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictBoundsItem(InstanceID, MeasureDictID, ItemIndex: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictBoundsItem(MeasureDictID, ItemIndex);
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictCoordinateSystem(InstanceID, MeasureDictID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictCoordinateSystem(MeasureDictID);
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictDCSDict(InstanceID, MeasureDictID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictDCSDict(MeasureDictID);
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictGCSDict(InstanceID, MeasureDictID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictGCSDict(MeasureDictID);
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictGPTSCount(InstanceID, MeasureDictID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictGPTSCount(MeasureDictID);
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictGPTSItem(InstanceID, MeasureDictID, ItemIndex: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictGPTSItem(MeasureDictID, ItemIndex);
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictLPTSCount(InstanceID, MeasureDictID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictLPTSCount(MeasureDictID);
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictLPTSItem(InstanceID, MeasureDictID, ItemIndex: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictLPTSItem(MeasureDictID, ItemIndex);
  End
  Else
    Result := 0;
End;

Function DLGetMeasureDictPDU(InstanceID, MeasureDictID, UnitIndex: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetMeasureDictPDU(MeasureDictID, UnitIndex);
  End
  Else
    Result := 0;
End;

Function DLGetNamedDestination(InstanceID: Integer; DestName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetNamedDestination(InstanceList[I].GetWideString(DestName));
  End
  Else
    Result := 0;
End;

Function DLGetNextOutline(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetNextOutline(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLGetObjectCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetObjectCount;
  End
  Else
    Result := 0;
End;

Function DLGetObjectDecodeError(InstanceID, ObjectNumber: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetObjectDecodeError(ObjectNumber);
  End
  Else
    Result := 0;
End;

Function DLGetObjectToString(InstanceID, ObjectNumber: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetObjectToString(ObjectNumber);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetOpenActionDestination(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOpenActionDestination;
  End
  Else
    Result := 0;
End;

Function DLGetOpenActionJavaScript(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetOpenActionJavaScript;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetOptionalContentConfigCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentConfigCount;
  End
  Else
    Result := 0;
End;

Function DLGetOptionalContentConfigLocked(InstanceID, OptionalContentConfigID, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentConfigLocked(OptionalContentConfigID, OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLGetOptionalContentConfigOrderCount(InstanceID, OptionalContentConfigID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentConfigOrderCount(OptionalContentConfigID);
  End
  Else
    Result := 0;
End;

Function DLGetOptionalContentConfigOrderItemID(InstanceID, OptionalContentConfigID, ItemIndex: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentConfigOrderItemID(OptionalContentConfigID, ItemIndex);
  End
  Else
    Result := 0;
End;

Function DLGetOptionalContentConfigOrderItemLabel(InstanceID, OptionalContentConfigID, ItemIndex: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetOptionalContentConfigOrderItemLabel(OptionalContentConfigID, ItemIndex);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetOptionalContentConfigOrderItemLevel(InstanceID, OptionalContentConfigID, ItemIndex: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentConfigOrderItemLevel(OptionalContentConfigID, ItemIndex);
  End
  Else
    Result := 0;
End;

Function DLGetOptionalContentConfigOrderItemType(InstanceID, OptionalContentConfigID, ItemIndex: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentConfigOrderItemType(OptionalContentConfigID, ItemIndex);
  End
  Else
    Result := 0;
End;

Function DLGetOptionalContentConfigState(InstanceID, OptionalContentConfigID, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentConfigState(OptionalContentConfigID, OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLGetOptionalContentGroupID(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentGroupID(Index);
  End
  Else
    Result := 0;
End;

Function DLGetOptionalContentGroupName(InstanceID, OptionalContentGroupID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetOptionalContentGroupName(OptionalContentGroupID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetOptionalContentGroupPrintable(InstanceID, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentGroupPrintable(OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLGetOptionalContentGroupVisible(InstanceID, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOptionalContentGroupVisible(OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLGetOrigin(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOrigin;
  End
  Else
    Result := 0;
End;

Function DLGetOutlineActionID(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOutlineActionID(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLGetOutlineColor(InstanceID, OutlineID, ColorComponent: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOutlineColor(OutlineID, ColorComponent);
  End
  Else
    Result := 0;
End;

Function DLGetOutlineDest(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOutlineDest(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLGetOutlineID(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOutlineID(Index);
  End
  Else
    Result := 0;
End;

Function DLGetOutlineJavaScript(InstanceID, OutlineID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetOutlineJavaScript(OutlineID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetOutlineObjectNumber(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOutlineObjectNumber(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLGetOutlineOpenFile(InstanceID, OutlineID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetOutlineOpenFile(OutlineID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetOutlinePage(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOutlinePage(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLGetOutlineStyle(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetOutlineStyle(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLGetOutlineWebLink(InstanceID, OutlineID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetOutlineWebLink(OutlineID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPageBox(InstanceID, BoxType, Dimension: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetPageBox(BoxType, Dimension);
  End
  Else
    Result := 0;
End;

Function DLGetPageColorSpaces(InstanceID, Options: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetPageColorSpaces(Options);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPageContentToString(InstanceID: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetPageContentToString;
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPageImageList(InstanceID, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetPageImageList(Options);
  End
  Else
    Result := 0;
End;

Function DLGetPageJavaScript(InstanceID: Integer; ActionType: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetPageJavaScript(InstanceList[I].GetWideString(ActionType));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPageLGIDictContent(InstanceID, DictIndex: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetPageLGIDictContent(DictIndex);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPageLGIDictCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetPageLGIDictCount;
  End
  Else
    Result := 0;
End;

Function DLGetPageLabel(InstanceID, Page: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetPageLabel(Page);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPageLayout(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetPageLayout;
  End
  Else
    Result := 0;
End;

Function DLGetPageMetricsToString(InstanceID, StartPage, EndPage, Options: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetPageMetricsToString(StartPage, EndPage, Options);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPageMode(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetPageMode;
  End
  Else
    Result := 0;
End;

Function DLGetPageText(InstanceID, ExtractOptions: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetPageText(ExtractOptions);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPageUserUnit(InstanceID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetPageUserUnit;
  End
  Else
    Result := 0;
End;

Function DLGetPageViewPortCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetPageViewPortCount;
  End
  Else
    Result := 0;
End;

Function DLGetPageViewPortID(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetPageViewPortID(Index);
  End
  Else
    Result := 0;
End;

Function DLGetParentOutline(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetParentOutline(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLGetPrevOutline(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetPrevOutline(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLGetPrintPreviewBitmapToString(InstanceID: Integer; PrinterName: PWideChar; PreviewPage, PrintOptions, MaxDimension, PreviewOptions: Integer)
  : PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetPrintPreviewBitmapToString(InstanceList[I].GetWideString(PrinterName), PreviewPage,
      PrintOptions, MaxDimension, PreviewOptions);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPrinterBins(InstanceID: Integer; PrinterName: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetPrinterBins(InstanceList[I].GetWideString(PrinterName));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPrinterDevModeToString(InstanceID: Integer; PrinterName: PWideChar): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetPrinterDevModeToString(InstanceList[I].GetWideString(PrinterName));
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPrinterMediaTypes(InstanceID: Integer; PrinterName: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetPrinterMediaTypes(InstanceList[I].GetWideString(PrinterName));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetPrinterNames(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetPrinterNames;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetRenderScale(InstanceID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetRenderScale;
  End
  Else
    Result := 0;
End;

Function DLGetSignProcessByteRange(InstanceID, SignProcessID, ArrayPosition: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetSignProcessByteRange(SignProcessID, ArrayPosition);
  End
  Else
    Result := 0;
End;

Function DLGetSignProcessResult(InstanceID, SignProcessID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetSignProcessResult(SignProcessID);
  End
  Else
    Result := 0;
End;

Function DLGetStringListCount(InstanceID, StringListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetStringListCount(StringListID);
  End
  Else
    Result := 0;
End;

Function DLGetStringListItem(InstanceID, StringListID, ItemIndex: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetStringListItem(StringListID, ItemIndex);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetTabOrderMode(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetTabOrderMode;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetTableCellDblProperty(InstanceID, TableID, RowNumber, ColumnNumber, Tag: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTableCellDblProperty(TableID, RowNumber, ColumnNumber, Tag);
  End
  Else
    Result := 0;
End;

Function DLGetTableCellIntProperty(InstanceID, TableID, RowNumber, ColumnNumber, Tag: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTableCellIntProperty(TableID, RowNumber, ColumnNumber, Tag);
  End
  Else
    Result := 0;
End;

Function DLGetTableCellStrProperty(InstanceID, TableID, RowNumber, ColumnNumber, Tag: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetTableCellStrProperty(TableID, RowNumber, ColumnNumber, Tag);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetTableColumnCount(InstanceID, TableID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTableColumnCount(TableID);
  End
  Else
    Result := 0;
End;

Function DLGetTableLastDrawnRow(InstanceID, TableID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTableLastDrawnRow(TableID);
  End
  Else
    Result := 0;
End;

Function DLGetTableRowCount(InstanceID, TableID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTableRowCount(TableID);
  End
  Else
    Result := 0;
End;

Function DLGetTempPath(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetTempPath;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetTextAscent(InstanceID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextAscent;
  End
  Else
    Result := 0;
End;

Function DLGetTextBlockAsString(InstanceID, TextBlockListID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetTextBlockAsString(TextBlockListID, Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetTextBlockBound(InstanceID, TextBlockListID, Index, BoundIndex: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextBlockBound(TextBlockListID, Index, BoundIndex);
  End
  Else
    Result := 0;
End;

Function DLGetTextBlockCharWidth(InstanceID, TextBlockListID, Index, CharIndex: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextBlockCharWidth(TextBlockListID, Index, CharIndex);
  End
  Else
    Result := 0;
End;

Function DLGetTextBlockColor(InstanceID, TextBlockListID, Index, ColorComponent: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextBlockColor(TextBlockListID, Index, ColorComponent);
  End
  Else
    Result := 0;
End;

Function DLGetTextBlockColorType(InstanceID, TextBlockListID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextBlockColorType(TextBlockListID, Index);
  End
  Else
    Result := 0;
End;

Function DLGetTextBlockCount(InstanceID, TextBlockListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextBlockCount(TextBlockListID);
  End
  Else
    Result := 0;
End;

Function DLGetTextBlockFontName(InstanceID, TextBlockListID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetTextBlockFontName(TextBlockListID, Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetTextBlockFontSize(InstanceID, TextBlockListID, Index: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextBlockFontSize(TextBlockListID, Index);
  End
  Else
    Result := 0;
End;

Function DLGetTextBlockText(InstanceID, TextBlockListID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetTextBlockText(TextBlockListID, Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetTextBound(InstanceID, Edge: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextBound(Edge);
  End
  Else
    Result := 0;
End;

Function DLGetTextDescent(InstanceID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextDescent;
  End
  Else
    Result := 0;
End;

Function DLGetTextHeight(InstanceID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextHeight;
  End
  Else
    Result := 0;
End;

Function DLGetTextSize(InstanceID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextSize;
  End
  Else
    Result := 0;
End;

Function DLGetTextWidth(InstanceID: Integer; Text: PWideChar): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetTextWidth(InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLGetUnicodeCharactersFromEncoding(InstanceID, Encoding: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetUnicodeCharactersFromEncoding(Encoding);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetViewPortBBox(InstanceID, ViewPortID, Dimension: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetViewPortBBox(ViewPortID, Dimension);
  End
  Else
    Result := 0;
End;

Function DLGetViewPortMeasureDict(InstanceID, ViewPortID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetViewPortMeasureDict(ViewPortID);
  End
  Else
    Result := 0;
End;

Function DLGetViewPortName(InstanceID, ViewPortID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetViewPortName(ViewPortID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetViewPortPtDataDict(InstanceID, ViewPortID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetViewPortPtDataDict(ViewPortID);
  End
  Else
    Result := 0;
End;

Function DLGetViewerPreferences(InstanceID, Option: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetViewerPreferences(Option);
  End
  Else
    Result := 0;
End;

Function DLGetWrappedText(InstanceID: Integer; Width: Double; Delimiter, Text: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetWrappedText(Width, InstanceList[I].GetWideString(Delimiter),
      InstanceList[I].GetWideString(Text));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetWrappedTextBreakString(InstanceID: Integer; Width: Double; Delimiter, Text: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetWrappedTextBreakString(Width, InstanceList[I].GetWideString(Delimiter),
      InstanceList[I].GetWideString(Text));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetWrappedTextHeight(InstanceID: Integer; Width: Double; Text: PWideChar): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetWrappedTextHeight(Width, InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLGetWrappedTextLineCount(InstanceID: Integer; Width: Double; Text: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetWrappedTextLineCount(Width, InstanceList[I].GetWideString(Text));
  End
  Else
    Result := 0;
End;

Function DLGetXFAFormFieldCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GetXFAFormFieldCount;
  End
  Else
    Result := 0;
End;

Function DLGetXFAFormFieldName(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetXFAFormFieldName(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetXFAFormFieldNames(InstanceID: Integer; Delimiter: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetXFAFormFieldNames(InstanceList[I].GetWideString(Delimiter));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetXFAFormFieldValue(InstanceID: Integer; XFAFieldName: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GetXFAFormFieldValue(InstanceList[I].GetWideString(XFAFieldName));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGetXFAToString(InstanceID, Options: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.GetXFAToString(Options);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLGlobalJavaScriptCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.GlobalJavaScriptCount;
  End
  Else
    Result := 0;
End;

Function DLGlobalJavaScriptPackageName(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.GlobalJavaScriptPackageName(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLHasFontResources(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.HasFontResources;
  End
  Else
    Result := 0;
End;

Function DLHasPageBox(InstanceID, BoxType: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.HasPageBox(BoxType);
  End
  Else
    Result := 0;
End;

Function DLHidePage(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.HidePage;
  End
  Else
    Result := 0;
End;

Function DLImageCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ImageCount;
  End
  Else
    Result := 0;
End;

Function DLImageFillColor(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ImageFillColor;
  End
  Else
    Result := 0;
End;

Function DLImageHeight(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ImageHeight;
  End
  Else
    Result := 0;
End;

Function DLImageHorizontalResolution(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ImageHorizontalResolution;
  End
  Else
    Result := 0;
End;

Function DLImageResolutionUnits(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ImageResolutionUnits;
  End
  Else
    Result := 0;
End;

Function DLImageType(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ImageType;
  End
  Else
    Result := 0;
End;

Function DLImageVerticalResolution(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ImageVerticalResolution;
  End
  Else
    Result := 0;
End;

Function DLImageWidth(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ImageWidth;
  End
  Else
    Result := 0;
End;

Function DLImportEMFFromFile(InstanceID: Integer; FileName: PWideChar; FontOptions, GeneralOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ImportEMFFromFile(InstanceList[I].GetWideString(FileName), FontOptions, GeneralOptions);
  End
  Else
    Result := 0;
End;

Function DLInsertPages(InstanceID, StartPage, PageCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.InsertPages(StartPage, PageCount);
  End
  Else
    Result := 0;
End;

Function DLInsertTableColumns(InstanceID, TableID, Position, NewColumnCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.InsertTableColumns(TableID, Position, NewColumnCount);
  End
  Else
    Result := 0;
End;

Function DLInsertTableRows(InstanceID, TableID, Position, NewRowCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.InsertTableRows(TableID, Position, NewRowCount);
  End
  Else
    Result := 0;
End;

Function DLIsAnnotFormField(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.IsAnnotFormField(Index);
  End
  Else
    Result := 0;
End;

Function DLIsLinearized(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.IsLinearized;
  End
  Else
    Result := 0;
End;

Function DLIsTaggedPDF(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.IsTaggedPDF;
  End
  Else
    Result := 0;
End;

Function DLLastErrorCode(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.LastErrorCode;
  End
  Else
    Result := 0;
End;

Function DLLastRenderError(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.LastRenderError;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLLibraryVersion(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.LibraryVersion;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLLibraryVersionEx(InstanceID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.LibraryVersionEx;
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLLinearizeFile(InstanceID: Integer; InputFileName, Password, OutputFileName: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.LinearizeFile(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(Password),
      InstanceList[I].GetWideString(OutputFileName), Options);
  End
  Else
    Result := 0;
End;

Function DLLoadFromCanvasDC(InstanceID: Integer; DPI: Double; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.LoadFromCanvasDC(DPI, Options);
  End
  Else
    Result := 0;
End;

Function DLLoadFromFile(InstanceID: Integer; FileName, Password: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.LoadFromFile(InstanceList[I].GetWideString(FileName), InstanceList[I].GetWideString(Password));
  End
  Else
    Result := 0;
End;

Function DLLoadFromString(InstanceID: Integer; Source: PAnsiChar; Password: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.LoadFromString(InstanceList[I].GetString(Source), InstanceList[I].GetWideString(Password));
  End
  Else
    Result := 0;
End;

Function DLLoadState(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.LoadState;
  End
  Else
    Result := 0;
End;

Function DLMergeDocument(InstanceID, DocumentID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MergeDocument(DocumentID);
  End
  Else
    Result := 0;
End;

Function DLMergeFileList(InstanceID: Integer; ListName, OutputFileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MergeFileList(InstanceList[I].GetWideString(ListName), InstanceList[I].GetWideString(OutputFileName));
  End
  Else
    Result := 0;
End;

Function DLMergeFileListFast(InstanceID: Integer; ListName, OutputFileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MergeFileListFast(InstanceList[I].GetWideString(ListName), InstanceList[I].GetWideString(OutputFileName));
  End
  Else
    Result := 0;
End;

Function DLMergeFiles(InstanceID: Integer; FirstFileName, SecondFileName, OutputFileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MergeFiles(InstanceList[I].GetWideString(FirstFileName), InstanceList[I].GetWideString(SecondFileName),
      InstanceList[I].GetWideString(OutputFileName));
  End
  Else
    Result := 0;
End;

Function DLMergeTableCells(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MergeTableCells(TableID, FirstRow, FirstColumn, LastRow, LastColumn);
  End
  Else
    Result := 0;
End;

Function DLMoveContentStream(InstanceID, FromPosition, ToPosition: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MoveContentStream(FromPosition, ToPosition);
  End
  Else
    Result := 0;
End;

Function DLMoveOutlineAfter(InstanceID, OutlineID, SiblingID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MoveOutlineAfter(OutlineID, SiblingID);
  End
  Else
    Result := 0;
End;

Function DLMoveOutlineBefore(InstanceID, OutlineID, SiblingID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MoveOutlineBefore(OutlineID, SiblingID);
  End
  Else
    Result := 0;
End;

Function DLMovePage(InstanceID, NewPosition: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MovePage(NewPosition);
  End
  Else
    Result := 0;
End;

Function DLMovePath(InstanceID: Integer; NewX, NewY: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MovePath(NewX, NewY);
  End
  Else
    Result := 0;
End;

Function DLMultiplyScale(InstanceID: Integer; MultScaleBy: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.MultiplyScale(MultScaleBy);
  End
  Else
    Result := 0;
End;

Function DLNewChildFormField(InstanceID, Index: Integer; Title: PWideChar; FieldType: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewChildFormField(Index, InstanceList[I].GetWideString(Title), FieldType);
  End
  Else
    Result := 0;
End;

Function DLNewContentStream(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewContentStream;
  End
  Else
    Result := 0;
End;

Function DLNewCustomPrinter(InstanceID: Integer; OriginalPrinterName: PWideChar): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.NewCustomPrinter(InstanceList[I].GetWideString(OriginalPrinterName));
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLNewDestination(InstanceID, DestPage, Zoom, DestType: Integer; Left, Top, Right, Bottom: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewDestination(DestPage, Zoom, DestType, Left, Top, Right, Bottom);
  End
  Else
    Result := 0;
End;

Function DLNewDocument(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewDocument;
  End
  Else
    Result := 0;
End;

Function DLNewFormField(InstanceID: Integer; Title: PWideChar; FieldType: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewFormField(InstanceList[I].GetWideString(Title), FieldType);
  End
  Else
    Result := 0;
End;

Function DLNewInternalPrinterObject(InstanceID, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewInternalPrinterObject(Options);
  End
  Else
    Result := 0;
End;

Function DLNewNamedDestination(InstanceID: Integer; DestName: PWideChar; DestID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewNamedDestination(InstanceList[I].GetWideString(DestName), DestID);
  End
  Else
    Result := 0;
End;

Function DLNewOptionalContentGroup(InstanceID: Integer; GroupName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewOptionalContentGroup(InstanceList[I].GetWideString(GroupName));
  End
  Else
    Result := 0;
End;

Function DLNewOutline(InstanceID, Parent: Integer; Title: PWideChar; DestPage: Integer; DestPosition: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewOutline(Parent, InstanceList[I].GetWideString(Title), DestPage, DestPosition);
  End
  Else
    Result := 0;
End;

Function DLNewPage(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewPage;
  End
  Else
    Result := 0;
End;

Function DLNewPageFromCanvasDC(InstanceID: Integer; DPI: Double; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewPageFromCanvasDC(DPI, Options);
  End
  Else
    Result := 0;
End;

Function DLNewPages(InstanceID, PageCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewPages(PageCount);
  End
  Else
    Result := 0;
End;

Function DLNewPostScriptXObject(InstanceID: Integer; PS: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewPostScriptXObject(InstanceList[I].GetWideString(PS));
  End
  Else
    Result := 0;
End;

Function DLNewRGBAxialShader(InstanceID: Integer; ShaderName: PWideChar; StartX, StartY, StartRed, StartGreen, StartBlue, EndX, EndY, EndRed, EndGreen,
  EndBlue: Double; Extend: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewRGBAxialShader(InstanceList[I].GetWideString(ShaderName), StartX, StartY, StartRed, StartGreen, StartBlue, EndX,
      EndY, EndRed, EndGreen, EndBlue, Extend);
  End
  Else
    Result := 0;
End;

Function DLNewSignProcessFromFile(InstanceID: Integer; InputFile, Password: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewSignProcessFromFile(InstanceList[I].GetWideString(InputFile), InstanceList[I].GetWideString(Password));
  End
  Else
    Result := 0;
End;

Function DLNewSignProcessFromString(InstanceID: Integer; Source: PAnsiChar; Password: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewSignProcessFromString(InstanceList[I].GetString(Source), InstanceList[I].GetWideString(Password));
  End
  Else
    Result := 0;
End;

Function DLNewStaticOutline(InstanceID, Parent: Integer; Title: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewStaticOutline(Parent, InstanceList[I].GetWideString(Title));
  End
  Else
    Result := 0;
End;

Function DLNewTilingPatternFromCapturedPage(InstanceID: Integer; PatternName: PWideChar; CaptureID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NewTilingPatternFromCapturedPage(InstanceList[I].GetWideString(PatternName), CaptureID);
  End
  Else
    Result := 0;
End;

Function DLNoEmbedFontListAdd(InstanceID: Integer; FontName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NoEmbedFontListAdd(InstanceList[I].GetWideString(FontName));
  End
  Else
    Result := 0;
End;

Function DLNoEmbedFontListCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NoEmbedFontListCount;
  End
  Else
    Result := 0;
End;

Function DLNoEmbedFontListGet(InstanceID, Index: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.NoEmbedFontListGet(Index);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLNoEmbedFontListRemoveAll(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NoEmbedFontListRemoveAll;
  End
  Else
    Result := 0;
End;

Function DLNoEmbedFontListRemoveIndex(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NoEmbedFontListRemoveIndex(Index);
  End
  Else
    Result := 0;
End;

Function DLNoEmbedFontListRemoveName(InstanceID: Integer; FontName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NoEmbedFontListRemoveName(InstanceList[I].GetWideString(FontName));
  End
  Else
    Result := 0;
End;

Function DLNormalizePage(InstanceID, NormalizeOptions: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.NormalizePage(NormalizeOptions);
  End
  Else
    Result := 0;
End;

Function DLOpenOutline(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.OpenOutline(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLOptionalContentGroupCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.OptionalContentGroupCount;
  End
  Else
    Result := 0;
End;

Function DLOutlineCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.OutlineCount;
  End
  Else
    Result := 0;
End;

Function DLOutlineTitle(InstanceID, OutlineID: Integer): PWideChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].WideReturnString := InstanceList[I].PDFlibrary.OutlineTitle(OutlineID);
    Result := PWideChar(InstanceList[I].WideReturnString);
  End
  Else
    Result := Nil;
End;

Function DLPageCount(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PageCount;
  End
  Else
    Result := 0;
End;

Function DLPageHasFontResources(InstanceID, PageNumber: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PageHasFontResources(PageNumber);
  End
  Else
    Result := 0;
End;

Function DLPageHeight(InstanceID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PageHeight;
  End
  Else
    Result := 0;
End;

Function DLPageJavaScriptAction(InstanceID: Integer; ActionType, JavaScript: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PageJavaScriptAction(InstanceList[I].GetWideString(ActionType), InstanceList[I].GetWideString(JavaScript));
  End
  Else
    Result := 0;
End;

Function DLPageRotation(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PageRotation;
  End
  Else
    Result := 0;
End;

Function DLPageWidth(InstanceID: Integer): Double; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PageWidth;
  End
  Else
    Result := 0;
End;

Function DLPrintDocument(InstanceID: Integer; PrinterName: PWideChar; StartPage, EndPage, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PrintDocument(InstanceList[I].GetWideString(PrinterName), StartPage, EndPage, Options);
  End
  Else
    Result := 0;
End;

Function DLPrintDocumentToFile(InstanceID: Integer; PrinterName: PWideChar; StartPage, EndPage, Options: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PrintDocumentToFile(InstanceList[I].GetWideString(PrinterName), StartPage, EndPage, Options,
      InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLPrintMode(InstanceID, Mode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PrintMode(Mode);
  End
  Else
    Result := 0;
End;

Function DLPrintOptions(InstanceID, PageScaling, AutoRotateCenter: Integer; Title: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PrintOptions(PageScaling, AutoRotateCenter, InstanceList[I].GetWideString(Title));
  End
  Else
    Result := 0;
End;

Function DLPrintPages(InstanceID: Integer; PrinterName, PageRanges: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PrintPages(InstanceList[I].GetWideString(PrinterName), InstanceList[I].GetWideString(PageRanges), Options);
  End
  Else
    Result := 0;
End;

Function DLPrintPagesToFile(InstanceID: Integer; PrinterName, PageRanges: PWideChar; Options: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.PrintPagesToFile(InstanceList[I].GetWideString(PrinterName), InstanceList[I].GetWideString(PageRanges), Options,
      InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLReleaseBuffer(InstanceID: Integer; Buffer: PAnsiChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  Result := 0;
  If FindInstance(InstanceID, I) Then
  Begin
    If InstanceList[I].ReleaseBuffer(Buffer) Then
      Result := 1;
  End;
End;

Function DLReleaseImage(InstanceID, ImageID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ReleaseImage(ImageID);
  End
  Else
    Result := 0;
End;

Function DLReleaseImageList(InstanceID, ImageListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ReleaseImageList(ImageListID);
  End
  Else
    Result := 0;
End;

Function DLReleaseLibrary(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
  X: Integer;
Begin
  CriticalSection.Enter;
  Try
    X := 0;
    I := -1;
    While (I < 0) And (X < Length(InstanceList)) Do
      If Assigned(InstanceList[X]) And (InstanceList[X].InstanceID = InstanceID) Then
        I := X
      Else
        Inc(X);
    If I >= 0 Then
    Begin
      Result := 1;
      InstanceList[X].Free;
      InstanceList[X] := Nil;
    End
    Else
      Result := 0;
  Finally
    CriticalSection.Leave;
  End;
End;

Function DLReleaseSignProcess(InstanceID, SignProcessID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ReleaseSignProcess(SignProcessID);
  End
  Else
    Result := 0;
End;

Function DLReleaseStringList(InstanceID, StringListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ReleaseStringList(StringListID);
  End
  Else
    Result := 0;
End;

Function DLReleaseTextBlocks(InstanceID, TextBlockListID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ReleaseTextBlocks(TextBlockListID);
  End
  Else
    Result := 0;
End;

Function DLRemoveAppearanceStream(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveAppearanceStream(Index);
  End
  Else
    Result := 0;
End;

Function DLRemoveCustomInformation(InstanceID: Integer; Key: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveCustomInformation(InstanceList[I].GetWideString(Key));
  End
  Else
    Result := 0;
End;

Function DLRemoveDocument(InstanceID, DocumentID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveDocument(DocumentID);
  End
  Else
    Result := 0;
End;

Function DLRemoveEmbeddedFile(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveEmbeddedFile(Index);
  End
  Else
    Result := 0;
End;

Function DLRemoveFormFieldBackgroundColor(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveFormFieldBackgroundColor(Index);
  End
  Else
    Result := 0;
End;

Function DLRemoveFormFieldBorderColor(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveFormFieldBorderColor(Index);
  End
  Else
    Result := 0;
End;

Function DLRemoveFormFieldChoiceSub(InstanceID, Index: Integer; SubName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveFormFieldChoiceSub(Index, InstanceList[I].GetWideString(SubName));
  End
  Else
    Result := 0;
End;

Function DLRemoveGlobalJavaScript(InstanceID: Integer; PackageName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveGlobalJavaScript(InstanceList[I].GetWideString(PackageName));
  End
  Else
    Result := 0;
End;

Function DLRemoveOpenAction(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveOpenAction;
  End
  Else
    Result := 0;
End;

Function DLRemoveOutline(InstanceID, OutlineID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveOutline(OutlineID);
  End
  Else
    Result := 0;
End;

Function DLRemovePageBox(InstanceID, BoxType: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemovePageBox(BoxType);
  End
  Else
    Result := 0;
End;

Function DLRemoveSharedContentStreams(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveSharedContentStreams;
  End
  Else
    Result := 0;
End;

Function DLRemoveStyle(InstanceID: Integer; StyleName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveStyle(InstanceList[I].GetWideString(StyleName));
  End
  Else
    Result := 0;
End;

Function DLRemoveUsageRights(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveUsageRights;
  End
  Else
    Result := 0;
End;

Function DLRemoveXFAEntries(InstanceID, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RemoveXFAEntries(Options);
  End
  Else
    Result := 0;
End;

Function DLRenderAsMultipageTIFFToFile(InstanceID: Integer; DPI: Double; PageRanges: PWideChar; ImageOptions, OutputOptions: Integer; FileName: PWideChar)
  : Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RenderAsMultipageTIFFToFile(DPI, InstanceList[I].GetWideString(PageRanges), ImageOptions, OutputOptions,
      InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLRenderDocumentToFile(InstanceID: Integer; DPI: Double; StartPage, EndPage, Options: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RenderDocumentToFile(DPI, StartPage, EndPage, Options, InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLRenderPageToDC(InstanceID: Integer; DPI: Double; Page: Integer; DC: HDC): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RenderPageToDC(DPI, Page, DC);
  End
  Else
    Result := 0;
End;

Function DLRenderPageToDCClip(InstanceID: Integer; DPI: Double; Page, DC: Integer; Clip: PAnsiChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RenderPageToDCClip(DPI, Page, DC, InstanceList[I].GetString(Clip));
  End
  Else
    Result := 0;
End;

Function DLRenderPageToFile(InstanceID: Integer; DPI: Double; Page, Options: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RenderPageToFile(DPI, Page, Options, InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLRenderPageToString(InstanceID: Integer; DPI: Double; Page, Options: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.RenderPageToString(DPI, Page, Options);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLReplaceFonts(InstanceID, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ReplaceFonts(Options);
  End
  Else
    Result := 0;
End;

Function DLReplaceImage(InstanceID, OriginalImageID, NewImageID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ReplaceImage(OriginalImageID, NewImageID);
  End
  Else
    Result := 0;
End;

Function DLReplaceTag(InstanceID: Integer; Tag, NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ReplaceTag(InstanceList[I].GetWideString(Tag), InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLRequestPrinterStatus(InstanceID, StatusCommand: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RequestPrinterStatus(StatusCommand);
  End
  Else
    Result := 0;
End;

Function DLRetrieveCustomDataToFile(InstanceID: Integer; Key, FileName: PWideChar; Location: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RetrieveCustomDataToFile(InstanceList[I].GetWideString(Key), InstanceList[I].GetWideString(FileName), Location);
  End
  Else
    Result := 0;
End;

Function DLRetrieveCustomDataToString(InstanceID: Integer; Key: PAnsiChar; Location: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.RetrieveCustomDataToString(InstanceList[I].GetString(Key), Location);
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLReverseImage(InstanceID, Reset: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.ReverseImage(Reset);
  End
  Else
    Result := 0;
End;

Function DLRotatePage(InstanceID, PageRotation: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.RotatePage(PageRotation);
  End
  Else
    Result := 0;
End;

Function DLSaveFontToFile(InstanceID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SaveFontToFile(InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLSaveImageListItemDataToFile(InstanceID, ImageListID, ImageIndex, Options: Integer; ImageFileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SaveImageListItemDataToFile(ImageListID, ImageIndex, Options, InstanceList[I].GetWideString(ImageFileName));
  End
  Else
    Result := 0;
End;

Function DLSaveImageToFile(InstanceID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SaveImageToFile(InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLSaveImageToString(InstanceID: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.SaveImageToString;
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLSaveState(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SaveState;
  End
  Else
    Result := 0;
End;

Function DLSaveStyle(InstanceID: Integer; StyleName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SaveStyle(InstanceList[I].GetWideString(StyleName));
  End
  Else
    Result := 0;
End;

Function DLSaveToFile(InstanceID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SaveToFile(InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLSaveToString(InstanceID: Integer): PAnsiChar; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    InstanceList[I].ReturnString := InstanceList[I].PDFlibrary.SaveToString;
    Result := PAnsiChar(InstanceList[I].ReturnString);
  End
  Else
    Result := Nil;
End;

Function DLSecurityInfo(InstanceID, SecurityItem: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SecurityInfo(SecurityItem);
  End
  Else
    Result := 0;
End;

Function DLSelectContentStream(InstanceID, NewIndex: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectContentStream(NewIndex);
  End
  Else
    Result := 0;
End;

Function DLSelectDocument(InstanceID, DocumentID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectDocument(DocumentID);
  End
  Else
    Result := 0;
End;

Function DLSelectFont(InstanceID, FontID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectFont(FontID);
  End
  Else
    Result := 0;
End;

Function DLSelectImage(InstanceID, ImageID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectImage(ImageID);
  End
  Else
    Result := 0;
End;

Function DLSelectPage(InstanceID, PageNumber: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectPage(PageNumber);
  End
  Else
    Result := 0;
End;

Function DLSelectRenderer(InstanceID, RendererID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectRenderer(RendererID);
  End
  Else
    Result := 0;
End;

Function DLSelectedDocument(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectedDocument;
  End
  Else
    Result := 0;
End;

Function DLSelectedFont(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectedFont;
  End
  Else
    Result := 0;
End;

Function DLSelectedImage(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectedImage;
  End
  Else
    Result := 0;
End;

Function DLSelectedPage(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SelectedPage;
  End
  Else
    Result := 0;
End;

Function DLSetActionURL(InstanceID, ActionID: Integer; NewURL: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetActionURL(ActionID, InstanceList[I].GetWideString(NewURL));
  End
  Else
    Result := 0;
End;

Function DLSetAnnotBorderColor(InstanceID, Index: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAnnotBorderColor(Index, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetAnnotBorderStyle(InstanceID, Index: Integer; Width: Double; Style: Integer; DashOn, DashOff: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAnnotBorderStyle(Index, Width, Style, DashOn, DashOff);
  End
  Else
    Result := 0;
End;

Function DLSetAnnotContents(InstanceID, Index: Integer; NewContents: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAnnotContents(Index, InstanceList[I].GetWideString(NewContents));
  End
  Else
    Result := 0;
End;

Function DLSetAnnotDblProperty(InstanceID, Index, Tag: Integer; NewValue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAnnotDblProperty(Index, Tag, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetAnnotIntProperty(InstanceID, Index, Tag, NewValue: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAnnotIntProperty(Index, Tag, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetAnnotOptional(InstanceID, Index, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAnnotOptional(Index, OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLSetAnnotQuadPoints(InstanceID, Index, QuadNumber: Integer; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAnnotQuadPoints(Index, QuadNumber, X1, Y1, X2, Y2, X3, Y3, X4, Y4);
  End
  Else
    Result := 0;
End;

Function DLSetAnnotRect(InstanceID, Index: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAnnotRect(Index, Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLSetAnnotStrProperty(InstanceID, Index, Tag: Integer; NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAnnotStrProperty(Index, Tag, InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLSetAnsiMode(InstanceID, NewAnsiMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  Result := 0;
  If FindInstance(InstanceID, I) Then
  Begin
    If ((NewAnsiMode = 0) Or (NewAnsiMode = 1)) Then
    Begin
      InstanceList[I].AnsiMode := NewAnsiMode;
      Result := 1;
    End;
  End;
End;

Function DLSetAppendInputFromString(InstanceID: Integer; Source: PAnsiChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetAppendInputFromString(InstanceList[I].GetString(Source));
  End
  Else
    Result := 0;
End;

Function DLSetBaseURL(InstanceID: Integer; NewBaseURL: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetBaseURL(InstanceList[I].GetWideString(NewBaseURL));
  End
  Else
    Result := 0;
End;

Function DLSetBlendMode(InstanceID, BlendMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetBlendMode(BlendMode);
  End
  Else
    Result := 0;
End;

Function DLSetBreakString(InstanceID: Integer; NewBreakString: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetBreakString(InstanceList[I].GetWideString(NewBreakString));
  End
  Else
    Result := 0;
End;

Function DLSetCSDictEPSG(InstanceID, CSDictID, NewEPSG: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCSDictEPSG(CSDictID, NewEPSG);
  End
  Else
    Result := 0;
End;

Function DLSetCSDictType(InstanceID, CSDictID, NewDictType: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCSDictType(CSDictID, NewDictType);
  End
  Else
    Result := 0;
End;

Function DLSetCSDictWKT(InstanceID, CSDictID: Integer; NewWKT: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCSDictWKT(CSDictID, InstanceList[I].GetWideString(NewWKT));
  End
  Else
    Result := 0;
End;

Function DLSetCapturedPageOptional(InstanceID, CaptureID, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCapturedPageOptional(CaptureID, OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLSetCapturedPageTransparencyGroup(InstanceID, CaptureID, CS, Isolate, Knockout: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCapturedPageTransparencyGroup(CaptureID, CS, Isolate, Knockout);
  End
  Else
    Result := 0;
End;

Function DLSetCatalogInformation(InstanceID: Integer; Key, NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCatalogInformation(InstanceList[I].GetWideString(Key), InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLSetCharWidth(InstanceID, CharCode, NewWidth: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCharWidth(CharCode, NewWidth);
  End
  Else
    Result := 0;
End;

Function DLSetClippingPath(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetClippingPath;
  End
  Else
    Result := 0;
End;

Function DLSetClippingPathEvenOdd(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetClippingPathEvenOdd;
  End
  Else
    Result := 0;
End;

Function DLSetCompatibility(InstanceID, CompatibilityItem, CompatibilityMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCompatibility(CompatibilityItem, CompatibilityMode);
  End
  Else
    Result := 0;
End;

Function DLSetContentStreamFromString(InstanceID: Integer; Source: PAnsiChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetContentStreamFromString(InstanceList[I].GetString(Source));
  End
  Else
    Result := 0;
End;

Function DLSetContentStreamOptional(InstanceID, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetContentStreamOptional(OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLSetCropBox(InstanceID: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCropBox(Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLSetCustomInformation(InstanceID: Integer; Key, NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCustomInformation(InstanceList[I].GetWideString(Key), InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLSetCustomLineDash(InstanceID: Integer; DashPattern: PWideChar; DashPhase: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetCustomLineDash(InstanceList[I].GetWideString(DashPattern), DashPhase);
  End
  Else
    Result := 0;
End;

Function DLSetPDFiumFileName(InstanceID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPDFiumFileName(InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLSetDecodeMode(InstanceID, NewDecodeMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetDecodeMode(NewDecodeMode);
  End
  Else
    Result := 0;
End;

Function DLSetDestProperties(InstanceID, DestID, Zoom, DestType: Integer; Left, Top, Right, Bottom: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetDestProperties(DestID, Zoom, DestType, Left, Top, Right, Bottom);
  End
  Else
    Result := 0;
End;

Function DLSetDestValue(InstanceID, DestID, ValueKey: Integer; NewValue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetDestValue(DestID, ValueKey, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetDocumentMetadata(InstanceID: Integer; XMP: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetDocumentMetadata(InstanceList[I].GetWideString(XMP));
  End
  Else
    Result := 0;
End;

Function DLSetEmbeddedFileStrProperty(InstanceID, Index, Tag: Integer; NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetEmbeddedFileStrProperty(Index, Tag, InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLSetFillColor(InstanceID: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFillColor(Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetFillColorCMYK(InstanceID: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFillColorCMYK(C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetFillColorSep(InstanceID: Integer; ColorName: PWideChar; Tint: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFillColorSep(InstanceList[I].GetWideString(ColorName), Tint);
  End
  Else
    Result := 0;
End;

Function DLSetFillShader(InstanceID: Integer; ShaderName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFillShader(InstanceList[I].GetWideString(ShaderName));
  End
  Else
    Result := 0;
End;

Function DLSetFillTilingPattern(InstanceID: Integer; PatternName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFillTilingPattern(InstanceList[I].GetWideString(PatternName));
  End
  Else
    Result := 0;
End;

Function DLSetFindImagesMode(InstanceID, NewFindImagesMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFindImagesMode(NewFindImagesMode);
  End
  Else
    Result := 0;
End;

Function DLSetFontEncoding(InstanceID, Encoding: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFontEncoding(Encoding);
  End
  Else
    Result := 0;
End;

Function DLSetFontFlags(InstanceID, Fixed, Serif, Symbolic, Script, Italic, AllCap, SmallCap, ForceBold: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFontFlags(Fixed, Serif, Symbolic, Script, Italic, AllCap, SmallCap, ForceBold);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldAlignment(InstanceID, Index, Alignment: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldAlignment(Index, Alignment);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldAnnotFlags(InstanceID, Index, NewFlags: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldAnnotFlags(Index, NewFlags);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBackgroundColor(InstanceID, Index: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBackgroundColor(Index, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBackgroundColorCMYK(InstanceID, Index: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBackgroundColorCMYK(Index, C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBackgroundColorGray(InstanceID, Index: Integer; Gray: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBackgroundColorGray(Index, Gray);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBackgroundColorSep(InstanceID, Index: Integer; ColorName: PWideChar; Tint: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBackgroundColorSep(Index, InstanceList[I].GetWideString(ColorName), Tint);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBorderColor(InstanceID, Index: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBorderColor(Index, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBorderColorCMYK(InstanceID, Index: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBorderColorCMYK(Index, C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBorderColorGray(InstanceID, Index: Integer; Gray: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBorderColorGray(Index, Gray);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBorderColorSep(InstanceID, Index: Integer; ColorName: PWideChar; Tint: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBorderColorSep(Index, InstanceList[I].GetWideString(ColorName), Tint);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBorderStyle(InstanceID, Index: Integer; Width: Double; Style: Integer; DashOn, DashOff: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBorderStyle(Index, Width, Style, DashOn, DashOff);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldBounds(InstanceID, Index: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldBounds(Index, Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldCalcOrder(InstanceID, Index, Order: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldCalcOrder(Index, Order);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldCaption(InstanceID, Index: Integer; NewCaption: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldCaption(Index, InstanceList[I].GetWideString(NewCaption));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldCheckStyle(InstanceID, Index, CheckStyle, Position: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldCheckStyle(Index, CheckStyle, Position);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldChildTitle(InstanceID, Index: Integer; NewTitle: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldChildTitle(Index, InstanceList[I].GetWideString(NewTitle));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldChoiceSub(InstanceID, Index, SubIndex: Integer; SubName, DisplayName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldChoiceSub(Index, SubIndex, InstanceList[I].GetWideString(SubName),
      InstanceList[I].GetWideString(DisplayName));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldChoiceType(InstanceID, Index, ChoiceType: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldChoiceType(Index, ChoiceType);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldColor(InstanceID, Index: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldColor(Index, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldColorCMYK(InstanceID, Index: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldColorCMYK(Index, C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldColorSep(InstanceID, Index: Integer; ColorName: PWideChar; Tint: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldColorSep(Index, InstanceList[I].GetWideString(ColorName), Tint);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldComb(InstanceID, Index, Comb: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldComb(Index, Comb);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldDefaultValue(InstanceID, Index: Integer; NewDefaultValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldDefaultValue(Index, InstanceList[I].GetWideString(NewDefaultValue));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldDescription(InstanceID, Index: Integer; NewDescription: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldDescription(Index, InstanceList[I].GetWideString(NewDescription));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldFlags(InstanceID, Index, NewFlags: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldFlags(Index, NewFlags);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldFont(InstanceID, Index, FontIndex: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldFont(Index, FontIndex);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldHighlightMode(InstanceID, Index, NewMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldHighlightMode(Index, NewMode);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldIcon(InstanceID, Index, IconType, CaptureID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldIcon(Index, IconType, CaptureID);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldIconStyle(InstanceID, Index, Placement, Scale, ScaleType, HorizontalShift, VerticalShift: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldIconStyle(Index, Placement, Scale, ScaleType, HorizontalShift, VerticalShift);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldMaxLen(InstanceID, Index, NewMaxLen: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldMaxLen(Index, NewMaxLen);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldNoExport(InstanceID, Index, NoExport: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldNoExport(Index, NoExport);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldOptional(InstanceID, Index, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldOptional(Index, OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldPage(InstanceID, Index, NewPage: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldPage(Index, NewPage);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldPrintable(InstanceID, Index, Printable: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldPrintable(Index, Printable);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldReadOnly(InstanceID, Index, ReadOnly: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldReadOnly(Index, ReadOnly);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldRequired(InstanceID, Index, Required: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldRequired(Index, Required);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldResetAction(InstanceID, Index: Integer; ActionType: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldResetAction(Index, InstanceList[I].GetWideString(ActionType));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldRichTextString(InstanceID, Index: Integer; Key, NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldRichTextString(Index, InstanceList[I].GetWideString(Key), InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldRotation(InstanceID, Index, Angle: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldRotation(Index, Angle);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldSignatureImage(InstanceID, Index, ImageID, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldSignatureImage(Index, ImageID, Options);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldStandardFont(InstanceID, Index, StandardFontID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldStandardFont(Index, StandardFontID);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldSubmitAction(InstanceID, Index: Integer; ActionType, Link: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldSubmitAction(Index, InstanceList[I].GetWideString(ActionType), InstanceList[I].GetWideString(Link));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldSubmitActionEx(InstanceID, Index: Integer; ActionType, Link: PWideChar; Flags: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldSubmitActionEx(Index, InstanceList[I].GetWideString(ActionType),
      InstanceList[I].GetWideString(Link), Flags);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldTabOrder(InstanceID, Index, Order: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldTabOrder(Index, Order);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldTextFlags(InstanceID, Index, Multiline, Password, FileSelect, DoNotSpellCheck, DoNotScroll: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldTextFlags(Index, Multiline, Password, FileSelect, DoNotSpellCheck, DoNotScroll);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldTextSize(InstanceID, Index: Integer; NewTextSize: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldTextSize(Index, NewTextSize);
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldTitle(InstanceID, Index: Integer; NewTitle: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldTitle(Index, InstanceList[I].GetWideString(NewTitle));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldValue(InstanceID, Index: Integer; NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldValue(Index, InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldValueByTitle(InstanceID: Integer; Title, NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldValueByTitle(InstanceList[I].GetWideString(Title), InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLSetFormFieldVisible(InstanceID, Index, Visible: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetFormFieldVisible(Index, Visible);
  End
  Else
    Result := 0;
End;

Function DLSetGDIPlusFileName(InstanceID: Integer; DLLFileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetGDIPlusFileName(InstanceList[I].GetWideString(DLLFileName));
  End
  Else
    Result := 0;
End;

Function DLSetGDIPlusOptions(InstanceID, OptionID, NewValue: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetGDIPlusOptions(OptionID, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetHTMLBoldFont(InstanceID: Integer; FontSet: PWideChar; FontID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetHTMLBoldFont(InstanceList[I].GetWideString(FontSet), FontID);
  End
  Else
    Result := 0;
End;

Function DLSetHTMLBoldItalicFont(InstanceID: Integer; FontSet: PWideChar; FontID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetHTMLBoldItalicFont(InstanceList[I].GetWideString(FontSet), FontID);
  End
  Else
    Result := 0;
End;

Function DLSetHTMLItalicFont(InstanceID: Integer; FontSet: PWideChar; FontID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetHTMLItalicFont(InstanceList[I].GetWideString(FontSet), FontID);
  End
  Else
    Result := 0;
End;

Function DLSetHTMLNormalFont(InstanceID: Integer; FontSet: PWideChar; FontID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetHTMLNormalFont(InstanceList[I].GetWideString(FontSet), FontID);
  End
  Else
    Result := 0;
End;

Function DLSetHeaderCommentsFromString(InstanceID: Integer; Source: PAnsiChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetHeaderCommentsFromString(InstanceList[I].GetString(Source));
  End
  Else
    Result := 0;
End;

Function DLSetImageAsMask(InstanceID, MaskType: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetImageAsMask(MaskType);
  End
  Else
    Result := 0;
End;

Function DLSetImageMask(InstanceID: Integer; FromRed, FromGreen, FromBlue, ToRed, ToGreen, ToBlue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetImageMask(FromRed, FromGreen, FromBlue, ToRed, ToGreen, ToBlue);
  End
  Else
    Result := 0;
End;

Function DLSetImageMaskCMYK(InstanceID: Integer; FromC, FromM, FromY, FromK, ToC, ToM, ToY, ToK: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetImageMaskCMYK(FromC, FromM, FromY, FromK, ToC, ToM, ToY, ToK);
  End
  Else
    Result := 0;
End;

Function DLSetImageMaskFromImage(InstanceID, ImageID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetImageMaskFromImage(ImageID);
  End
  Else
    Result := 0;
End;

Function DLSetImageOptional(InstanceID, OptionalContentGroupID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetImageOptional(OptionalContentGroupID);
  End
  Else
    Result := 0;
End;

Function DLSetImageResolution(InstanceID, Horizontal, Vertical, Units: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetImageResolution(Horizontal, Vertical, Units);
  End
  Else
    Result := 0;
End;

Function DLSetInformation(InstanceID, Key: Integer; NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetInformation(Key, InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLSetJPEGQuality(InstanceID, Quality: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetJPEGQuality(Quality);
  End
  Else
    Result := 0;
End;

Function DLSetJavaScriptMode(InstanceID, JSMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetJavaScriptMode(JSMode);
  End
  Else
    Result := 0;
End;

Function DLSetKerning(InstanceID: Integer; CharPair: PWideChar; Adjustment: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetKerning(InstanceList[I].GetWideString(CharPair), Adjustment);
  End
  Else
    Result := 0;
End;

Function DLSetLineCap(InstanceID, LineCap: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetLineCap(LineCap);
  End
  Else
    Result := 0;
End;

Function DLSetLineColor(InstanceID: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetLineColor(Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetLineColorCMYK(InstanceID: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetLineColorCMYK(C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetLineColorSep(InstanceID: Integer; ColorName: PWideChar; Tint: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetLineColorSep(InstanceList[I].GetWideString(ColorName), Tint);
  End
  Else
    Result := 0;
End;

Function DLSetLineDash(InstanceID: Integer; DashOn, DashOff: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetLineDash(DashOn, DashOff);
  End
  Else
    Result := 0;
End;

Function DLSetLineDashEx(InstanceID: Integer; DashValues: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetLineDashEx(InstanceList[I].GetWideString(DashValues));
  End
  Else
    Result := 0;
End;

Function DLSetLineJoin(InstanceID, LineJoin: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetLineJoin(LineJoin);
  End
  Else
    Result := 0;
End;

Function DLSetLineShader(InstanceID: Integer; ShaderName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetLineShader(InstanceList[I].GetWideString(ShaderName));
  End
  Else
    Result := 0;
End;

Function DLSetLineWidth(InstanceID: Integer; LineWidth: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetLineWidth(LineWidth);
  End
  Else
    Result := 0;
End;

Function DLSetMarkupAnnotStyle(InstanceID, Index: Integer; Red, Green, Blue, Transparency: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMarkupAnnotStyle(Index, Red, Green, Blue, Transparency);
  End
  Else
    Result := 0;
End;

Function DLSetMeasureDictBoundsCount(InstanceID, MeasureDictID, NewCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMeasureDictBoundsCount(MeasureDictID, NewCount);
  End
  Else
    Result := 0;
End;

Function DLSetMeasureDictBoundsItem(InstanceID, MeasureDictID, ItemIndex: Integer; NewValue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMeasureDictBoundsItem(MeasureDictID, ItemIndex, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetMeasureDictCoordinateSystem(InstanceID, MeasureDictID, CoordinateSystemID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMeasureDictCoordinateSystem(MeasureDictID, CoordinateSystemID);
  End
  Else
    Result := 0;
End;

Function DLSetMeasureDictGPTSCount(InstanceID, MeasureDictID, NewCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMeasureDictGPTSCount(MeasureDictID, NewCount);
  End
  Else
    Result := 0;
End;

Function DLSetMeasureDictGPTSItem(InstanceID, MeasureDictID, ItemIndex: Integer; NewValue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMeasureDictGPTSItem(MeasureDictID, ItemIndex, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetMeasureDictLPTSCount(InstanceID, MeasureDictID, NewCount: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMeasureDictLPTSCount(MeasureDictID, NewCount);
  End
  Else
    Result := 0;
End;

Function DLSetMeasureDictLPTSItem(InstanceID, MeasureDictID, ItemIndex: Integer; NewValue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMeasureDictLPTSItem(MeasureDictID, ItemIndex, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetMeasureDictPDU(InstanceID, MeasureDictID, LinearUnit, AreaUnit, AngularUnit: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMeasureDictPDU(MeasureDictID, LinearUnit, AreaUnit, AngularUnit);
  End
  Else
    Result := 0;
End;

Function DLSetMeasurementUnits(InstanceID, MeasurementUnits: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetMeasurementUnits(MeasurementUnits);
  End
  Else
    Result := 0;
End;

Function DLSetNeedAppearances(InstanceID, NewValue: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetNeedAppearances(NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetObjectFromString(InstanceID, ObjectNumber: Integer; Source: PAnsiChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetObjectFromString(ObjectNumber, InstanceList[I].GetString(Source));
  End
  Else
    Result := 0;
End;

Function DLSetOpenActionDestination(InstanceID, OpenPage, Zoom: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOpenActionDestination(OpenPage, Zoom);
  End
  Else
    Result := 0;
End;

Function DLSetOpenActionDestinationFull(InstanceID, OpenPage, Zoom, DestType: Integer; Left, Top, Right, Bottom: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOpenActionDestinationFull(OpenPage, Zoom, DestType, Left, Top, Right, Bottom);
  End
  Else
    Result := 0;
End;

Function DLSetOpenActionJavaScript(InstanceID: Integer; JavaScript: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOpenActionJavaScript(InstanceList[I].GetWideString(JavaScript));
  End
  Else
    Result := 0;
End;

Function DLSetOpenActionMenu(InstanceID: Integer; MenuItem: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOpenActionMenu(InstanceList[I].GetWideString(MenuItem));
  End
  Else
    Result := 0;
End;

Function DLSetOptionalContentConfigLocked(InstanceID, OptionalContentConfigID, OptionalContentGroupID, NewLocked: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOptionalContentConfigLocked(OptionalContentConfigID, OptionalContentGroupID, NewLocked);
  End
  Else
    Result := 0;
End;

Function DLSetOptionalContentConfigState(InstanceID, OptionalContentConfigID, OptionalContentGroupID, NewState: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOptionalContentConfigState(OptionalContentConfigID, OptionalContentGroupID, NewState);
  End
  Else
    Result := 0;
End;

Function DLSetOptionalContentGroupName(InstanceID, OptionalContentGroupID: Integer; NewGroupName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOptionalContentGroupName(OptionalContentGroupID, InstanceList[I].GetWideString(NewGroupName));
  End
  Else
    Result := 0;
End;

Function DLSetOptionalContentGroupPrintable(InstanceID, OptionalContentGroupID, Printable: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOptionalContentGroupPrintable(OptionalContentGroupID, Printable);
  End
  Else
    Result := 0;
End;

Function DLSetOptionalContentGroupVisible(InstanceID, OptionalContentGroupID, Visible: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOptionalContentGroupVisible(OptionalContentGroupID, Visible);
  End
  Else
    Result := 0;
End;

Function DLSetOrigin(InstanceID, Origin: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOrigin(Origin);
  End
  Else
    Result := 0;
End;

Function DLSetOutlineColor(InstanceID, OutlineID: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineColor(OutlineID, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetOutlineDestination(InstanceID, OutlineID, DestPage: Integer; DestPosition: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineDestination(OutlineID, DestPage, DestPosition);
  End
  Else
    Result := 0;
End;

Function DLSetOutlineDestinationFull(InstanceID, OutlineID, DestPage, Zoom, DestType: Integer; Left, Top, Right, Bottom: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineDestinationFull(OutlineID, DestPage, Zoom, DestType, Left, Top, Right, Bottom);
  End
  Else
    Result := 0;
End;

Function DLSetOutlineDestinationZoom(InstanceID, OutlineID, DestPage: Integer; DestPosition: Double; Zoom: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineDestinationZoom(OutlineID, DestPage, DestPosition, Zoom);
  End
  Else
    Result := 0;
End;

Function DLSetOutlineJavaScript(InstanceID, OutlineID: Integer; JavaScript: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineJavaScript(OutlineID, InstanceList[I].GetWideString(JavaScript));
  End
  Else
    Result := 0;
End;

Function DLSetOutlineNamedDestination(InstanceID, OutlineID: Integer; DestName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineNamedDestination(OutlineID, InstanceList[I].GetWideString(DestName));
  End
  Else
    Result := 0;
End;

Function DLSetOutlineOpenFile(InstanceID, OutlineID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineOpenFile(OutlineID, InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLSetOutlineRemoteDestination(InstanceID, OutlineID: Integer; FileName: PWideChar; OpenPage, Zoom, DestType: Integer;
  PntLeft, PntTop, PntRight, PntBottom: Double; NewWindow: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineRemoteDestination(OutlineID, InstanceList[I].GetWideString(FileName), OpenPage, Zoom, DestType, PntLeft,
      PntTop, PntRight, PntBottom, NewWindow);
  End
  Else
    Result := 0;
End;

Function DLSetOutlineStyle(InstanceID, OutlineID, SetItalic, SetBold: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineStyle(OutlineID, SetItalic, SetBold);
  End
  Else
    Result := 0;
End;

Function DLSetOutlineTitle(InstanceID, OutlineID: Integer; NewTitle: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineTitle(OutlineID, InstanceList[I].GetWideString(NewTitle));
  End
  Else
    Result := 0;
End;

Function DLSetOutlineWebLink(InstanceID, OutlineID: Integer; Link: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOutlineWebLink(OutlineID, InstanceList[I].GetWideString(Link));
  End
  Else
    Result := 0;
End;

Function DLSetOverprint(InstanceID, StrokingOverprint, OtherOverprint, OverprintMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetOverprint(StrokingOverprint, OtherOverprint, OverprintMode);
  End
  Else
    Result := 0;
End;

Function DLSetPDFAMode(InstanceID, NewMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPDFAMode(NewMode);
  End
  Else
    Result := 0;
End;

Function DLSetPNGTransparencyColor(InstanceID, RedByte, GreenByte, BlueByte: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPNGTransparencyColor(RedByte, GreenByte, BlueByte);
  End
  Else
    Result := 0;
End;

Function DLSetPageActionMenu(InstanceID: Integer; MenuItem: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageActionMenu(InstanceList[I].GetWideString(MenuItem));
  End
  Else
    Result := 0;
End;

Function DLSetPageBox(InstanceID, BoxType: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageBox(BoxType, Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLSetPageContentFromString(InstanceID: Integer; Source: PAnsiChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageContentFromString(InstanceList[I].GetString(Source));
  End
  Else
    Result := 0;
End;

Function DLSetPageDimensions(InstanceID: Integer; NewPageWidth, NewPageHeight: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageDimensions(NewPageWidth, NewPageHeight);
  End
  Else
    Result := 0;
End;

Function DLSetPageLayout(InstanceID, NewPageLayout: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageLayout(NewPageLayout);
  End
  Else
    Result := 0;
End;

Function DLSetPageMode(InstanceID, NewPageMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageMode(NewPageMode);
  End
  Else
    Result := 0;
End;

Function DLSetPageSize(InstanceID: Integer; PaperName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageSize(InstanceList[I].GetWideString(PaperName));
  End
  Else
    Result := 0;
End;

Function DLSetPageThumbnail(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageThumbnail;
  End
  Else
    Result := 0;
End;

Function DLSetPageTransparencyGroup(InstanceID, CS, Isolate, Knockout: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageTransparencyGroup(CS, Isolate, Knockout);
  End
  Else
    Result := 0;
End;

Function DLSetPageUserUnit(InstanceID: Integer; UserUnit: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPageUserUnit(UserUnit);
  End
  Else
    Result := 0;
End;

Function DLSetPrecision(InstanceID, NewPrecision: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPrecision(NewPrecision);
  End
  Else
    Result := 0;
End;

Function DLSetPrinterDevModeFromString(InstanceID: Integer; Source: PAnsiChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetPrinterDevModeFromString(InstanceList[I].GetString(Source));
  End
  Else
    Result := 0;
End;

Function DLSetRenderCropType(InstanceID, NewCropType: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetRenderCropType(NewCropType);
  End
  Else
    Result := 0;
End;

Function DLSetRenderDCErasePage(InstanceID, NewErasePage: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetRenderDCErasePage(NewErasePage);
  End
  Else
    Result := 0;
End;

Function DLSetRenderDCOffset(InstanceID, NewOffsetX, NewOffsetY: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetRenderDCOffset(NewOffsetX, NewOffsetY);
  End
  Else
    Result := 0;
End;

Function DLSetRenderOptions(InstanceID, OptionID, NewValue: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetRenderOptions(OptionID, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetRenderScale(InstanceID: Integer; NewScale: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetRenderScale(NewScale);
  End
  Else
    Result := 0;
End;

Function DLSetScale(InstanceID: Integer; NewScale: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetScale(NewScale);
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessCustomSubFilter(InstanceID, SignProcessID: Integer; SubFilterStr: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessCustomSubFilter(SignProcessID, InstanceList[I].GetWideString(SubFilterStr));
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessField(InstanceID, SignProcessID: Integer; SignatureFieldName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessField(SignProcessID, InstanceList[I].GetWideString(SignatureFieldName));
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessFieldBounds(InstanceID, SignProcessID: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessFieldBounds(SignProcessID, Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessFieldImageFromFile(InstanceID, SignProcessID: Integer; ImageFileName: PWideChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessFieldImageFromFile(SignProcessID, InstanceList[I].GetWideString(ImageFileName), Options);
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessFieldPage(InstanceID, SignProcessID, SignaturePage: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessFieldPage(SignProcessID, SignaturePage);
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessInfo(InstanceID, SignProcessID: Integer; Reason, Location, ContactInfo: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessInfo(SignProcessID, InstanceList[I].GetWideString(Reason), InstanceList[I].GetWideString(Location),
      InstanceList[I].GetWideString(ContactInfo));
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessKeyset(InstanceID, SignProcessID, KeysetID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessKeyset(SignProcessID, KeysetID);
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessPFXFromFile(InstanceID, SignProcessID: Integer; PFXFileName, PFXPassword: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessPFXFromFile(SignProcessID, InstanceList[I].GetWideString(PFXFileName),
      InstanceList[I].GetWideString(PFXPassword));
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessPassthrough(InstanceID, SignProcessID, SignatureLength: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessPassthrough(SignProcessID, SignatureLength);
  End
  Else
    Result := 0;
End;

Function DLSetSignProcessSubFilter(InstanceID, SignProcessID, SubFilter: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetSignProcessSubFilter(SignProcessID, SubFilter);
  End
  Else
    Result := 0;
End;

Function DLSetTabOrderMode(InstanceID: Integer; Mode: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTabOrderMode(InstanceList[I].GetWideString(Mode));
  End
  Else
    Result := 0;
End;

Function DLSetTableBorderColor(InstanceID, TableID, BorderIndex: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableBorderColor(TableID, BorderIndex, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetTableBorderColorCMYK(InstanceID, TableID, BorderIndex: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableBorderColorCMYK(TableID, BorderIndex, C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetTableBorderWidth(InstanceID, TableID, BorderIndex: Integer; NewWidth: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableBorderWidth(TableID, BorderIndex, NewWidth);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellAlignment(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn, NewCellAlignment: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellAlignment(TableID, FirstRow, FirstColumn, LastRow, LastColumn, NewCellAlignment);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellBackgroundColor(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellBackgroundColor(TableID, FirstRow, FirstColumn, LastRow, LastColumn, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellBackgroundColorCMYK(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellBackgroundColorCMYK(TableID, FirstRow, FirstColumn, LastRow, LastColumn, C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellBorderColor(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn, BorderIndex: Integer; Red, Green, Blue: Double)
  : Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellBorderColor(TableID, FirstRow, FirstColumn, LastRow, LastColumn, BorderIndex, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellBorderColorCMYK(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn, BorderIndex: Integer; C, M, Y, K: Double)
  : Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellBorderColorCMYK(TableID, FirstRow, FirstColumn, LastRow, LastColumn, BorderIndex, C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellBorderWidth(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn, BorderIndex: Integer; NewWidth: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellBorderWidth(TableID, FirstRow, FirstColumn, LastRow, LastColumn, BorderIndex, NewWidth);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellContent(InstanceID, TableID, RowNumber, ColumnNumber: Integer; HTMLText: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellContent(TableID, RowNumber, ColumnNumber, InstanceList[I].GetWideString(HTMLText));
  End
  Else
    Result := 0;
End;

Function DLSetTableCellPadding(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn, BorderIndex: Integer; NewPadding: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellPadding(TableID, FirstRow, FirstColumn, LastRow, LastColumn, BorderIndex, NewPadding);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellTextColor(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellTextColor(TableID, FirstRow, FirstColumn, LastRow, LastColumn, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellTextColorCMYK(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellTextColorCMYK(TableID, FirstRow, FirstColumn, LastRow, LastColumn, C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetTableCellTextSize(InstanceID, TableID, FirstRow, FirstColumn, LastRow, LastColumn: Integer; NewTextSize: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableCellTextSize(TableID, FirstRow, FirstColumn, LastRow, LastColumn, NewTextSize);
  End
  Else
    Result := 0;
End;

Function DLSetTableColumnWidth(InstanceID, TableID, FirstColumn, LastColumn: Integer; NewWidth: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableColumnWidth(TableID, FirstColumn, LastColumn, NewWidth);
  End
  Else
    Result := 0;
End;

Function DLSetTableRowHeight(InstanceID, TableID, FirstRow, LastRow: Integer; NewHeight: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableRowHeight(TableID, FirstRow, LastRow, NewHeight);
  End
  Else
    Result := 0;
End;

Function DLSetTableThinBorders(InstanceID, TableID, ThinBorders: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableThinBorders(TableID, ThinBorders, Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetTableThinBordersCMYK(InstanceID, TableID, ThinBorders: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTableThinBordersCMYK(TableID, ThinBorders, C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetTempFile(InstanceID: Integer; FileName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTempFile(InstanceList[I].GetWideString(FileName));
  End
  Else
    Result := 0;
End;

Function DLSetTempPath(InstanceID: Integer; NewPath: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTempPath(InstanceList[I].GetWideString(NewPath));
  End
  Else
    Result := 0;
End;

Function DLSetTextAlign(InstanceID, TextAlign: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextAlign(TextAlign);
  End
  Else
    Result := 0;
End;

Function DLSetTextCharSpacing(InstanceID: Integer; CharSpacing: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextCharSpacing(CharSpacing);
  End
  Else
    Result := 0;
End;

Function DLSetTextColor(InstanceID: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextColor(Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetTextColorCMYK(InstanceID: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextColorCMYK(C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetTextColorSep(InstanceID: Integer; ColorName: PWideChar; Tint: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextColorSep(InstanceList[I].GetWideString(ColorName), Tint);
  End
  Else
    Result := 0;
End;

Function DLSetTextExtractionArea(InstanceID: Integer; Left, Top, Width, Height: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextExtractionArea(Left, Top, Width, Height);
  End
  Else
    Result := 0;
End;

Function DLSetTextExtractionOptions(InstanceID, OptionID, NewValue: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextExtractionOptions(OptionID, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetTextExtractionScaling(InstanceID, Options: Integer; Horizontal, Vertical: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextExtractionScaling(Options, Horizontal, Vertical);
  End
  Else
    Result := 0;
End;

Function DLSetTextExtractionWordGap(InstanceID: Integer; NewWordGap: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextExtractionWordGap(NewWordGap);
  End
  Else
    Result := 0;
End;

Function DLSetTextHighlight(InstanceID, Highlight: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextHighlight(Highlight);
  End
  Else
    Result := 0;
End;

Function DLSetTextHighlightColor(InstanceID: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextHighlightColor(Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetTextHighlightColorCMYK(InstanceID: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextHighlightColorCMYK(C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetTextHighlightColorSep(InstanceID: Integer; ColorName: PWideChar; Tint: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextHighlightColorSep(InstanceList[I].GetWideString(ColorName), Tint);
  End
  Else
    Result := 0;
End;

Function DLSetTextMode(InstanceID, TextMode: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextMode(TextMode);
  End
  Else
    Result := 0;
End;

Function DLSetTextRise(InstanceID: Integer; Rise: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextRise(Rise);
  End
  Else
    Result := 0;
End;

Function DLSetTextScaling(InstanceID: Integer; ScalePercentage: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextScaling(ScalePercentage);
  End
  Else
    Result := 0;
End;

Function DLSetTextShader(InstanceID: Integer; ShaderName: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextShader(InstanceList[I].GetWideString(ShaderName));
  End
  Else
    Result := 0;
End;

Function DLSetTextSize(InstanceID: Integer; TextSize: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextSize(TextSize);
  End
  Else
    Result := 0;
End;

Function DLSetTextSpacing(InstanceID: Integer; Spacing: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextSpacing(Spacing);
  End
  Else
    Result := 0;
End;

Function DLSetTextUnderline(InstanceID, Underline: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextUnderline(Underline);
  End
  Else
    Result := 0;
End;

Function DLSetTextUnderlineColor(InstanceID: Integer; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextUnderlineColor(Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetTextUnderlineColorCMYK(InstanceID: Integer; C, M, Y, K: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextUnderlineColorCMYK(C, M, Y, K);
  End
  Else
    Result := 0;
End;

Function DLSetTextUnderlineColorSep(InstanceID: Integer; ColorName: PWideChar; Tint: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextUnderlineColorSep(InstanceList[I].GetWideString(ColorName), Tint);
  End
  Else
    Result := 0;
End;

Function DLSetTextUnderlineCustomDash(InstanceID: Integer; DashPattern: PWideChar; DashPhase: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextUnderlineCustomDash(InstanceList[I].GetWideString(DashPattern), DashPhase);
  End
  Else
    Result := 0;
End;

Function DLSetTextUnderlineDash(InstanceID: Integer; DashOn, DashOff: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextUnderlineDash(DashOn, DashOff);
  End
  Else
    Result := 0;
End;

Function DLSetTextUnderlineDistance(InstanceID: Integer; UnderlineDistance: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextUnderlineDistance(UnderlineDistance);
  End
  Else
    Result := 0;
End;

Function DLSetTextUnderlineWidth(InstanceID: Integer; UnderlineWidth: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextUnderlineWidth(UnderlineWidth);
  End
  Else
    Result := 0;
End;

Function DLSetTextWordSpacing(InstanceID: Integer; WordSpacing: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTextWordSpacing(WordSpacing);
  End
  Else
    Result := 0;
End;

Function DLSetTransparency(InstanceID, Transparency: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetTransparency(Transparency);
  End
  Else
    Result := 0;
End;

Function DLSetViewerPreferences(InstanceID, Option, NewValue: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetViewerPreferences(Option, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSetXFAFormFieldAccess(InstanceID: Integer; XFAFieldName: PWideChar; NewAccess: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetXFAFormFieldAccess(InstanceList[I].GetWideString(XFAFieldName), NewAccess);
  End
  Else
    Result := 0;
End;

Function DLSetXFAFormFieldBorderColor(InstanceID: Integer; XFAFieldName: PWideChar; Red, Green, Blue: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetXFAFormFieldBorderColor(InstanceList[I].GetWideString(XFAFieldName), Red, Green, Blue);
  End
  Else
    Result := 0;
End;

Function DLSetXFAFormFieldBorderPresence(InstanceID: Integer; XFAFieldName: PWideChar; NewPresence: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetXFAFormFieldBorderPresence(InstanceList[I].GetWideString(XFAFieldName), NewPresence);
  End
  Else
    Result := 0;
End;

Function DLSetXFAFormFieldBorderWidth(InstanceID: Integer; XFAFieldName: PWideChar; BorderWidth: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetXFAFormFieldBorderWidth(InstanceList[I].GetWideString(XFAFieldName), BorderWidth);
  End
  Else
    Result := 0;
End;

Function DLSetXFAFormFieldValue(InstanceID: Integer; XFAFieldName, NewValue: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetXFAFormFieldValue(InstanceList[I].GetWideString(XFAFieldName), InstanceList[I].GetWideString(NewValue));
  End
  Else
    Result := 0;
End;

Function DLSetXFAFromString(InstanceID: Integer; Source: PAnsiChar; Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetXFAFromString(InstanceList[I].GetString(Source), Options);
  End
  Else
    Result := 0;
End;

Function DLSetupPrinter(InstanceID: Integer; CustomPrinterName: PWideChar; Setting, NewValue: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SetupPrinter(InstanceList[I].GetWideString(CustomPrinterName), Setting, NewValue);
  End
  Else
    Result := 0;
End;

Function DLSignFile(InstanceID: Integer; InputFileName, OpenPassword, SignatureFieldName, OutputFileName, PFXFileName, PFXPassword, Reason, Location,
  ContactInfo: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SignFile(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(OpenPassword),
      InstanceList[I].GetWideString(SignatureFieldName), InstanceList[I].GetWideString(OutputFileName), InstanceList[I].GetWideString(PFXFileName),
      InstanceList[I].GetWideString(PFXPassword), InstanceList[I].GetWideString(Reason), InstanceList[I].GetWideString(Location),
      InstanceList[I].GetWideString(ContactInfo));
  End
  Else
    Result := 0;
End;

Function DLSplitPageText(InstanceID, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.SplitPageText(Options);
  End
  Else
    Result := 0;
End;

Function DLStartPath(InstanceID: Integer; StartX, StartY: Double): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.StartPath(StartX, StartY);
  End
  Else
    Result := 0;
End;

Function DLStoreCustomDataFromFile(InstanceID: Integer; Key, FileName: PWideChar; Location, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.StoreCustomDataFromFile(InstanceList[I].GetWideString(Key), InstanceList[I].GetWideString(FileName), Location,
      Options);
  End
  Else
    Result := 0;
End;

Function DLStoreCustomDataFromString(InstanceID: Integer; Key, NewValue: PAnsiChar; Location, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.StoreCustomDataFromString(InstanceList[I].GetString(Key), InstanceList[I].GetString(NewValue), Location, Options);
  End
  Else
    Result := 0;
End;

Function DLStringResultLength(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := Length(InstanceList[I].WideReturnString);
  End
  Else
    Result := 0;
End;

Function DLTestTempPath(InstanceID: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.TestTempPath;
  End
  Else
    Result := 0;
End;

Function DLTransformFile(InstanceID: Integer; InputFileName, Password, OutputFileName: PWideChar; TransformType, Options: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.TransformFile(InstanceList[I].GetWideString(InputFileName), InstanceList[I].GetWideString(Password),
      InstanceList[I].GetWideString(OutputFileName), TransformType, Options);
  End
  Else
    Result := 0;
End;

Function DLUpdateAndFlattenFormField(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.UpdateAndFlattenFormField(Index);
  End
  Else
    Result := 0;
End;

Function DLUpdateAppearanceStream(InstanceID, Index: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.UpdateAppearanceStream(Index);
  End
  Else
    Result := 0;
End;

Function DLUpdateTrueTypeSubsettedFont(InstanceID: Integer; SubsetChars: PWideChar): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.UpdateTrueTypeSubsettedFont(InstanceList[I].GetWideString(SubsetChars));
  End
  Else
    Result := 0;
End;

Function DLUseKerning(InstanceID, Kern: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.UseKerning(Kern);
  End
  Else
    Result := 0;
End;

Function DLUseUnsafeContentStreams(InstanceID, SafetyLevel: Integer): Integer; Cdecl;
Var
  I: Integer;
Begin
  If FindInstance(InstanceID, I) Then
  Begin
    Result := InstanceList[I].PDFlibrary.UseUnsafeContentStreams(SafetyLevel);
  End
  Else
    Result := 0;
End;

Procedure InitLibrary;
Begin
  CriticalSection := TCriticalSection.Create;
  CriticalSection.Enter;
  Try
    SetLength(InstanceList, 0);
  Finally
    CriticalSection.Leave;
  End;
End;

Procedure FinalizeLibrary;
Begin
  CriticalSection.Enter;
  Try
    While Length(InstanceList) > 0 Do
    Begin
      If Assigned(InstanceList[Length(InstanceList) - 1]) Then
        InstanceList[Length(InstanceList) - 1].Free;
      SetLength(InstanceList, Length(InstanceList) - 1);
    End;
  Finally
    CriticalSection.Leave;
  End;
  CriticalSection.Free;
End;

Exports
  DLAddArcToPath Name '_DLAddArcToPath', DLAddBoxToPath Name '_DLAddBoxToPath',
  DLAddCJKFont Name '_DLAddCJKFont', DLAddCurveToPath Name '_DLAddCurveToPath',
  DLAddEmbeddedFile Name '_DLAddEmbeddedFile',
  DLAddFileAttachment Name '_DLAddFileAttachment',
  DLAddFormFieldChoiceSub Name '_DLAddFormFieldChoiceSub',
  DLAddFormFieldSub Name '_DLAddFormFieldSub',
  DLAddFormFont Name '_DLAddFormFont',
  DLAddFreeTextAnnotation Name '_DLAddFreeTextAnnotation',
  DLAddFreeTextAnnotationEx Name '_DLAddFreeTextAnnotationEx',
  DLAddGlobalJavaScript Name '_DLAddGlobalJavaScript',
  DLAddImageFromFile Name '_DLAddImageFromFile',
  DLAddImageFromFileOffset Name '_DLAddImageFromFileOffset',
  DLAddImageFromString Name '_DLAddImageFromString',
  DLAddLGIDictToPage Name '_DLAddLGIDictToPage',
  DLAddLineToPath Name '_DLAddLineToPath',
  DLAddLinkToDestination Name '_DLAddLinkToDestination',
  DLAddLinkToEmbeddedFile Name '_DLAddLinkToEmbeddedFile',
  DLAddLinkToFile Name '_DLAddLinkToFile',
  DLAddLinkToFileDest Name '_DLAddLinkToFileDest',
  DLAddLinkToFileEx Name '_DLAddLinkToFileEx',
  DLAddLinkToJavaScript Name '_DLAddLinkToJavaScript',
  DLAddLinkToLocalFile Name '_DLAddLinkToLocalFile',
  DLAddLinkToPage Name '_DLAddLinkToPage',
  DLAddLinkToWeb Name '_DLAddLinkToWeb',
  DLAddNoteAnnotation Name '_DLAddNoteAnnotation',
  DLAddOpenTypeFontFromFile Name '_DLAddOpenTypeFontFromFile',
  DLAddPageLabels Name '_DLAddPageLabels',
  DLAddPageMatrix Name '_DLAddPageMatrix',
  DLAddRelativeLinkToFile Name '_DLAddRelativeLinkToFile',
  DLAddRelativeLinkToFileDest Name '_DLAddRelativeLinkToFileDest',
  DLAddRelativeLinkToFileEx Name '_DLAddRelativeLinkToFileEx',
  DLAddRelativeLinkToLocalFile Name '_DLAddRelativeLinkToLocalFile',
  DLAddSVGAnnotationFromFile Name '_DLAddSVGAnnotationFromFile',
  DLAddSWFAnnotationFromFile Name '_DLAddSWFAnnotationFromFile',
  DLAddSeparationColor Name '_DLAddSeparationColor',
  DLAddStampAnnotation Name '_DLAddStampAnnotation',
  DLAddStampAnnotationFromImage Name '_DLAddStampAnnotationFromImage',
  DLAddStampAnnotationFromImageID Name '_DLAddStampAnnotationFromImageID',
  DLAddStandardFont Name '_DLAddStandardFont',
  DLAddSubsettedFont Name '_DLAddSubsettedFont',
  DLAddTextMarkupAnnotation Name '_DLAddTextMarkupAnnotation',
  DLAddToBuffer Name '_DLAddToBuffer', DLAddToFileList Name '_DLAddToFileList',
  DLAddTrueTypeFont Name '_DLAddTrueTypeFont',
  DLAddTrueTypeFontFromFile Name '_DLAddTrueTypeFontFromFile',
  DLAddTrueTypeSubsettedFont Name '_DLAddTrueTypeSubsettedFont',
  DLAddType1Font Name '_DLAddType1Font',
  DLAddU3DAnnotationFromFile Name '_DLAddU3DAnnotationFromFile',
  DLAnalyseFile Name '_DLAnalyseFile',
  DLAnnotationCount Name '_DLAnnotationCount',
  DLAnsiStringResultLength Name '_DLAnsiStringResultLength',
  DLAppendSpace Name '_DLAppendSpace',
  DLAppendTableColumns Name '_DLAppendTableColumns',
  DLAppendTableRows Name '_DLAppendTableRows',
  DLAppendText Name '_DLAppendText', DLAppendToFile Name '_DLAppendToFile',
  DLAppendToString Name '_DLAppendToString', DLApplyStyle Name '_DLApplyStyle',
  DLAttachAnnotToForm Name '_DLAttachAnnotToForm',
  DLBalanceContentStream Name '_DLBalanceContentStream',
  DLBalancePageTree Name '_DLBalancePageTree',
  DLBeginPageUpdate Name '_DLBeginPageUpdate',
  DLCapturePage Name '_DLCapturePage', DLCapturePageEx Name '_DLCapturePageEx',
  DLCharWidth Name '_DLCharWidth',
  DLCheckFileCompliance Name '_DLCheckFileCompliance',
  DLCheckObjects Name '_DLCheckObjects',
  DLCheckPageAnnots Name '_DLCheckPageAnnots',
  DLCheckPassword Name '_DLCheckPassword',
  DLClearFileList Name '_DLClearFileList', DLClearImage Name '_DLClearImage',
  DLClearPageLabels Name '_DLClearPageLabels',
  DLClearTextFormatting Name '_DLClearTextFormatting',
  DLCloneOutlineAction Name '_DLCloneOutlineAction',
  DLClonePages Name '_DLClonePages', DLCloseOutline Name '_DLCloseOutline',
  DLClosePath Name '_DLClosePath',
  DLCombineContentStreams Name '_DLCombineContentStreams',
  DLCompareOutlines Name '_DLCompareOutlines',
  DLCompressContent Name '_DLCompressContent',
  DLCompressFonts Name '_DLCompressFonts',
  DLCompressImages Name '_DLCompressImages',
  DLCompressPage Name '_DLCompressPage',
  DLContentStreamCount Name '_DLContentStreamCount',
  DLContentStreamSafe Name '_DLContentStreamSafe',
  DLCopyPageRanges Name '_DLCopyPageRanges',
  DLCopyPageRangesEx Name '_DLCopyPageRangesEx',
  DLCreateBuffer Name '_DLCreateBuffer',
  DLCreateLibrary Name '_DLCreateLibrary',
  DLCreateNewObject Name '_DLCreateNewObject',
  DLCreateTable Name '_DLCreateTable', DLDAAppendFile Name '_DLDAAppendFile',
  DLDACapturePage Name '_DLDACapturePage',
  DLDACapturePageEx Name '_DLDACapturePageEx',
  DLDACloseFile Name '_DLDACloseFile',
  DLDADrawCapturedPage Name '_DLDADrawCapturedPage',
  DLDADrawRotatedCapturedPage Name '_DLDADrawRotatedCapturedPage',
  DLDAEmbedFileStreams Name '_DLDAEmbedFileStreams',
  DLDAExtractPageText Name '_DLDAExtractPageText',
  DLDAExtractPageTextBlocks Name '_DLDAExtractPageTextBlocks',
  DLDAFindPage Name '_DLDAFindPage',
  DLDAGetAnnotationCount Name '_DLDAGetAnnotationCount',
  DLDAGetFormFieldCount Name '_DLDAGetFormFieldCount',
  DLDAGetFormFieldTitle Name '_DLDAGetFormFieldTitle',
  DLDAGetFormFieldValue Name '_DLDAGetFormFieldValue',
  DLDAGetImageDataToString Name '_DLDAGetImageDataToString',
  DLDAGetImageDblProperty Name '_DLDAGetImageDblProperty',
  DLDAGetImageIntProperty Name '_DLDAGetImageIntProperty',
  DLDAGetImageListCount Name '_DLDAGetImageListCount',
  DLDAGetInformation Name '_DLDAGetInformation',
  DLDAGetObjectCount Name '_DLDAGetObjectCount',
  DLDAGetObjectToString Name '_DLDAGetObjectToString',
  DLDAGetPageBox Name '_DLDAGetPageBox',
  DLDAGetPageContentToString Name '_DLDAGetPageContentToString',
  DLDAGetPageCount Name '_DLDAGetPageCount',
  DLDAGetPageHeight Name '_DLDAGetPageHeight',
  DLDAGetPageImageList Name '_DLDAGetPageImageList',
  DLDAGetPageWidth Name '_DLDAGetPageWidth',
  DLDAGetTextBlockAsString Name '_DLDAGetTextBlockAsString',
  DLDAGetTextBlockBound Name '_DLDAGetTextBlockBound',
  DLDAGetTextBlockCharWidth Name '_DLDAGetTextBlockCharWidth',
  DLDAGetTextBlockColor Name '_DLDAGetTextBlockColor',
  DLDAGetTextBlockColorType Name '_DLDAGetTextBlockColorType',
  DLDAGetTextBlockCount Name '_DLDAGetTextBlockCount',
  DLDAGetTextBlockFontName Name '_DLDAGetTextBlockFontName',
  DLDAGetTextBlockFontSize Name '_DLDAGetTextBlockFontSize',
  DLDAGetTextBlockText Name '_DLDAGetTextBlockText',
  DLDAHasPageBox Name '_DLDAHasPageBox', DLDAHidePage Name '_DLDAHidePage',
  DLDAMovePage Name '_DLDAMovePage', DLDANewPage Name '_DLDANewPage',
  DLDANewPages Name '_DLDANewPages',
  DLDANormalizePage Name '_DLDANormalizePage',
  DLDAOpenFile Name '_DLDAOpenFile',
  DLDAOpenFileReadOnly Name '_DLDAOpenFileReadOnly',
  DLDAPageRotation Name '_DLDAPageRotation',
  DLDAReleaseImageList Name '_DLDAReleaseImageList',
  DLDAReleaseTextBlocks Name '_DLDAReleaseTextBlocks',
  DLDARemoveUsageRights Name '_DLDARemoveUsageRights',
  DLDARenderPageToDC Name '_DLDARenderPageToDC',
  DLDARenderPageToFile Name '_DLDARenderPageToFile',
  DLDARenderPageToString Name '_DLDARenderPageToString',
  DLDARotatePage Name '_DLDARotatePage', DLDASaveAsFile Name '_DLDASaveAsFile',
  DLDASaveImageDataToFile Name '_DLDASaveImageDataToFile',
  DLDASetInformation Name '_DLDASetInformation',
  DLDASetPageBox Name '_DLDASetPageBox',
  DLDASetPageLayout Name '_DLDASetPageLayout',
  DLDASetPageMode Name '_DLDASetPageMode',
  DLDASetPageSize Name '_DLDASetPageSize',
  DLDASetTextExtractionArea Name '_DLDASetTextExtractionArea',
  DLDASetTextExtractionOptions Name '_DLDASetTextExtractionOptions',
  DLDASetTextExtractionScaling Name '_DLDASetTextExtractionScaling',
  DLDASetTextExtractionWordGap Name '_DLDASetTextExtractionWordGap',
  DLDAShiftedHeader Name '_DLDAShiftedHeader', DLDecrypt Name '_DLDecrypt',
  DLDecryptFile Name '_DLDecryptFile',
  DLDeleteAnalysis Name '_DLDeleteAnalysis',
  DLDeleteAnnotation Name '_DLDeleteAnnotation',
  DLDeleteContentStream Name '_DLDeleteContentStream',
  DLDeleteFormField Name '_DLDeleteFormField',
  DLDeleteOptionalContentGroup Name '_DLDeleteOptionalContentGroup',
  DLDeletePageLGIDict Name '_DLDeletePageLGIDict',
  DLDeletePages Name '_DLDeletePages',
  DLDocJavaScriptAction Name '_DLDocJavaScriptAction',
  DLDocumentCount Name '_DLDocumentCount', DLDrawArc Name '_DLDrawArc',
  DLDrawBarcode Name '_DLDrawBarcode', DLDrawBox Name '_DLDrawBox',
  DLDrawCapturedPage Name '_DLDrawCapturedPage',
  DLDrawCapturedPageMatrix Name '_DLDrawCapturedPageMatrix',
  DLDrawCircle Name '_DLDrawCircle',
  DLDrawDataMatrixSymbol Name '_DLDrawDataMatrixSymbol',
  DLDrawEllipse Name '_DLDrawEllipse',
  DLDrawEllipticArc Name '_DLDrawEllipticArc',
  DLDrawHTMLText Name '_DLDrawHTMLText',
  DLDrawHTMLTextBox Name '_DLDrawHTMLTextBox',
  DLDrawHTMLTextBoxMatrix Name '_DLDrawHTMLTextBoxMatrix',
  DLDrawHTMLTextMatrix Name '_DLDrawHTMLTextMatrix',
  DLDrawImage Name '_DLDrawImage', DLDrawImageMatrix Name '_DLDrawImageMatrix',
  DLDrawIntelligentMailBarcode Name '_DLDrawIntelligentMailBarcode',
  DLDrawLine Name '_DLDrawLine',
  DLDrawMultiLineText Name '_DLDrawMultiLineText',
  DLDrawPDF417Symbol Name '_DLDrawPDF417Symbol',
  DLDrawPDF417SymbolEx Name '_DLDrawPDF417SymbolEx',
  DLDrawPath Name '_DLDrawPath', DLDrawPathEvenOdd Name '_DLDrawPathEvenOdd',
  DLDrawPostScriptXObject Name '_DLDrawPostScriptXObject',
  DLDrawQRCode Name '_DLDrawQRCode', DLDrawRotatedBox Name '_DLDrawRotatedBox',
  DLDrawRotatedCapturedPage Name '_DLDrawRotatedCapturedPage',
  DLDrawRotatedImage Name '_DLDrawRotatedImage',
  DLDrawRotatedMultiLineText Name '_DLDrawRotatedMultiLineText',
  DLDrawRotatedText Name '_DLDrawRotatedText',
  DLDrawRotatedTextBox Name '_DLDrawRotatedTextBox',
  DLDrawRotatedTextBoxEx Name '_DLDrawRotatedTextBoxEx',
  DLDrawRoundedBox Name '_DLDrawRoundedBox',
  DLDrawRoundedRotatedBox Name '_DLDrawRoundedRotatedBox',
  DLDrawScaledImage Name '_DLDrawScaledImage',
  DLDrawSpacedText Name '_DLDrawSpacedText',
  DLDrawTableRows Name '_DLDrawTableRows', DLDrawText Name '_DLDrawText',
  DLDrawTextArc Name '_DLDrawTextArc', DLDrawTextBox Name '_DLDrawTextBox',
  DLDrawTextBoxMatrix Name '_DLDrawTextBoxMatrix',
  DLDrawWrappedText Name '_DLDrawWrappedText',
  DLEditableContentStream Name '_DLEditableContentStream',
  DLEmbedFile Name '_DLEmbedFile',
  DLEmbeddedFileCount Name '_DLEmbeddedFileCount',
  DLEncapsulateContentStream Name '_DLEncapsulateContentStream',
  DLEncodePermissions Name '_DLEncodePermissions', DLEncrypt Name '_DLEncrypt',
  DLEncryptFile Name '_DLEncryptFile',
  DLEncryptWithFingerprint Name '_DLEncryptWithFingerprint',
  DLEncryptionAlgorithm Name '_DLEncryptionAlgorithm',
  DLEncryptionStatus Name '_DLEncryptionStatus',
  DLEncryptionStrength Name '_DLEncryptionStrength',
  DLEndPageUpdate Name '_DLEndPageUpdate',
  DLEndSignProcessToFile Name '_DLEndSignProcessToFile',
  DLEndSignProcessToString Name '_DLEndSignProcessToString',
  DLExtractFilePageContentToString Name '_DLExtractFilePageContentToString',
  DLExtractFilePageText Name '_DLExtractFilePageText',
  DLExtractFilePageTextBlocks Name '_DLExtractFilePageTextBlocks',
  DLExtractFilePages Name '_DLExtractFilePages',
  DLExtractFilePagesEx Name '_DLExtractFilePagesEx',
  DLExtractPageRanges Name '_DLExtractPageRanges',
  DLExtractPageTextBlocks Name '_DLExtractPageTextBlocks',
  DLExtractPages Name '_DLExtractPages',
  DLFileListCount Name '_DLFileListCount',
  DLFileListItem Name '_DLFileListItem', DLFindFonts Name '_DLFindFonts',
  DLFindFormFieldByTitle Name '_DLFindFormFieldByTitle',
  DLFindImages Name '_DLFindImages', DLFitImage Name '_DLFitImage',
  DLFitRotatedTextBox Name '_DLFitRotatedTextBox',
  DLFitTextBox Name '_DLFitTextBox', DLFlattenAnnot Name '_DLFlattenAnnot',
  DLFlattenFormField Name '_DLFlattenFormField',
  DLFontCount Name '_DLFontCount', DLFontFamily Name '_DLFontFamily',
  DLFontHasKerning Name '_DLFontHasKerning', DLFontName Name '_DLFontName',
  DLFontReference Name '_DLFontReference', DLFontSize Name '_DLFontSize',
  DLFontType Name '_DLFontType', DLFormFieldCount Name '_DLFormFieldCount',
  DLFormFieldHasParent Name '_DLFormFieldHasParent',
  DLFormFieldJavaScriptAction Name '_DLFormFieldJavaScriptAction',
  DLFormFieldWebLinkAction Name '_DLFormFieldWebLinkAction',
  DLGetActionDest Name '_DLGetActionDest',
  DLGetActionType Name '_DLGetActionType',
  DLGetActionURL Name '_DLGetActionURL',
  DLGetAnalysisInfo Name '_DLGetAnalysisInfo',
  DLGetAnnotActionID Name '_DLGetAnnotActionID',
  DLGetAnnotDblProperty Name '_DLGetAnnotDblProperty',
  DLGetAnnotDest Name '_DLGetAnnotDest',
  DLGetAnnotEmbeddedFileName Name '_DLGetAnnotEmbeddedFileName',
  DLGetAnnotEmbeddedFileToFile Name '_DLGetAnnotEmbeddedFileToFile',
  DLGetAnnotEmbeddedFileToString Name '_DLGetAnnotEmbeddedFileToString',
  DLGetAnnotIntProperty Name '_DLGetAnnotIntProperty',
  DLGetAnnotQuadCount Name '_DLGetAnnotQuadCount',
  DLGetAnnotQuadPoints Name '_DLGetAnnotQuadPoints',
  DLGetAnnotSoundToFile Name '_DLGetAnnotSoundToFile',
  DLGetAnnotSoundToString Name '_DLGetAnnotSoundToString',
  DLGetAnnotStrProperty Name '_DLGetAnnotStrProperty',
  DLGetBarcodeWidth Name '_DLGetBarcodeWidth',
  DLGetBaseURL Name '_DLGetBaseURL', DLGetCSDictEPSG Name '_DLGetCSDictEPSG',
  DLGetCSDictType Name '_DLGetCSDictType',
  DLGetCSDictWKT Name '_DLGetCSDictWKT', DLGetCanvasDC Name '_DLGetCanvasDC',
  DLGetCanvasDCEx Name '_DLGetCanvasDCEx',
  DLGetCatalogInformation Name '_DLGetCatalogInformation',
  DLGetContentStreamToString Name '_DLGetContentStreamToString',
  DLGetCustomInformation Name '_DLGetCustomInformation',
  DLGetCustomKeys Name '_DLGetCustomKeys',
  DLGetDefaultPrinterName Name '_DLGetDefaultPrinterName',
  DLGetDestName Name '_DLGetDestName', DLGetDestPage Name '_DLGetDestPage',
  DLGetDestType Name '_DLGetDestType', DLGetDestValue Name '_DLGetDestValue',
  DLGetDocJavaScript Name '_DLGetDocJavaScript',
  DLGetDocumentFileName Name '_DLGetDocumentFileName',
  DLGetDocumentFileSize Name '_DLGetDocumentFileSize',
  DLGetDocumentID Name '_DLGetDocumentID',
  DLGetDocumentIdentifier Name '_DLGetDocumentIdentifier',
  DLGetDocumentMetadata Name '_DLGetDocumentMetadata',
  DLGetDocumentRepaired Name '_DLGetDocumentRepaired',
  DLGetDocumentResourceList Name '_DLGetDocumentResourceList',
  DLGetEmbeddedFileContentToFile Name '_DLGetEmbeddedFileContentToFile',
  DLGetEmbeddedFileContentToString Name '_DLGetEmbeddedFileContentToString',
  DLGetEmbeddedFileID Name '_DLGetEmbeddedFileID',
  DLGetEmbeddedFileIntProperty Name '_DLGetEmbeddedFileIntProperty',
  DLGetEmbeddedFileStrProperty Name '_DLGetEmbeddedFileStrProperty',
  DLGetEncryptionFingerprint Name '_DLGetEncryptionFingerprint',
  DLGetFileMetadata Name '_DLGetFileMetadata',
  DLGetFirstChildOutline Name '_DLGetFirstChildOutline',
  DLGetFirstOutline Name '_DLGetFirstOutline',
  DLGetFontEncoding Name '_DLGetFontEncoding',
  DLGetFontFlags Name '_DLGetFontFlags', DLGetFontID Name '_DLGetFontID',
  DLGetFontIsEmbedded Name '_DLGetFontIsEmbedded',
  DLGetFontIsSubsetted Name '_DLGetFontIsSubsetted',
  DLGetFontMetrics Name '_DLGetFontMetrics',
  DLGetFontObjectNumber Name '_DLGetFontObjectNumber',
  DLGetFormFieldActionID Name '_DLGetFormFieldActionID',
  DLGetFormFieldAlignment Name '_DLGetFormFieldAlignment',
  DLGetFormFieldAnnotFlags Name '_DLGetFormFieldAnnotFlags',
  DLGetFormFieldBackgroundColor Name '_DLGetFormFieldBackgroundColor',
  DLGetFormFieldBackgroundColorType Name '_DLGetFormFieldBackgroundColorType',
  DLGetFormFieldBorderColor Name '_DLGetFormFieldBorderColor',
  DLGetFormFieldBorderColorType Name '_DLGetFormFieldBorderColorType',
  DLGetFormFieldBorderProperty Name '_DLGetFormFieldBorderProperty',
  DLGetFormFieldBorderStyle Name '_DLGetFormFieldBorderStyle',
  DLGetFormFieldBound Name '_DLGetFormFieldBound',
  DLGetFormFieldCaption Name '_DLGetFormFieldCaption',
  DLGetFormFieldCaptionEx Name '_DLGetFormFieldCaptionEx',
  DLGetFormFieldCheckStyle Name '_DLGetFormFieldCheckStyle',
  DLGetFormFieldChildTitle Name '_DLGetFormFieldChildTitle',
  DLGetFormFieldChoiceType Name '_DLGetFormFieldChoiceType',
  DLGetFormFieldColor Name '_DLGetFormFieldColor',
  DLGetFormFieldComb Name '_DLGetFormFieldComb',
  DLGetFormFieldDefaultValue Name '_DLGetFormFieldDefaultValue',
  DLGetFormFieldDescription Name '_DLGetFormFieldDescription',
  DLGetFormFieldFlags Name '_DLGetFormFieldFlags',
  DLGetFormFieldFontName Name '_DLGetFormFieldFontName',
  DLGetFormFieldJavaScript Name '_DLGetFormFieldJavaScript',
  DLGetFormFieldKidCount Name '_DLGetFormFieldKidCount',
  DLGetFormFieldKidTempIndex Name '_DLGetFormFieldKidTempIndex',
  DLGetFormFieldMaxLen Name '_DLGetFormFieldMaxLen',
  DLGetFormFieldNoExport Name '_DLGetFormFieldNoExport',
  DLGetFormFieldPage Name '_DLGetFormFieldPage',
  DLGetFormFieldPrintable Name '_DLGetFormFieldPrintable',
  DLGetFormFieldReadOnly Name '_DLGetFormFieldReadOnly',
  DLGetFormFieldRequired Name '_DLGetFormFieldRequired',
  DLGetFormFieldRichTextString Name '_DLGetFormFieldRichTextString',
  DLGetFormFieldRotation Name '_DLGetFormFieldRotation',
  DLGetFormFieldSubCount Name '_DLGetFormFieldSubCount',
  DLGetFormFieldSubDisplayName Name '_DLGetFormFieldSubDisplayName',
  DLGetFormFieldSubName Name '_DLGetFormFieldSubName',
  DLGetFormFieldSubmitActionString Name '_DLGetFormFieldSubmitActionString',
  DLGetFormFieldTabOrder Name '_DLGetFormFieldTabOrder',
  DLGetFormFieldTabOrderEx Name '_DLGetFormFieldTabOrderEx',
  DLGetFormFieldTextFlags Name '_DLGetFormFieldTextFlags',
  DLGetFormFieldTextSize Name '_DLGetFormFieldTextSize',
  DLGetFormFieldTitle Name '_DLGetFormFieldTitle',
  DLGetFormFieldType Name '_DLGetFormFieldType',
  DLGetFormFieldValue Name '_DLGetFormFieldValue',
  DLGetFormFieldValueByTitle Name '_DLGetFormFieldValueByTitle',
  DLGetFormFieldVisible Name '_DLGetFormFieldVisible',
  DLGetFormFieldWebLink Name '_DLGetFormFieldWebLink',
  DLGetFormFontCount Name '_DLGetFormFontCount',
  DLGetFormFontName Name '_DLGetFormFontName',
  DLGetGlobalJavaScript Name '_DLGetGlobalJavaScript',
  DLGetHTMLTextHeight Name '_DLGetHTMLTextHeight',
  DLGetHTMLTextLineCount Name '_DLGetHTMLTextLineCount',
  DLGetHTMLTextWidth Name '_DLGetHTMLTextWidth',
  DLGetImageID Name '_DLGetImageID',
  DLGetImageListCount Name '_DLGetImageListCount',
  DLGetImageListItemDataToString Name '_DLGetImageListItemDataToString',
  DLGetImageListItemDblProperty Name '_DLGetImageListItemDblProperty',
  DLGetImageListItemFormatDesc Name '_DLGetImageListItemFormatDesc',
  DLGetImageListItemIntProperty Name '_DLGetImageListItemIntProperty',
  DLGetImageMeasureDict Name '_DLGetImageMeasureDict',
  DLGetImagePageCount Name '_DLGetImagePageCount',
  DLGetImagePageCountFromString Name '_DLGetImagePageCountFromString',
  DLGetImagePtDataDict Name '_DLGetImagePtDataDict',
  DLGetInformation Name '_DLGetInformation',
  DLGetInstalledFontsByCharset Name '_DLGetInstalledFontsByCharset',
  DLGetInstalledFontsByCodePage Name '_DLGetInstalledFontsByCodePage',
  DLGetKerning Name '_DLGetKerning',
  DLGetLatestPrinterNames Name '_DLGetLatestPrinterNames',
  DLGetMaxObjectNumber Name '_DLGetMaxObjectNumber',
  DLGetMeasureDictBoundsCount Name '_DLGetMeasureDictBoundsCount',
  DLGetMeasureDictBoundsItem Name '_DLGetMeasureDictBoundsItem',
  DLGetMeasureDictCoordinateSystem Name '_DLGetMeasureDictCoordinateSystem',
  DLGetMeasureDictDCSDict Name '_DLGetMeasureDictDCSDict',
  DLGetMeasureDictGCSDict Name '_DLGetMeasureDictGCSDict',
  DLGetMeasureDictGPTSCount Name '_DLGetMeasureDictGPTSCount',
  DLGetMeasureDictGPTSItem Name '_DLGetMeasureDictGPTSItem',
  DLGetMeasureDictLPTSCount Name '_DLGetMeasureDictLPTSCount',
  DLGetMeasureDictLPTSItem Name '_DLGetMeasureDictLPTSItem',
  DLGetMeasureDictPDU Name '_DLGetMeasureDictPDU',
  DLGetNamedDestination Name '_DLGetNamedDestination',
  DLGetNextOutline Name '_DLGetNextOutline',
  DLGetObjectCount Name '_DLGetObjectCount',
  DLGetObjectDecodeError Name '_DLGetObjectDecodeError',
  DLGetObjectToString Name '_DLGetObjectToString',
  DLGetOpenActionDestination Name '_DLGetOpenActionDestination',
  DLGetOpenActionJavaScript Name '_DLGetOpenActionJavaScript',
  DLGetOptionalContentConfigCount Name '_DLGetOptionalContentConfigCount',
  DLGetOptionalContentConfigLocked Name '_DLGetOptionalContentConfigLocked',
  DLGetOptionalContentConfigOrderCount Name '_DLGetOptionalContentConfigOrderCount',
  DLGetOptionalContentConfigOrderItemID Name '_DLGetOptionalContentConfigOrderItemID',
  DLGetOptionalContentConfigOrderItemLabel Name '_DLGetOptionalContentConfigOrderItemLabel',
  DLGetOptionalContentConfigOrderItemLevel Name '_DLGetOptionalContentConfigOrderItemLevel',
  DLGetOptionalContentConfigOrderItemType Name '_DLGetOptionalContentConfigOrderItemType',
  DLGetOptionalContentConfigState Name '_DLGetOptionalContentConfigState',
  DLGetOptionalContentGroupID Name '_DLGetOptionalContentGroupID',
  DLGetOptionalContentGroupName Name '_DLGetOptionalContentGroupName',
  DLGetOptionalContentGroupPrintable Name '_DLGetOptionalContentGroupPrintable',
  DLGetOptionalContentGroupVisible Name '_DLGetOptionalContentGroupVisible',
  DLGetOrigin Name '_DLGetOrigin',
  DLGetOutlineActionID Name '_DLGetOutlineActionID',
  DLGetOutlineColor Name '_DLGetOutlineColor',
  DLGetOutlineDest Name '_DLGetOutlineDest',
  DLGetOutlineID Name '_DLGetOutlineID',
  DLGetOutlineJavaScript Name '_DLGetOutlineJavaScript',
  DLGetOutlineObjectNumber Name '_DLGetOutlineObjectNumber',
  DLGetOutlineOpenFile Name '_DLGetOutlineOpenFile',
  DLGetOutlinePage Name '_DLGetOutlinePage',
  DLGetOutlineStyle Name '_DLGetOutlineStyle',
  DLGetOutlineWebLink Name '_DLGetOutlineWebLink',
  DLGetPageBox Name '_DLGetPageBox',
  DLGetPageColorSpaces Name '_DLGetPageColorSpaces',
  DLGetPageContentToString Name '_DLGetPageContentToString',
  DLGetPageImageList Name '_DLGetPageImageList',
  DLGetPageJavaScript Name '_DLGetPageJavaScript',
  DLGetPageLGIDictContent Name '_DLGetPageLGIDictContent',
  DLGetPageLGIDictCount Name '_DLGetPageLGIDictCount',
  DLGetPageLabel Name '_DLGetPageLabel',
  DLGetPageLayout Name '_DLGetPageLayout',
  DLGetPageMetricsToString Name '_DLGetPageMetricsToString',
  DLGetPageMode Name '_DLGetPageMode', DLGetPageText Name '_DLGetPageText',
  DLGetPageUserUnit Name '_DLGetPageUserUnit',
  DLGetPageViewPortCount Name '_DLGetPageViewPortCount',
  DLGetPageViewPortID Name '_DLGetPageViewPortID',
  DLGetParentOutline Name '_DLGetParentOutline',
  DLGetPrevOutline Name '_DLGetPrevOutline',
  DLGetPrintPreviewBitmapToString Name '_DLGetPrintPreviewBitmapToString',
  DLGetPrinterBins Name '_DLGetPrinterBins',
  DLGetPrinterDevModeToString Name '_DLGetPrinterDevModeToString',
  DLGetPrinterMediaTypes Name '_DLGetPrinterMediaTypes',
  DLGetPrinterNames Name '_DLGetPrinterNames',
  DLGetRenderScale Name '_DLGetRenderScale',
  DLGetSignProcessByteRange Name '_DLGetSignProcessByteRange',
  DLGetSignProcessResult Name '_DLGetSignProcessResult',
  DLGetStringListCount Name '_DLGetStringListCount',
  DLGetStringListItem Name '_DLGetStringListItem',
  DLGetTabOrderMode Name '_DLGetTabOrderMode',
  DLGetTableCellDblProperty Name '_DLGetTableCellDblProperty',
  DLGetTableCellIntProperty Name '_DLGetTableCellIntProperty',
  DLGetTableCellStrProperty Name '_DLGetTableCellStrProperty',
  DLGetTableColumnCount Name '_DLGetTableColumnCount',
  DLGetTableLastDrawnRow Name '_DLGetTableLastDrawnRow',
  DLGetTableRowCount Name '_DLGetTableRowCount',
  DLGetTempPath Name '_DLGetTempPath', DLGetTextAscent Name '_DLGetTextAscent',
  DLGetTextBlockAsString Name '_DLGetTextBlockAsString',
  DLGetTextBlockBound Name '_DLGetTextBlockBound',
  DLGetTextBlockCharWidth Name '_DLGetTextBlockCharWidth',
  DLGetTextBlockColor Name '_DLGetTextBlockColor',
  DLGetTextBlockColorType Name '_DLGetTextBlockColorType',
  DLGetTextBlockCount Name '_DLGetTextBlockCount',
  DLGetTextBlockFontName Name '_DLGetTextBlockFontName',
  DLGetTextBlockFontSize Name '_DLGetTextBlockFontSize',
  DLGetTextBlockText Name '_DLGetTextBlockText',
  DLGetTextBound Name '_DLGetTextBound',
  DLGetTextDescent Name '_DLGetTextDescent',
  DLGetTextHeight Name '_DLGetTextHeight', DLGetTextSize Name '_DLGetTextSize',
  DLGetTextWidth Name '_DLGetTextWidth',
  DLGetUnicodeCharactersFromEncoding Name '_DLGetUnicodeCharactersFromEncoding',
  DLGetViewPortBBox Name '_DLGetViewPortBBox',
  DLGetViewPortMeasureDict Name '_DLGetViewPortMeasureDict',
  DLGetViewPortName Name '_DLGetViewPortName',
  DLGetViewPortPtDataDict Name '_DLGetViewPortPtDataDict',
  DLGetViewerPreferences Name '_DLGetViewerPreferences',
  DLGetWrappedText Name '_DLGetWrappedText',
  DLGetWrappedTextBreakString Name '_DLGetWrappedTextBreakString',
  DLGetWrappedTextHeight Name '_DLGetWrappedTextHeight',
  DLGetWrappedTextLineCount Name '_DLGetWrappedTextLineCount',
  DLGetXFAFormFieldCount Name '_DLGetXFAFormFieldCount',
  DLGetXFAFormFieldName Name '_DLGetXFAFormFieldName',
  DLGetXFAFormFieldNames Name '_DLGetXFAFormFieldNames',
  DLGetXFAFormFieldValue Name '_DLGetXFAFormFieldValue',
  DLGetXFAToString Name '_DLGetXFAToString',
  DLGlobalJavaScriptCount Name '_DLGlobalJavaScriptCount',
  DLGlobalJavaScriptPackageName Name '_DLGlobalJavaScriptPackageName',
  DLHasFontResources Name '_DLHasFontResources',
  DLHasPageBox Name '_DLHasPageBox', DLHidePage Name '_DLHidePage',
  DLImageCount Name '_DLImageCount', DLImageFillColor Name '_DLImageFillColor',
  DLImageHeight Name '_DLImageHeight',
  DLImageHorizontalResolution Name '_DLImageHorizontalResolution',
  DLImageResolutionUnits Name '_DLImageResolutionUnits',
  DLImageType Name '_DLImageType',
  DLImageVerticalResolution Name '_DLImageVerticalResolution',
  DLImageWidth Name '_DLImageWidth',
  DLImportEMFFromFile Name '_DLImportEMFFromFile',
  DLInsertPages Name '_DLInsertPages',
  DLInsertTableColumns Name '_DLInsertTableColumns',
  DLInsertTableRows Name '_DLInsertTableRows',
  DLIsAnnotFormField Name '_DLIsAnnotFormField',
  DLIsLinearized Name '_DLIsLinearized', DLIsTaggedPDF Name '_DLIsTaggedPDF',
  DLLastErrorCode Name '_DLLastErrorCode',
  DLLastRenderError Name '_DLLastRenderError',
  DLLibraryVersion Name '_DLLibraryVersion',
  DLLibraryVersionEx Name '_DLLibraryVersionEx',
  DLLinearizeFile Name '_DLLinearizeFile',
  DLLoadFromCanvasDC Name '_DLLoadFromCanvasDC',
  DLLoadFromFile Name '_DLLoadFromFile',
  DLLoadFromString Name '_DLLoadFromString', DLLoadState Name '_DLLoadState',
  DLMergeDocument Name '_DLMergeDocument',
  DLMergeFileList Name '_DLMergeFileList',
  DLMergeFileListFast Name '_DLMergeFileListFast',
  DLMergeFiles Name '_DLMergeFiles',
  DLMergeTableCells Name '_DLMergeTableCells',
  DLMoveContentStream Name '_DLMoveContentStream',
  DLMoveOutlineAfter Name '_DLMoveOutlineAfter',
  DLMoveOutlineBefore Name '_DLMoveOutlineBefore',
  DLMovePage Name '_DLMovePage', DLMovePath Name '_DLMovePath',
  DLMultiplyScale Name '_DLMultiplyScale',
  DLNewChildFormField Name '_DLNewChildFormField',
  DLNewContentStream Name '_DLNewContentStream',
  DLNewCustomPrinter Name '_DLNewCustomPrinter',
  DLNewDestination Name '_DLNewDestination',
  DLNewDocument Name '_DLNewDocument', DLNewFormField Name '_DLNewFormField',
  DLNewInternalPrinterObject Name '_DLNewInternalPrinterObject',
  DLNewNamedDestination Name '_DLNewNamedDestination',
  DLNewOptionalContentGroup Name '_DLNewOptionalContentGroup',
  DLNewOutline Name '_DLNewOutline', DLNewPage Name '_DLNewPage',
  DLNewPageFromCanvasDC Name '_DLNewPageFromCanvasDC',
  DLNewPages Name '_DLNewPages',
  DLNewPostScriptXObject Name '_DLNewPostScriptXObject',
  DLNewRGBAxialShader Name '_DLNewRGBAxialShader',
  DLNewSignProcessFromFile Name '_DLNewSignProcessFromFile',
  DLNewSignProcessFromString Name '_DLNewSignProcessFromString',
  DLNewStaticOutline Name '_DLNewStaticOutline',
  DLNewTilingPatternFromCapturedPage Name '_DLNewTilingPatternFromCapturedPage',
  DLNoEmbedFontListAdd Name '_DLNoEmbedFontListAdd',
  DLNoEmbedFontListCount Name '_DLNoEmbedFontListCount',
  DLNoEmbedFontListGet Name '_DLNoEmbedFontListGet',
  DLNoEmbedFontListRemoveAll Name '_DLNoEmbedFontListRemoveAll',
  DLNoEmbedFontListRemoveIndex Name '_DLNoEmbedFontListRemoveIndex',
  DLNoEmbedFontListRemoveName Name '_DLNoEmbedFontListRemoveName',
  DLNormalizePage Name '_DLNormalizePage', DLOpenOutline Name '_DLOpenOutline',
  DLOptionalContentGroupCount Name '_DLOptionalContentGroupCount',
  DLOutlineCount Name '_DLOutlineCount', DLOutlineTitle Name '_DLOutlineTitle',
  DLPageCount Name '_DLPageCount',
  DLPageHasFontResources Name '_DLPageHasFontResources',
  DLPageHeight Name '_DLPageHeight',
  DLPageJavaScriptAction Name '_DLPageJavaScriptAction',
  DLPageRotation Name '_DLPageRotation', DLPageWidth Name '_DLPageWidth',
  DLPrintDocument Name '_DLPrintDocument',
  DLPrintDocumentToFile Name '_DLPrintDocumentToFile',
  DLPrintMode Name '_DLPrintMode', DLPrintOptions Name '_DLPrintOptions',
  DLPrintPages Name '_DLPrintPages',
  DLPrintPagesToFile Name '_DLPrintPagesToFile',
  DLReleaseBuffer Name '_DLReleaseBuffer',
  DLReleaseImage Name '_DLReleaseImage',
  DLReleaseImageList Name '_DLReleaseImageList',
  DLReleaseLibrary Name '_DLReleaseLibrary',
  DLReleaseSignProcess Name '_DLReleaseSignProcess',
  DLReleaseStringList Name '_DLReleaseStringList',
  DLReleaseTextBlocks Name '_DLReleaseTextBlocks',
  DLRemoveAppearanceStream Name '_DLRemoveAppearanceStream',
  DLRemoveCustomInformation Name '_DLRemoveCustomInformation',
  DLRemoveDocument Name '_DLRemoveDocument',
  DLRemoveEmbeddedFile Name '_DLRemoveEmbeddedFile',
  DLRemoveFormFieldBackgroundColor Name '_DLRemoveFormFieldBackgroundColor',
  DLRemoveFormFieldBorderColor Name '_DLRemoveFormFieldBorderColor',
  DLRemoveFormFieldChoiceSub Name '_DLRemoveFormFieldChoiceSub',
  DLRemoveGlobalJavaScript Name '_DLRemoveGlobalJavaScript',
  DLRemoveOpenAction Name '_DLRemoveOpenAction',
  DLRemoveOutline Name '_DLRemoveOutline',
  DLRemovePageBox Name '_DLRemovePageBox',
  DLRemoveSharedContentStreams Name '_DLRemoveSharedContentStreams',
  DLRemoveStyle Name '_DLRemoveStyle',
  DLRemoveUsageRights Name '_DLRemoveUsageRights',
  DLRemoveXFAEntries Name '_DLRemoveXFAEntries',
  DLRenderAsMultipageTIFFToFile Name '_DLRenderAsMultipageTIFFToFile',
  DLRenderDocumentToFile Name '_DLRenderDocumentToFile',
  DLRenderPageToDC Name '_DLRenderPageToDC',
  DLRenderPageToDCClip Name '_DLRenderPageToDCClip',
  DLRenderPageToFile Name '_DLRenderPageToFile',
  DLRenderPageToString Name '_DLRenderPageToString',
  DLReplaceFonts Name '_DLReplaceFonts', DLReplaceImage Name '_DLReplaceImage',
  DLReplaceTag Name '_DLReplaceTag',
  DLRequestPrinterStatus Name '_DLRequestPrinterStatus',
  DLRetrieveCustomDataToFile Name '_DLRetrieveCustomDataToFile',
  DLRetrieveCustomDataToString Name '_DLRetrieveCustomDataToString',
  DLReverseImage Name '_DLReverseImage', DLRotatePage Name '_DLRotatePage',
  DLSaveFontToFile Name '_DLSaveFontToFile',
  DLSaveImageListItemDataToFile Name '_DLSaveImageListItemDataToFile',
  DLSaveImageToFile Name '_DLSaveImageToFile',
  DLSaveImageToString Name '_DLSaveImageToString',
  DLSaveState Name '_DLSaveState', DLSaveStyle Name '_DLSaveStyle',
  DLSaveToFile Name '_DLSaveToFile', DLSaveToString Name '_DLSaveToString',
  DLSecurityInfo Name '_DLSecurityInfo',
  DLSelectContentStream Name '_DLSelectContentStream',
  DLSelectDocument Name '_DLSelectDocument', DLSelectFont Name '_DLSelectFont',
  DLSelectImage Name '_DLSelectImage', DLSelectPage Name '_DLSelectPage',
  DLSelectRenderer Name '_DLSelectRenderer',
  DLSelectedDocument Name '_DLSelectedDocument',
  DLSelectedFont Name '_DLSelectedFont',
  DLSelectedImage Name '_DLSelectedImage',
  DLSelectedPage Name '_DLSelectedPage', DLSetActionURL Name '_DLSetActionURL',
  DLSetAnnotBorderColor Name '_DLSetAnnotBorderColor',
  DLSetAnnotBorderStyle Name '_DLSetAnnotBorderStyle',
  DLSetAnnotContents Name '_DLSetAnnotContents',
  DLSetAnnotDblProperty Name '_DLSetAnnotDblProperty',
  DLSetAnnotIntProperty Name '_DLSetAnnotIntProperty',
  DLSetAnnotOptional Name '_DLSetAnnotOptional',
  DLSetAnnotQuadPoints Name '_DLSetAnnotQuadPoints',
  DLSetAnnotRect Name '_DLSetAnnotRect',
  DLSetAnnotStrProperty Name '_DLSetAnnotStrProperty',
  DLSetAnsiMode Name '_DLSetAnsiMode',
  DLSetAppendInputFromString Name '_DLSetAppendInputFromString',
  DLSetBaseURL Name '_DLSetBaseURL', DLSetBlendMode Name '_DLSetBlendMode',
  DLSetBreakString Name '_DLSetBreakString',
  DLSetCSDictEPSG Name '_DLSetCSDictEPSG',
  DLSetCSDictType Name '_DLSetCSDictType',
  DLSetCSDictWKT Name '_DLSetCSDictWKT',
  DLSetCapturedPageOptional Name '_DLSetCapturedPageOptional',
  DLSetCapturedPageTransparencyGroup Name '_DLSetCapturedPageTransparencyGroup',
  DLSetCatalogInformation Name '_DLSetCatalogInformation',
  DLSetCharWidth Name '_DLSetCharWidth',
  DLSetClippingPath Name '_DLSetClippingPath',
  DLSetClippingPathEvenOdd Name '_DLSetClippingPathEvenOdd',
  DLSetCompatibility Name '_DLSetCompatibility',
  DLSetContentStreamFromString Name '_DLSetContentStreamFromString',
  DLSetContentStreamOptional Name '_DLSetContentStreamOptional',
  DLSetCropBox Name '_DLSetCropBox',
  DLSetCustomInformation Name '_DLSetCustomInformation',
  DLSetCustomLineDash Name '_DLSetCustomLineDash',
  DLSetPDFiumFileName Name '_DPLSetPDFiumFileName',
  DLSetDecodeMode Name '_DLSetDecodeMode',
  DLSetDestProperties Name '_DLSetDestProperties',
  DLSetDestValue Name '_DLSetDestValue',
  DLSetDocumentMetadata Name '_DLSetDocumentMetadata',
  DLSetEmbeddedFileStrProperty Name '_DLSetEmbeddedFileStrProperty',
  DLSetFillColor Name '_DLSetFillColor',
  DLSetFillColorCMYK Name '_DLSetFillColorCMYK',
  DLSetFillColorSep Name '_DLSetFillColorSep',
  DLSetFillShader Name '_DLSetFillShader',
  DLSetFillTilingPattern Name '_DLSetFillTilingPattern',
  DLSetFindImagesMode Name '_DLSetFindImagesMode',
  DLSetFontEncoding Name '_DLSetFontEncoding',
  DLSetFontFlags Name '_DLSetFontFlags',
  DLSetFormFieldAlignment Name '_DLSetFormFieldAlignment',
  DLSetFormFieldAnnotFlags Name '_DLSetFormFieldAnnotFlags',
  DLSetFormFieldBackgroundColor Name '_DLSetFormFieldBackgroundColor',
  DLSetFormFieldBackgroundColorCMYK Name '_DLSetFormFieldBackgroundColorCMYK',
  DLSetFormFieldBackgroundColorGray Name '_DLSetFormFieldBackgroundColorGray',
  DLSetFormFieldBackgroundColorSep Name '_DLSetFormFieldBackgroundColorSep',
  DLSetFormFieldBorderColor Name '_DLSetFormFieldBorderColor',
  DLSetFormFieldBorderColorCMYK Name '_DLSetFormFieldBorderColorCMYK',
  DLSetFormFieldBorderColorGray Name '_DLSetFormFieldBorderColorGray',
  DLSetFormFieldBorderColorSep Name '_DLSetFormFieldBorderColorSep',
  DLSetFormFieldBorderStyle Name '_DLSetFormFieldBorderStyle',
  DLSetFormFieldBounds Name '_DLSetFormFieldBounds',
  DLSetFormFieldCalcOrder Name '_DLSetFormFieldCalcOrder',
  DLSetFormFieldCaption Name '_DLSetFormFieldCaption',
  DLSetFormFieldCheckStyle Name '_DLSetFormFieldCheckStyle',
  DLSetFormFieldChildTitle Name '_DLSetFormFieldChildTitle',
  DLSetFormFieldChoiceSub Name '_DLSetFormFieldChoiceSub',
  DLSetFormFieldChoiceType Name '_DLSetFormFieldChoiceType',
  DLSetFormFieldColor Name '_DLSetFormFieldColor',
  DLSetFormFieldColorCMYK Name '_DLSetFormFieldColorCMYK',
  DLSetFormFieldColorSep Name '_DLSetFormFieldColorSep',
  DLSetFormFieldComb Name '_DLSetFormFieldComb',
  DLSetFormFieldDefaultValue Name '_DLSetFormFieldDefaultValue',
  DLSetFormFieldDescription Name '_DLSetFormFieldDescription',
  DLSetFormFieldFlags Name '_DLSetFormFieldFlags',
  DLSetFormFieldFont Name '_DLSetFormFieldFont',
  DLSetFormFieldHighlightMode Name '_DLSetFormFieldHighlightMode',
  DLSetFormFieldIcon Name '_DLSetFormFieldIcon',
  DLSetFormFieldIconStyle Name '_DLSetFormFieldIconStyle',
  DLSetFormFieldMaxLen Name '_DLSetFormFieldMaxLen',
  DLSetFormFieldNoExport Name '_DLSetFormFieldNoExport',
  DLSetFormFieldOptional Name '_DLSetFormFieldOptional',
  DLSetFormFieldPage Name '_DLSetFormFieldPage',
  DLSetFormFieldPrintable Name '_DLSetFormFieldPrintable',
  DLSetFormFieldReadOnly Name '_DLSetFormFieldReadOnly',
  DLSetFormFieldRequired Name '_DLSetFormFieldRequired',
  DLSetFormFieldResetAction Name '_DLSetFormFieldResetAction',
  DLSetFormFieldRichTextString Name '_DLSetFormFieldRichTextString',
  DLSetFormFieldRotation Name '_DLSetFormFieldRotation',
  DLSetFormFieldSignatureImage Name '_DLSetFormFieldSignatureImage',
  DLSetFormFieldStandardFont Name '_DLSetFormFieldStandardFont',
  DLSetFormFieldSubmitAction Name '_DLSetFormFieldSubmitAction',
  DLSetFormFieldSubmitActionEx Name '_DLSetFormFieldSubmitActionEx',
  DLSetFormFieldTabOrder Name '_DLSetFormFieldTabOrder',
  DLSetFormFieldTextFlags Name '_DLSetFormFieldTextFlags',
  DLSetFormFieldTextSize Name '_DLSetFormFieldTextSize',
  DLSetFormFieldTitle Name '_DLSetFormFieldTitle',
  DLSetFormFieldValue Name '_DLSetFormFieldValue',
  DLSetFormFieldValueByTitle Name '_DLSetFormFieldValueByTitle',
  DLSetFormFieldVisible Name '_DLSetFormFieldVisible',
  DLSetGDIPlusFileName Name '_DLSetGDIPlusFileName',
  DLSetGDIPlusOptions Name '_DLSetGDIPlusOptions',
  DLSetHTMLBoldFont Name '_DLSetHTMLBoldFont',
  DLSetHTMLBoldItalicFont Name '_DLSetHTMLBoldItalicFont',
  DLSetHTMLItalicFont Name '_DLSetHTMLItalicFont',
  DLSetHTMLNormalFont Name '_DLSetHTMLNormalFont',
  DLSetHeaderCommentsFromString Name '_DLSetHeaderCommentsFromString',
  DLSetImageAsMask Name '_DLSetImageAsMask',
  DLSetImageMask Name '_DLSetImageMask',
  DLSetImageMaskCMYK Name '_DLSetImageMaskCMYK',
  DLSetImageMaskFromImage Name '_DLSetImageMaskFromImage',
  DLSetImageOptional Name '_DLSetImageOptional',
  DLSetImageResolution Name '_DLSetImageResolution',
  DLSetInformation Name '_DLSetInformation',
  DLSetJPEGQuality Name '_DLSetJPEGQuality',
  DLSetJavaScriptMode Name '_DLSetJavaScriptMode',
  DLSetKerning Name '_DLSetKerning', DLSetLineCap Name '_DLSetLineCap',
  DLSetLineColor Name '_DLSetLineColor',
  DLSetLineColorCMYK Name '_DLSetLineColorCMYK',
  DLSetLineColorSep Name '_DLSetLineColorSep',
  DLSetLineDash Name '_DLSetLineDash', DLSetLineDashEx Name '_DLSetLineDashEx',
  DLSetLineJoin Name '_DLSetLineJoin', DLSetLineShader Name '_DLSetLineShader',
  DLSetLineWidth Name '_DLSetLineWidth',
  DLSetMarkupAnnotStyle Name '_DLSetMarkupAnnotStyle',
  DLSetMeasureDictBoundsCount Name '_DLSetMeasureDictBoundsCount',
  DLSetMeasureDictBoundsItem Name '_DLSetMeasureDictBoundsItem',
  DLSetMeasureDictCoordinateSystem Name '_DLSetMeasureDictCoordinateSystem',
  DLSetMeasureDictGPTSCount Name '_DLSetMeasureDictGPTSCount',
  DLSetMeasureDictGPTSItem Name '_DLSetMeasureDictGPTSItem',
  DLSetMeasureDictLPTSCount Name '_DLSetMeasureDictLPTSCount',
  DLSetMeasureDictLPTSItem Name '_DLSetMeasureDictLPTSItem',
  DLSetMeasureDictPDU Name '_DLSetMeasureDictPDU',
  DLSetMeasurementUnits Name '_DLSetMeasurementUnits',
  DLSetNeedAppearances Name '_DLSetNeedAppearances',
  DLSetObjectFromString Name '_DLSetObjectFromString',
  DLSetOpenActionDestination Name '_DLSetOpenActionDestination',
  DLSetOpenActionDestinationFull Name '_DLSetOpenActionDestinationFull',
  DLSetOpenActionJavaScript Name '_DLSetOpenActionJavaScript',
  DLSetOpenActionMenu Name '_DLSetOpenActionMenu',
  DLSetOptionalContentConfigLocked Name '_DLSetOptionalContentConfigLocked',
  DLSetOptionalContentConfigState Name '_DLSetOptionalContentConfigState',
  DLSetOptionalContentGroupName Name '_DLSetOptionalContentGroupName',
  DLSetOptionalContentGroupPrintable Name '_DLSetOptionalContentGroupPrintable',
  DLSetOptionalContentGroupVisible Name '_DLSetOptionalContentGroupVisible',
  DLSetOrigin Name '_DLSetOrigin', DLSetOutlineColor Name '_DLSetOutlineColor',
  DLSetOutlineDestination Name '_DLSetOutlineDestination',
  DLSetOutlineDestinationFull Name '_DLSetOutlineDestinationFull',
  DLSetOutlineDestinationZoom Name '_DLSetOutlineDestinationZoom',
  DLSetOutlineJavaScript Name '_DLSetOutlineJavaScript',
  DLSetOutlineNamedDestination Name '_DLSetOutlineNamedDestination',
  DLSetOutlineOpenFile Name '_DLSetOutlineOpenFile',
  DLSetOutlineRemoteDestination Name '_DLSetOutlineRemoteDestination',
  DLSetOutlineStyle Name '_DLSetOutlineStyle',
  DLSetOutlineTitle Name '_DLSetOutlineTitle',
  DLSetOutlineWebLink Name '_DLSetOutlineWebLink',
  DLSetOverprint Name '_DLSetOverprint', DLSetPDFAMode Name '_DLSetPDFAMode',
  DLSetPNGTransparencyColor Name '_DLSetPNGTransparencyColor',
  DLSetPageActionMenu Name '_DLSetPageActionMenu',
  DLSetPageBox Name '_DLSetPageBox',
  DLSetPageContentFromString Name '_DLSetPageContentFromString',
  DLSetPageDimensions Name '_DLSetPageDimensions',
  DLSetPageLayout Name '_DLSetPageLayout', DLSetPageMode Name '_DLSetPageMode',
  DLSetPageSize Name '_DLSetPageSize',
  DLSetPageThumbnail Name '_DLSetPageThumbnail',
  DLSetPageTransparencyGroup Name '_DLSetPageTransparencyGroup',
  DLSetPageUserUnit Name '_DLSetPageUserUnit',
  DLSetPrecision Name '_DLSetPrecision',
  DLSetPrinterDevModeFromString Name '_DLSetPrinterDevModeFromString',
  DLSetRenderCropType Name '_DLSetRenderCropType',
  DLSetRenderDCErasePage Name '_DLSetRenderDCErasePage',
  DLSetRenderDCOffset Name '_DLSetRenderDCOffset',
  DLSetRenderOptions Name '_DLSetRenderOptions',
  DLSetRenderScale Name '_DLSetRenderScale', DLSetScale Name '_DLSetScale',
  DLSetSignProcessCustomSubFilter Name '_DLSetSignProcessCustomSubFilter',
  DLSetSignProcessField Name '_DLSetSignProcessField',
  DLSetSignProcessFieldBounds Name '_DLSetSignProcessFieldBounds',
  DLSetSignProcessFieldImageFromFile Name '_DLSetSignProcessFieldImageFromFile',
  DLSetSignProcessFieldPage Name '_DLSetSignProcessFieldPage',
  DLSetSignProcessInfo Name '_DLSetSignProcessInfo',
  DLSetSignProcessKeyset Name '_DLSetSignProcessKeyset',
  DLSetSignProcessPFXFromFile Name '_DLSetSignProcessPFXFromFile',
  DLSetSignProcessPassthrough Name '_DLSetSignProcessPassthrough',
  DLSetSignProcessSubFilter Name '_DLSetSignProcessSubFilter',
  DLSetTabOrderMode Name '_DLSetTabOrderMode',
  DLSetTableBorderColor Name '_DLSetTableBorderColor',
  DLSetTableBorderColorCMYK Name '_DLSetTableBorderColorCMYK',
  DLSetTableBorderWidth Name '_DLSetTableBorderWidth',
  DLSetTableCellAlignment Name '_DLSetTableCellAlignment',
  DLSetTableCellBackgroundColor Name '_DLSetTableCellBackgroundColor',
  DLSetTableCellBackgroundColorCMYK Name '_DLSetTableCellBackgroundColorCMYK',
  DLSetTableCellBorderColor Name '_DLSetTableCellBorderColor',
  DLSetTableCellBorderColorCMYK Name '_DLSetTableCellBorderColorCMYK',
  DLSetTableCellBorderWidth Name '_DLSetTableCellBorderWidth',
  DLSetTableCellContent Name '_DLSetTableCellContent',
  DLSetTableCellPadding Name '_DLSetTableCellPadding',
  DLSetTableCellTextColor Name '_DLSetTableCellTextColor',
  DLSetTableCellTextColorCMYK Name '_DLSetTableCellTextColorCMYK',
  DLSetTableCellTextSize Name '_DLSetTableCellTextSize',
  DLSetTableColumnWidth Name '_DLSetTableColumnWidth',
  DLSetTableRowHeight Name '_DLSetTableRowHeight',
  DLSetTableThinBorders Name '_DLSetTableThinBorders',
  DLSetTableThinBordersCMYK Name '_DLSetTableThinBordersCMYK',
  DLSetTempFile Name '_DLSetTempFile', DLSetTempPath Name '_DLSetTempPath',
  DLSetTextAlign Name '_DLSetTextAlign',
  DLSetTextCharSpacing Name '_DLSetTextCharSpacing',
  DLSetTextColor Name '_DLSetTextColor',
  DLSetTextColorCMYK Name '_DLSetTextColorCMYK',
  DLSetTextColorSep Name '_DLSetTextColorSep',
  DLSetTextExtractionArea Name '_DLSetTextExtractionArea',
  DLSetTextExtractionOptions Name '_DLSetTextExtractionOptions',
  DLSetTextExtractionScaling Name '_DLSetTextExtractionScaling',
  DLSetTextExtractionWordGap Name '_DLSetTextExtractionWordGap',
  DLSetTextHighlight Name '_DLSetTextHighlight',
  DLSetTextHighlightColor Name '_DLSetTextHighlightColor',
  DLSetTextHighlightColorCMYK Name '_DLSetTextHighlightColorCMYK',
  DLSetTextHighlightColorSep Name '_DLSetTextHighlightColorSep',
  DLSetTextMode Name '_DLSetTextMode', DLSetTextRise Name '_DLSetTextRise',
  DLSetTextScaling Name '_DLSetTextScaling',
  DLSetTextShader Name '_DLSetTextShader', DLSetTextSize Name '_DLSetTextSize',
  DLSetTextSpacing Name '_DLSetTextSpacing',
  DLSetTextUnderline Name '_DLSetTextUnderline',
  DLSetTextUnderlineColor Name '_DLSetTextUnderlineColor',
  DLSetTextUnderlineColorCMYK Name '_DLSetTextUnderlineColorCMYK',
  DLSetTextUnderlineColorSep Name '_DLSetTextUnderlineColorSep',
  DLSetTextUnderlineCustomDash Name '_DLSetTextUnderlineCustomDash',
  DLSetTextUnderlineDash Name '_DLSetTextUnderlineDash',
  DLSetTextUnderlineDistance Name '_DLSetTextUnderlineDistance',
  DLSetTextUnderlineWidth Name '_DLSetTextUnderlineWidth',
  DLSetTextWordSpacing Name '_DLSetTextWordSpacing',
  DLSetTransparency Name '_DLSetTransparency',
  DLSetViewerPreferences Name '_DLSetViewerPreferences',
  DLSetXFAFormFieldAccess Name '_DLSetXFAFormFieldAccess',
  DLSetXFAFormFieldBorderColor Name '_DLSetXFAFormFieldBorderColor',
  DLSetXFAFormFieldBorderPresence Name '_DLSetXFAFormFieldBorderPresence',
  DLSetXFAFormFieldBorderWidth Name '_DLSetXFAFormFieldBorderWidth',
  DLSetXFAFormFieldValue Name '_DLSetXFAFormFieldValue',
  DLSetXFAFromString Name '_DLSetXFAFromString',
  DLSetupPrinter Name '_DLSetupPrinter', DLSignFile Name '_DLSignFile',
  DLSplitPageText Name '_DLSplitPageText', DLStartPath Name '_DLStartPath',
  DLStoreCustomDataFromFile Name '_DLStoreCustomDataFromFile',
  DLStoreCustomDataFromString Name '_DLStoreCustomDataFromString',
  DLStringResultLength Name '_DLStringResultLength',
  DLTestTempPath Name '_DLTestTempPath',
  DLTransformFile Name '_DLTransformFile',
  DLUpdateAndFlattenFormField Name '_DLUpdateAndFlattenFormField',
  DLUpdateAppearanceStream Name '_DLUpdateAppearanceStream',
  DLUpdateTrueTypeSubsettedFont Name '_DLUpdateTrueTypeSubsettedFont',
  DLUseKerning Name '_DLUseKerning',
  DLUseUnsafeContentStreams Name '_DLUseUnsafeContentStreams';

Begin
  InitLibrary;

End.
