// ignore_for_file: unused_field

// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
// ignore_for_file: type=lint
import 'dart:ffi' as ffi;

class pdfium {
  /// Holds the symbol lookup function.
  final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) _lookup;

  /// The symbols are looked up in [dynamicLibrary].
  pdfium(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup;

  /// The symbols are looked up with [lookup].
  pdfium.fromLookup(ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) lookup) : _lookup = lookup;

  void FPDF_InitLibraryWithConfig(
    ffi.Pointer<FPDF_LIBRARY_CONFIG> config,
  ) {
    return _FPDF_InitLibraryWithConfig(
      config,
    );
  }

  late final _FPDF_InitLibraryWithConfigPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<FPDF_LIBRARY_CONFIG>)>>('FPDF_InitLibraryWithConfig');
  late final _FPDF_InitLibraryWithConfig =
      _FPDF_InitLibraryWithConfigPtr.asFunction<void Function(ffi.Pointer<FPDF_LIBRARY_CONFIG>)>();

  void FPDF_InitLibrary() {
    return _FPDF_InitLibrary();
  }

  late final _FPDF_InitLibraryPtr = _lookup<ffi.NativeFunction<ffi.Void Function()>>('FPDF_InitLibrary');
  late final _FPDF_InitLibrary = _FPDF_InitLibraryPtr.asFunction<void Function()>();

  void FPDF_DestroyLibrary() {
    return _FPDF_DestroyLibrary();
  }

  late final _FPDF_DestroyLibraryPtr = _lookup<ffi.NativeFunction<ffi.Void Function()>>('FPDF_DestroyLibrary');
  late final _FPDF_DestroyLibrary = _FPDF_DestroyLibraryPtr.asFunction<void Function()>();

  void FPDF_SetSandBoxPolicy(
    int policy,
    int enable,
  ) {
    return _FPDF_SetSandBoxPolicy(
      policy,
      enable,
    );
  }

  late final _FPDF_SetSandBoxPolicyPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_DWORD, FPDF_BOOL)>>('FPDF_SetSandBoxPolicy');
  late final _FPDF_SetSandBoxPolicy = _FPDF_SetSandBoxPolicyPtr.asFunction<void Function(int, int)>();

  int FPDF_SetPrintMode(
    int mode,
  ) {
    return _FPDF_SetPrintMode(
      mode,
    );
  }

  late final _FPDF_SetPrintModePtr = _lookup<ffi.NativeFunction<FPDF_BOOL Function(ffi.Int)>>('FPDF_SetPrintMode');
  late final _FPDF_SetPrintMode = _FPDF_SetPrintModePtr.asFunction<int Function(int)>();

  FPDF_DOCUMENT FPDF_LoadDocument(
    FPDF_STRING file_path,
    FPDF_BYTESTRING password,
  ) {
    return _FPDF_LoadDocument(
      file_path,
      password,
    );
  }

  late final _FPDF_LoadDocumentPtr =
      _lookup<ffi.NativeFunction<FPDF_DOCUMENT Function(FPDF_STRING, FPDF_BYTESTRING)>>('FPDF_LoadDocument');
  late final _FPDF_LoadDocument =
      _FPDF_LoadDocumentPtr.asFunction<FPDF_DOCUMENT Function(FPDF_STRING, FPDF_BYTESTRING)>();

  FPDF_DOCUMENT FPDF_LoadMemDocument(
    ffi.Pointer<ffi.Void> data_buf,
    int size,
    FPDF_BYTESTRING password,
  ) {
    return _FPDF_LoadMemDocument(
      data_buf,
      size,
      password,
    );
  }

  late final _FPDF_LoadMemDocumentPtr =
      _lookup<ffi.NativeFunction<FPDF_DOCUMENT Function(ffi.Pointer<ffi.Void>, ffi.Int, FPDF_BYTESTRING)>>(
          'FPDF_LoadMemDocument');
  late final _FPDF_LoadMemDocument =
      _FPDF_LoadMemDocumentPtr.asFunction<FPDF_DOCUMENT Function(ffi.Pointer<ffi.Void>, int, FPDF_BYTESTRING)>();

  FPDF_DOCUMENT FPDF_LoadMemDocument64(
    ffi.Pointer<ffi.Void> data_buf,
    int size,
    FPDF_BYTESTRING password,
  ) {
    return _FPDF_LoadMemDocument64(
      data_buf,
      size,
      password,
    );
  }

  late final _FPDF_LoadMemDocument64Ptr =
      _lookup<ffi.NativeFunction<FPDF_DOCUMENT Function(ffi.Pointer<ffi.Void>, ffi.Size, FPDF_BYTESTRING)>>(
          'FPDF_LoadMemDocument64');
  late final _FPDF_LoadMemDocument64 =
      _FPDF_LoadMemDocument64Ptr.asFunction<FPDF_DOCUMENT Function(ffi.Pointer<ffi.Void>, int, FPDF_BYTESTRING)>();

  FPDF_DOCUMENT FPDF_LoadCustomDocument(
    ffi.Pointer<FPDF_FILEACCESS> pFileAccess,
    FPDF_BYTESTRING password,
  ) {
    return _FPDF_LoadCustomDocument(
      pFileAccess,
      password,
    );
  }

  late final _FPDF_LoadCustomDocumentPtr =
      _lookup<ffi.NativeFunction<FPDF_DOCUMENT Function(ffi.Pointer<FPDF_FILEACCESS>, FPDF_BYTESTRING)>>(
          'FPDF_LoadCustomDocument');
  late final _FPDF_LoadCustomDocument =
      _FPDF_LoadCustomDocumentPtr.asFunction<FPDF_DOCUMENT Function(ffi.Pointer<FPDF_FILEACCESS>, FPDF_BYTESTRING)>();

  int FPDF_GetFileVersion(
    FPDF_DOCUMENT doc,
    ffi.Pointer<ffi.Int> fileVersion,
  ) {
    return _FPDF_GetFileVersion(
      doc,
      fileVersion,
    );
  }

  late final _FPDF_GetFileVersionPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_DOCUMENT, ffi.Pointer<ffi.Int>)>>('FPDF_GetFileVersion');
  late final _FPDF_GetFileVersion =
      _FPDF_GetFileVersionPtr.asFunction<int Function(FPDF_DOCUMENT, ffi.Pointer<ffi.Int>)>();

  int FPDF_GetLastError() {
    return _FPDF_GetLastError();
  }

  late final _FPDF_GetLastErrorPtr = _lookup<ffi.NativeFunction<ffi.UnsignedLong Function()>>('FPDF_GetLastError');
  late final _FPDF_GetLastError = _FPDF_GetLastErrorPtr.asFunction<int Function()>();

  int FPDF_DocumentHasValidCrossReferenceTable(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_DocumentHasValidCrossReferenceTable(
      document,
    );
  }

  late final _FPDF_DocumentHasValidCrossReferenceTablePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_DOCUMENT)>>('FPDF_DocumentHasValidCrossReferenceTable');
  late final _FPDF_DocumentHasValidCrossReferenceTable =
      _FPDF_DocumentHasValidCrossReferenceTablePtr.asFunction<int Function(FPDF_DOCUMENT)>();

  int FPDF_GetTrailerEnds(
    FPDF_DOCUMENT document,
    ffi.Pointer<ffi.UnsignedInt> buffer,
    int length,
  ) {
    return _FPDF_GetTrailerEnds(
      document,
      buffer,
      length,
    );
  }

  late final _FPDF_GetTrailerEndsPtr = _lookup<
          ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_DOCUMENT, ffi.Pointer<ffi.UnsignedInt>, ffi.UnsignedLong)>>(
      'FPDF_GetTrailerEnds');
  late final _FPDF_GetTrailerEnds =
      _FPDF_GetTrailerEndsPtr.asFunction<int Function(FPDF_DOCUMENT, ffi.Pointer<ffi.UnsignedInt>, int)>();

  int FPDF_GetDocPermissions(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_GetDocPermissions(
      document,
    );
  }

  late final _FPDF_GetDocPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_DOCUMENT)>>('FPDF_GetDocPermissions');
  late final _FPDF_GetDocPermissions = _FPDF_GetDocPermissionsPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  int FPDF_GetDocUserPermissions(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_GetDocUserPermissions(
      document,
    );
  }

  late final _FPDF_GetDocUserPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_DOCUMENT)>>('FPDF_GetDocUserPermissions');
  late final _FPDF_GetDocUserPermissions = _FPDF_GetDocUserPermissionsPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  int FPDF_GetSecurityHandlerRevision(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_GetSecurityHandlerRevision(
      document,
    );
  }

  late final _FPDF_GetSecurityHandlerRevisionPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_DOCUMENT)>>('FPDF_GetSecurityHandlerRevision');
  late final _FPDF_GetSecurityHandlerRevision =
      _FPDF_GetSecurityHandlerRevisionPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  int FPDF_GetPageCount(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_GetPageCount(
      document,
    );
  }

  late final _FPDF_GetPageCountPtr = _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_DOCUMENT)>>('FPDF_GetPageCount');
  late final _FPDF_GetPageCount = _FPDF_GetPageCountPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  FPDF_PAGE FPDF_LoadPage(
    FPDF_DOCUMENT document,
    int page_index,
  ) {
    return _FPDF_LoadPage(
      document,
      page_index,
    );
  }

  late final _FPDF_LoadPagePtr =
      _lookup<ffi.NativeFunction<FPDF_PAGE Function(FPDF_DOCUMENT, ffi.Int)>>('FPDF_LoadPage');
  late final _FPDF_LoadPage = _FPDF_LoadPagePtr.asFunction<FPDF_PAGE Function(FPDF_DOCUMENT, int)>();

  double FPDF_GetPageWidthF(
    FPDF_PAGE page,
  ) {
    return _FPDF_GetPageWidthF(
      page,
    );
  }

  late final _FPDF_GetPageWidthFPtr = _lookup<ffi.NativeFunction<ffi.Float Function(FPDF_PAGE)>>('FPDF_GetPageWidthF');
  late final _FPDF_GetPageWidthF = _FPDF_GetPageWidthFPtr.asFunction<double Function(FPDF_PAGE)>();

  double FPDF_GetPageWidth(
    FPDF_PAGE page,
  ) {
    return _FPDF_GetPageWidth(
      page,
    );
  }

  late final _FPDF_GetPageWidthPtr = _lookup<ffi.NativeFunction<ffi.Double Function(FPDF_PAGE)>>('FPDF_GetPageWidth');
  late final _FPDF_GetPageWidth = _FPDF_GetPageWidthPtr.asFunction<double Function(FPDF_PAGE)>();

  double FPDF_GetPageHeightF(
    FPDF_PAGE page,
  ) {
    return _FPDF_GetPageHeightF(
      page,
    );
  }

  late final _FPDF_GetPageHeightFPtr =
      _lookup<ffi.NativeFunction<ffi.Float Function(FPDF_PAGE)>>('FPDF_GetPageHeightF');
  late final _FPDF_GetPageHeightF = _FPDF_GetPageHeightFPtr.asFunction<double Function(FPDF_PAGE)>();

  double FPDF_GetPageHeight(
    FPDF_PAGE page,
  ) {
    return _FPDF_GetPageHeight(
      page,
    );
  }

  late final _FPDF_GetPageHeightPtr = _lookup<ffi.NativeFunction<ffi.Double Function(FPDF_PAGE)>>('FPDF_GetPageHeight');
  late final _FPDF_GetPageHeight = _FPDF_GetPageHeightPtr.asFunction<double Function(FPDF_PAGE)>();

  int FPDF_GetPageBoundingBox(
    FPDF_PAGE page,
    ffi.Pointer<FS_RECTF> rect,
  ) {
    return _FPDF_GetPageBoundingBox(
      page,
      rect,
    );
  }

  late final _FPDF_GetPageBoundingBoxPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGE, ffi.Pointer<FS_RECTF>)>>('FPDF_GetPageBoundingBox');
  late final _FPDF_GetPageBoundingBox =
      _FPDF_GetPageBoundingBoxPtr.asFunction<int Function(FPDF_PAGE, ffi.Pointer<FS_RECTF>)>();

  int FPDF_GetPageSizeByIndexF(
    FPDF_DOCUMENT document,
    int page_index,
    ffi.Pointer<FS_SIZEF> size,
  ) {
    return _FPDF_GetPageSizeByIndexF(
      document,
      page_index,
      size,
    );
  }

  late final _FPDF_GetPageSizeByIndexFPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_DOCUMENT, ffi.Int, ffi.Pointer<FS_SIZEF>)>>(
          'FPDF_GetPageSizeByIndexF');
  late final _FPDF_GetPageSizeByIndexF =
      _FPDF_GetPageSizeByIndexFPtr.asFunction<int Function(FPDF_DOCUMENT, int, ffi.Pointer<FS_SIZEF>)>();

  int FPDF_GetPageSizeByIndex(
    FPDF_DOCUMENT document,
    int page_index,
    ffi.Pointer<ffi.Double> width,
    ffi.Pointer<ffi.Double> height,
  ) {
    return _FPDF_GetPageSizeByIndex(
      document,
      page_index,
      width,
      height,
    );
  }

  late final _FPDF_GetPageSizeByIndexPtr = _lookup<
          ffi
          .NativeFunction<ffi.Int Function(FPDF_DOCUMENT, ffi.Int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>>(
      'FPDF_GetPageSizeByIndex');
  late final _FPDF_GetPageSizeByIndex = _FPDF_GetPageSizeByIndexPtr.asFunction<
      int Function(FPDF_DOCUMENT, int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>();

  void FPDF_RenderPage(
    HDC dc,
    FPDF_PAGE page,
    int start_x,
    int start_y,
    int size_x,
    int size_y,
    int rotate,
    int flags,
  ) {
    return _FPDF_RenderPage(
      dc,
      page,
      start_x,
      start_y,
      size_x,
      size_y,
      rotate,
      flags,
    );
  }

  late final _FPDF_RenderPagePtr = _lookup<
          ffi.NativeFunction<ffi.Void Function(HDC, FPDF_PAGE, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int)>>(
      'FPDF_RenderPage');
  late final _FPDF_RenderPage =
      _FPDF_RenderPagePtr.asFunction<void Function(HDC, FPDF_PAGE, int, int, int, int, int, int)>();

  void FPDF_RenderPageBitmap(
    FPDF_BITMAP bitmap,
    FPDF_PAGE page,
    int start_x,
    int start_y,
    int size_x,
    int size_y,
    int rotate,
    int flags,
  ) {
    return _FPDF_RenderPageBitmap(
      bitmap,
      page,
      start_x,
      start_y,
      size_x,
      size_y,
      rotate,
      flags,
    );
  }

  late final _FPDF_RenderPageBitmapPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              FPDF_BITMAP, FPDF_PAGE, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int)>>('FPDF_RenderPageBitmap');
  late final _FPDF_RenderPageBitmap =
      _FPDF_RenderPageBitmapPtr.asFunction<void Function(FPDF_BITMAP, FPDF_PAGE, int, int, int, int, int, int)>();

  void FPDF_RenderPageBitmapWithMatrix(
    FPDF_BITMAP bitmap,
    FPDF_PAGE page,
    ffi.Pointer<FS_MATRIX> matrix,
    ffi.Pointer<FS_RECTF> clipping,
    int flags,
  ) {
    return _FPDF_RenderPageBitmapWithMatrix(
      bitmap,
      page,
      matrix,
      clipping,
      flags,
    );
  }

  late final _FPDF_RenderPageBitmapWithMatrixPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(FPDF_BITMAP, FPDF_PAGE, ffi.Pointer<FS_MATRIX>, ffi.Pointer<FS_RECTF>,
              ffi.Int)>>('FPDF_RenderPageBitmapWithMatrix');
  late final _FPDF_RenderPageBitmapWithMatrix = _FPDF_RenderPageBitmapWithMatrixPtr.asFunction<
      void Function(FPDF_BITMAP, FPDF_PAGE, ffi.Pointer<FS_MATRIX>, ffi.Pointer<FS_RECTF>, int)>();

  void FPDF_ClosePage(
    FPDF_PAGE page,
  ) {
    return _FPDF_ClosePage(
      page,
    );
  }

  late final _FPDF_ClosePagePtr = _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_PAGE)>>('FPDF_ClosePage');
  late final _FPDF_ClosePage = _FPDF_ClosePagePtr.asFunction<void Function(FPDF_PAGE)>();

  void FPDF_CloseDocument(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_CloseDocument(
      document,
    );
  }

  late final _FPDF_CloseDocumentPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_DOCUMENT)>>('FPDF_CloseDocument');
  late final _FPDF_CloseDocument = _FPDF_CloseDocumentPtr.asFunction<void Function(FPDF_DOCUMENT)>();

  int FPDF_DeviceToPage(
    FPDF_PAGE page,
    int start_x,
    int start_y,
    int size_x,
    int size_y,
    int rotate,
    int device_x,
    int device_y,
    ffi.Pointer<ffi.Double> page_x,
    ffi.Pointer<ffi.Double> page_y,
  ) {
    return _FPDF_DeviceToPage(
      page,
      start_x,
      start_y,
      size_x,
      size_y,
      rotate,
      device_x,
      device_y,
      page_x,
      page_y,
    );
  }

  late final _FPDF_DeviceToPagePtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGE, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int,
              ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>>('FPDF_DeviceToPage');
  late final _FPDF_DeviceToPage = _FPDF_DeviceToPagePtr.asFunction<
      int Function(FPDF_PAGE, int, int, int, int, int, int, int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>();

  int FPDF_PageToDevice(
    FPDF_PAGE page,
    int start_x,
    int start_y,
    int size_x,
    int size_y,
    int rotate,
    double page_x,
    double page_y,
    ffi.Pointer<ffi.Int> device_x,
    ffi.Pointer<ffi.Int> device_y,
  ) {
    return _FPDF_PageToDevice(
      page,
      start_x,
      start_y,
      size_x,
      size_y,
      rotate,
      page_x,
      page_y,
      device_x,
      device_y,
    );
  }

  late final _FPDF_PageToDevicePtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGE, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Double, ffi.Double,
              ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>)>>('FPDF_PageToDevice');
  late final _FPDF_PageToDevice = _FPDF_PageToDevicePtr.asFunction<
      int Function(FPDF_PAGE, int, int, int, int, int, double, double, ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>)>();

  FPDF_BITMAP FPDFBitmap_Create(
    int width,
    int height,
    int alpha,
  ) {
    return _FPDFBitmap_Create(
      width,
      height,
      alpha,
    );
  }

  late final _FPDFBitmap_CreatePtr =
      _lookup<ffi.NativeFunction<FPDF_BITMAP Function(ffi.Int, ffi.Int, ffi.Int)>>('FPDFBitmap_Create');
  late final _FPDFBitmap_Create = _FPDFBitmap_CreatePtr.asFunction<FPDF_BITMAP Function(int, int, int)>();

  FPDF_BITMAP FPDFBitmap_CreateEx(
    int width,
    int height,
    int format,
    ffi.Pointer<ffi.Void> first_scan,
    int stride,
  ) {
    return _FPDFBitmap_CreateEx(
      width,
      height,
      format,
      first_scan,
      stride,
    );
  }

  late final _FPDFBitmap_CreateExPtr =
      _lookup<ffi.NativeFunction<FPDF_BITMAP Function(ffi.Int, ffi.Int, ffi.Int, ffi.Pointer<ffi.Void>, ffi.Int)>>(
          'FPDFBitmap_CreateEx');
  late final _FPDFBitmap_CreateEx =
      _FPDFBitmap_CreateExPtr.asFunction<FPDF_BITMAP Function(int, int, int, ffi.Pointer<ffi.Void>, int)>();

  int FPDFBitmap_GetFormat(
    FPDF_BITMAP bitmap,
  ) {
    return _FPDFBitmap_GetFormat(
      bitmap,
    );
  }

  late final _FPDFBitmap_GetFormatPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_BITMAP)>>('FPDFBitmap_GetFormat');
  late final _FPDFBitmap_GetFormat = _FPDFBitmap_GetFormatPtr.asFunction<int Function(FPDF_BITMAP)>();

  void FPDFBitmap_FillRect(
    FPDF_BITMAP bitmap,
    int left,
    int top,
    int width,
    int height,
    int color,
  ) {
    return _FPDFBitmap_FillRect(
      bitmap,
      left,
      top,
      width,
      height,
      color,
    );
  }

  late final _FPDFBitmap_FillRectPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_BITMAP, ffi.Int, ffi.Int, ffi.Int, ffi.Int, FPDF_DWORD)>>(
          'FPDFBitmap_FillRect');
  late final _FPDFBitmap_FillRect =
      _FPDFBitmap_FillRectPtr.asFunction<void Function(FPDF_BITMAP, int, int, int, int, int)>();

  ffi.Pointer<ffi.Void> FPDFBitmap_GetBuffer(
    FPDF_BITMAP bitmap,
  ) {
    return _FPDFBitmap_GetBuffer(
      bitmap,
    );
  }

  late final _FPDFBitmap_GetBufferPtr =
      _lookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function(FPDF_BITMAP)>>('FPDFBitmap_GetBuffer');
  late final _FPDFBitmap_GetBuffer = _FPDFBitmap_GetBufferPtr.asFunction<ffi.Pointer<ffi.Void> Function(FPDF_BITMAP)>();

  int FPDFBitmap_GetWidth(
    FPDF_BITMAP bitmap,
  ) {
    return _FPDFBitmap_GetWidth(
      bitmap,
    );
  }

  late final _FPDFBitmap_GetWidthPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_BITMAP)>>('FPDFBitmap_GetWidth');
  late final _FPDFBitmap_GetWidth = _FPDFBitmap_GetWidthPtr.asFunction<int Function(FPDF_BITMAP)>();

  int FPDFBitmap_GetHeight(
    FPDF_BITMAP bitmap,
  ) {
    return _FPDFBitmap_GetHeight(
      bitmap,
    );
  }

  late final _FPDFBitmap_GetHeightPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_BITMAP)>>('FPDFBitmap_GetHeight');
  late final _FPDFBitmap_GetHeight = _FPDFBitmap_GetHeightPtr.asFunction<int Function(FPDF_BITMAP)>();

  int FPDFBitmap_GetStride(
    FPDF_BITMAP bitmap,
  ) {
    return _FPDFBitmap_GetStride(
      bitmap,
    );
  }

  late final _FPDFBitmap_GetStridePtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_BITMAP)>>('FPDFBitmap_GetStride');
  late final _FPDFBitmap_GetStride = _FPDFBitmap_GetStridePtr.asFunction<int Function(FPDF_BITMAP)>();

  void FPDFBitmap_Destroy(
    FPDF_BITMAP bitmap,
  ) {
    return _FPDFBitmap_Destroy(
      bitmap,
    );
  }

  late final _FPDFBitmap_DestroyPtr = _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_BITMAP)>>('FPDFBitmap_Destroy');
  late final _FPDFBitmap_Destroy = _FPDFBitmap_DestroyPtr.asFunction<void Function(FPDF_BITMAP)>();

  int FPDF_VIEWERREF_GetPrintScaling(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_VIEWERREF_GetPrintScaling(
      document,
    );
  }

  late final _FPDF_VIEWERREF_GetPrintScalingPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_DOCUMENT)>>('FPDF_VIEWERREF_GetPrintScaling');
  late final _FPDF_VIEWERREF_GetPrintScaling =
      _FPDF_VIEWERREF_GetPrintScalingPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  int FPDF_VIEWERREF_GetNumCopies(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_VIEWERREF_GetNumCopies(
      document,
    );
  }

  late final _FPDF_VIEWERREF_GetNumCopiesPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_DOCUMENT)>>('FPDF_VIEWERREF_GetNumCopies');
  late final _FPDF_VIEWERREF_GetNumCopies = _FPDF_VIEWERREF_GetNumCopiesPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  FPDF_PAGERANGE FPDF_VIEWERREF_GetPrintPageRange(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_VIEWERREF_GetPrintPageRange(
      document,
    );
  }

  late final _FPDF_VIEWERREF_GetPrintPageRangePtr =
      _lookup<ffi.NativeFunction<FPDF_PAGERANGE Function(FPDF_DOCUMENT)>>('FPDF_VIEWERREF_GetPrintPageRange');
  late final _FPDF_VIEWERREF_GetPrintPageRange =
      _FPDF_VIEWERREF_GetPrintPageRangePtr.asFunction<FPDF_PAGERANGE Function(FPDF_DOCUMENT)>();

  int FPDF_VIEWERREF_GetPrintPageRangeCount(
    FPDF_PAGERANGE pagerange,
  ) {
    return _FPDF_VIEWERREF_GetPrintPageRangeCount(
      pagerange,
    );
  }

  late final _FPDF_VIEWERREF_GetPrintPageRangeCountPtr =
      _lookup<ffi.NativeFunction<ffi.Size Function(FPDF_PAGERANGE)>>('FPDF_VIEWERREF_GetPrintPageRangeCount');
  late final _FPDF_VIEWERREF_GetPrintPageRangeCount =
      _FPDF_VIEWERREF_GetPrintPageRangeCountPtr.asFunction<int Function(FPDF_PAGERANGE)>();

  int FPDF_VIEWERREF_GetPrintPageRangeElement(
    FPDF_PAGERANGE pagerange,
    int index,
  ) {
    return _FPDF_VIEWERREF_GetPrintPageRangeElement(
      pagerange,
      index,
    );
  }

  late final _FPDF_VIEWERREF_GetPrintPageRangeElementPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGERANGE, ffi.Size)>>(
          'FPDF_VIEWERREF_GetPrintPageRangeElement');
  late final _FPDF_VIEWERREF_GetPrintPageRangeElement =
      _FPDF_VIEWERREF_GetPrintPageRangeElementPtr.asFunction<int Function(FPDF_PAGERANGE, int)>();

  int FPDF_VIEWERREF_GetDuplex(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_VIEWERREF_GetDuplex(
      document,
    );
  }

  late final _FPDF_VIEWERREF_GetDuplexPtr =
      _lookup<ffi.NativeFunction<ffi.Int32 Function(FPDF_DOCUMENT)>>('FPDF_VIEWERREF_GetDuplex');
  late final _FPDF_VIEWERREF_GetDuplex = _FPDF_VIEWERREF_GetDuplexPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  int FPDF_VIEWERREF_GetName(
    FPDF_DOCUMENT document,
    FPDF_BYTESTRING key,
    ffi.Pointer<ffi.Char> buffer,
    int length,
  ) {
    return _FPDF_VIEWERREF_GetName(
      document,
      key,
      buffer,
      length,
    );
  }

  late final _FPDF_VIEWERREF_GetNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(
              FPDF_DOCUMENT, FPDF_BYTESTRING, ffi.Pointer<ffi.Char>, ffi.UnsignedLong)>>('FPDF_VIEWERREF_GetName');
  late final _FPDF_VIEWERREF_GetName =
      _FPDF_VIEWERREF_GetNamePtr.asFunction<int Function(FPDF_DOCUMENT, FPDF_BYTESTRING, ffi.Pointer<ffi.Char>, int)>();

  int FPDF_CountNamedDests(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_CountNamedDests(
      document,
    );
  }

  late final _FPDF_CountNamedDestsPtr =
      _lookup<ffi.NativeFunction<FPDF_DWORD Function(FPDF_DOCUMENT)>>('FPDF_CountNamedDests');
  late final _FPDF_CountNamedDests = _FPDF_CountNamedDestsPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  FPDF_DEST FPDF_GetNamedDestByName(
    FPDF_DOCUMENT document,
    FPDF_BYTESTRING name,
  ) {
    return _FPDF_GetNamedDestByName(
      document,
      name,
    );
  }

  late final _FPDF_GetNamedDestByNamePtr =
      _lookup<ffi.NativeFunction<FPDF_DEST Function(FPDF_DOCUMENT, FPDF_BYTESTRING)>>('FPDF_GetNamedDestByName');
  late final _FPDF_GetNamedDestByName =
      _FPDF_GetNamedDestByNamePtr.asFunction<FPDF_DEST Function(FPDF_DOCUMENT, FPDF_BYTESTRING)>();

  FPDF_DEST FPDF_GetNamedDest(
    FPDF_DOCUMENT document,
    int index,
    ffi.Pointer<ffi.Void> buffer,
    ffi.Pointer<ffi.Long> buflen,
  ) {
    return _FPDF_GetNamedDest(
      document,
      index,
      buffer,
      buflen,
    );
  }

  late final _FPDF_GetNamedDestPtr = _lookup<
          ffi.NativeFunction<FPDF_DEST Function(FPDF_DOCUMENT, ffi.Int, ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Long>)>>(
      'FPDF_GetNamedDest');
  late final _FPDF_GetNamedDest = _FPDF_GetNamedDestPtr.asFunction<
      FPDF_DEST Function(FPDF_DOCUMENT, int, ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Long>)>();

  int FPDF_GetXFAPacketCount(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_GetXFAPacketCount(
      document,
    );
  }

  late final _FPDF_GetXFAPacketCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_DOCUMENT)>>('FPDF_GetXFAPacketCount');
  late final _FPDF_GetXFAPacketCount = _FPDF_GetXFAPacketCountPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  int FPDF_GetXFAPacketName(
    FPDF_DOCUMENT document,
    int index,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDF_GetXFAPacketName(
      document,
      index,
      buffer,
      buflen,
    );
  }

  late final _FPDF_GetXFAPacketNamePtr = _lookup<
          ffi
          .NativeFunction<ffi.UnsignedLong Function(FPDF_DOCUMENT, ffi.Int, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>(
      'FPDF_GetXFAPacketName');
  late final _FPDF_GetXFAPacketName =
      _FPDF_GetXFAPacketNamePtr.asFunction<int Function(FPDF_DOCUMENT, int, ffi.Pointer<ffi.Void>, int)>();

  int FPDF_GetXFAPacketContent(
    FPDF_DOCUMENT document,
    int index,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
    ffi.Pointer<ffi.UnsignedLong> out_buflen,
  ) {
    return _FPDF_GetXFAPacketContent(
      document,
      index,
      buffer,
      buflen,
      out_buflen,
    );
  }

  late final _FPDF_GetXFAPacketContentPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_DOCUMENT, ffi.Int, ffi.Pointer<ffi.Void>, ffi.UnsignedLong,
              ffi.Pointer<ffi.UnsignedLong>)>>('FPDF_GetXFAPacketContent');
  late final _FPDF_GetXFAPacketContent = _FPDF_GetXFAPacketContentPtr.asFunction<
      int Function(FPDF_DOCUMENT, int, ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.UnsignedLong>)>();

  FPDF_FORMHANDLE FPDFDOC_InitFormFillEnvironment(
    FPDF_DOCUMENT document,
    ffi.Pointer<FPDF_FORMFILLINFO> formInfo,
  ) {
    return _FPDFDOC_InitFormFillEnvironment(
      document,
      formInfo,
    );
  }

  late final _FPDFDOC_InitFormFillEnvironmentPtr =
      _lookup<ffi.NativeFunction<FPDF_FORMHANDLE Function(FPDF_DOCUMENT, ffi.Pointer<FPDF_FORMFILLINFO>)>>(
          'FPDFDOC_InitFormFillEnvironment');
  late final _FPDFDOC_InitFormFillEnvironment = _FPDFDOC_InitFormFillEnvironmentPtr.asFunction<
      FPDF_FORMHANDLE Function(FPDF_DOCUMENT, ffi.Pointer<FPDF_FORMFILLINFO>)>();

  void FPDFDOC_ExitFormFillEnvironment(
    FPDF_FORMHANDLE hHandle,
  ) {
    return _FPDFDOC_ExitFormFillEnvironment(
      hHandle,
    );
  }

  late final _FPDFDOC_ExitFormFillEnvironmentPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FORMHANDLE)>>('FPDFDOC_ExitFormFillEnvironment');
  late final _FPDFDOC_ExitFormFillEnvironment =
      _FPDFDOC_ExitFormFillEnvironmentPtr.asFunction<void Function(FPDF_FORMHANDLE)>();

  void FORM_OnAfterLoadPage(
    FPDF_PAGE page,
    FPDF_FORMHANDLE hHandle,
  ) {
    return _FORM_OnAfterLoadPage(
      page,
      hHandle,
    );
  }

  late final _FORM_OnAfterLoadPagePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_PAGE, FPDF_FORMHANDLE)>>('FORM_OnAfterLoadPage');
  late final _FORM_OnAfterLoadPage = _FORM_OnAfterLoadPagePtr.asFunction<void Function(FPDF_PAGE, FPDF_FORMHANDLE)>();

  void FORM_OnBeforeClosePage(
    FPDF_PAGE page,
    FPDF_FORMHANDLE hHandle,
  ) {
    return _FORM_OnBeforeClosePage(
      page,
      hHandle,
    );
  }

  late final _FORM_OnBeforeClosePagePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_PAGE, FPDF_FORMHANDLE)>>('FORM_OnBeforeClosePage');
  late final _FORM_OnBeforeClosePage =
      _FORM_OnBeforeClosePagePtr.asFunction<void Function(FPDF_PAGE, FPDF_FORMHANDLE)>();

  void FORM_DoDocumentJSAction(
    FPDF_FORMHANDLE hHandle,
  ) {
    return _FORM_DoDocumentJSAction(
      hHandle,
    );
  }

  late final _FORM_DoDocumentJSActionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FORMHANDLE)>>('FORM_DoDocumentJSAction');
  late final _FORM_DoDocumentJSAction = _FORM_DoDocumentJSActionPtr.asFunction<void Function(FPDF_FORMHANDLE)>();

  void FORM_DoDocumentOpenAction(
    FPDF_FORMHANDLE hHandle,
  ) {
    return _FORM_DoDocumentOpenAction(
      hHandle,
    );
  }

  late final _FORM_DoDocumentOpenActionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FORMHANDLE)>>('FORM_DoDocumentOpenAction');
  late final _FORM_DoDocumentOpenAction = _FORM_DoDocumentOpenActionPtr.asFunction<void Function(FPDF_FORMHANDLE)>();

  void FORM_DoDocumentAAction(
    FPDF_FORMHANDLE hHandle,
    int aaType,
  ) {
    return _FORM_DoDocumentAAction(
      hHandle,
      aaType,
    );
  }

  late final _FORM_DoDocumentAActionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FORMHANDLE, ffi.Int)>>('FORM_DoDocumentAAction');
  late final _FORM_DoDocumentAAction = _FORM_DoDocumentAActionPtr.asFunction<void Function(FPDF_FORMHANDLE, int)>();

  void FORM_DoPageAAction(
    FPDF_PAGE page,
    FPDF_FORMHANDLE hHandle,
    int aaType,
  ) {
    return _FORM_DoPageAAction(
      page,
      hHandle,
      aaType,
    );
  }

  late final _FORM_DoPageAActionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_PAGE, FPDF_FORMHANDLE, ffi.Int)>>('FORM_DoPageAAction');
  late final _FORM_DoPageAAction = _FORM_DoPageAActionPtr.asFunction<void Function(FPDF_PAGE, FPDF_FORMHANDLE, int)>();

  int FORM_OnMouseMove(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int modifier,
    double page_x,
    double page_y,
  ) {
    return _FORM_OnMouseMove(
      hHandle,
      page,
      modifier,
      page_x,
      page_y,
    );
  }

  late final _FORM_OnMouseMovePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Double, ffi.Double)>>(
          'FORM_OnMouseMove');
  late final _FORM_OnMouseMove =
      _FORM_OnMouseMovePtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, double, double)>();

  int FORM_OnMouseWheel(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int modifier,
    ffi.Pointer<FS_POINTF> page_coord,
    int delta_x,
    int delta_y,
  ) {
    return _FORM_OnMouseWheel(
      hHandle,
      page,
      modifier,
      page_coord,
      delta_x,
      delta_y,
    );
  }

  late final _FORM_OnMouseWheelPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(
              FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Pointer<FS_POINTF>, ffi.Int, ffi.Int)>>('FORM_OnMouseWheel');
  late final _FORM_OnMouseWheel = _FORM_OnMouseWheelPtr.asFunction<
      int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, ffi.Pointer<FS_POINTF>, int, int)>();

  int FORM_OnFocus(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int modifier,
    double page_x,
    double page_y,
  ) {
    return _FORM_OnFocus(
      hHandle,
      page,
      modifier,
      page_x,
      page_y,
    );
  }

  late final _FORM_OnFocusPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Double, ffi.Double)>>(
          'FORM_OnFocus');
  late final _FORM_OnFocus =
      _FORM_OnFocusPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, double, double)>();

  int FORM_OnLButtonDown(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int modifier,
    double page_x,
    double page_y,
  ) {
    return _FORM_OnLButtonDown(
      hHandle,
      page,
      modifier,
      page_x,
      page_y,
    );
  }

  late final _FORM_OnLButtonDownPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Double, ffi.Double)>>(
          'FORM_OnLButtonDown');
  late final _FORM_OnLButtonDown =
      _FORM_OnLButtonDownPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, double, double)>();

  int FORM_OnRButtonDown(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int modifier,
    double page_x,
    double page_y,
  ) {
    return _FORM_OnRButtonDown(
      hHandle,
      page,
      modifier,
      page_x,
      page_y,
    );
  }

  late final _FORM_OnRButtonDownPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Double, ffi.Double)>>(
          'FORM_OnRButtonDown');
  late final _FORM_OnRButtonDown =
      _FORM_OnRButtonDownPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, double, double)>();

  int FORM_OnLButtonUp(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int modifier,
    double page_x,
    double page_y,
  ) {
    return _FORM_OnLButtonUp(
      hHandle,
      page,
      modifier,
      page_x,
      page_y,
    );
  }

  late final _FORM_OnLButtonUpPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Double, ffi.Double)>>(
          'FORM_OnLButtonUp');
  late final _FORM_OnLButtonUp =
      _FORM_OnLButtonUpPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, double, double)>();

  int FORM_OnRButtonUp(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int modifier,
    double page_x,
    double page_y,
  ) {
    return _FORM_OnRButtonUp(
      hHandle,
      page,
      modifier,
      page_x,
      page_y,
    );
  }

  late final _FORM_OnRButtonUpPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Double, ffi.Double)>>(
          'FORM_OnRButtonUp');
  late final _FORM_OnRButtonUp =
      _FORM_OnRButtonUpPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, double, double)>();

  int FORM_OnLButtonDoubleClick(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int modifier,
    double page_x,
    double page_y,
  ) {
    return _FORM_OnLButtonDoubleClick(
      hHandle,
      page,
      modifier,
      page_x,
      page_y,
    );
  }

  late final _FORM_OnLButtonDoubleClickPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Double, ffi.Double)>>(
          'FORM_OnLButtonDoubleClick');
  late final _FORM_OnLButtonDoubleClick =
      _FORM_OnLButtonDoubleClickPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, double, double)>();

  int FORM_OnKeyDown(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int nKeyCode,
    int modifier,
  ) {
    return _FORM_OnKeyDown(
      hHandle,
      page,
      nKeyCode,
      modifier,
    );
  }

  late final _FORM_OnKeyDownPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Int)>>('FORM_OnKeyDown');
  late final _FORM_OnKeyDown = _FORM_OnKeyDownPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, int)>();

  int FORM_OnKeyUp(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int nKeyCode,
    int modifier,
  ) {
    return _FORM_OnKeyUp(
      hHandle,
      page,
      nKeyCode,
      modifier,
    );
  }

  late final _FORM_OnKeyUpPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Int)>>('FORM_OnKeyUp');
  late final _FORM_OnKeyUp = _FORM_OnKeyUpPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, int)>();

  int FORM_OnChar(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int nChar,
    int modifier,
  ) {
    return _FORM_OnChar(
      hHandle,
      page,
      nChar,
      modifier,
    );
  }

  late final _FORM_OnCharPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, ffi.Int)>>('FORM_OnChar');
  late final _FORM_OnChar = _FORM_OnCharPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, int)>();

  int FORM_GetFocusedText(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FORM_GetFocusedText(
      hHandle,
      page,
      buffer,
      buflen,
    );
  }

  late final _FORM_GetFocusedTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(
              FPDF_FORMHANDLE, FPDF_PAGE, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>('FORM_GetFocusedText');
  late final _FORM_GetFocusedText =
      _FORM_GetFocusedTextPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Pointer<ffi.Void>, int)>();

  int FORM_GetSelectedText(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FORM_GetSelectedText(
      hHandle,
      page,
      buffer,
      buflen,
    );
  }

  late final _FORM_GetSelectedTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(
              FPDF_FORMHANDLE, FPDF_PAGE, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>('FORM_GetSelectedText');
  late final _FORM_GetSelectedText =
      _FORM_GetSelectedTextPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Pointer<ffi.Void>, int)>();

  void FORM_ReplaceAndKeepSelection(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    FPDF_WIDESTRING wsText,
  ) {
    return _FORM_ReplaceAndKeepSelection(
      hHandle,
      page,
      wsText,
    );
  }

  late final _FORM_ReplaceAndKeepSelectionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FORMHANDLE, FPDF_PAGE, FPDF_WIDESTRING)>>(
          'FORM_ReplaceAndKeepSelection');
  late final _FORM_ReplaceAndKeepSelection =
      _FORM_ReplaceAndKeepSelectionPtr.asFunction<void Function(FPDF_FORMHANDLE, FPDF_PAGE, FPDF_WIDESTRING)>();

  void FORM_ReplaceSelection(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    FPDF_WIDESTRING wsText,
  ) {
    return _FORM_ReplaceSelection(
      hHandle,
      page,
      wsText,
    );
  }

  late final _FORM_ReplaceSelectionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FORMHANDLE, FPDF_PAGE, FPDF_WIDESTRING)>>(
          'FORM_ReplaceSelection');
  late final _FORM_ReplaceSelection =
      _FORM_ReplaceSelectionPtr.asFunction<void Function(FPDF_FORMHANDLE, FPDF_PAGE, FPDF_WIDESTRING)>();

  int FORM_SelectAllText(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
  ) {
    return _FORM_SelectAllText(
      hHandle,
      page,
    );
  }

  late final _FORM_SelectAllTextPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE)>>('FORM_SelectAllText');
  late final _FORM_SelectAllText = _FORM_SelectAllTextPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE)>();

  int FORM_CanUndo(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
  ) {
    return _FORM_CanUndo(
      hHandle,
      page,
    );
  }

  late final _FORM_CanUndoPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE)>>('FORM_CanUndo');
  late final _FORM_CanUndo = _FORM_CanUndoPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE)>();

  int FORM_CanRedo(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
  ) {
    return _FORM_CanRedo(
      hHandle,
      page,
    );
  }

  late final _FORM_CanRedoPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE)>>('FORM_CanRedo');
  late final _FORM_CanRedo = _FORM_CanRedoPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE)>();

  int FORM_Undo(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
  ) {
    return _FORM_Undo(
      hHandle,
      page,
    );
  }

  late final _FORM_UndoPtr = _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE)>>('FORM_Undo');
  late final _FORM_Undo = _FORM_UndoPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE)>();

  int FORM_Redo(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
  ) {
    return _FORM_Redo(
      hHandle,
      page,
    );
  }

  late final _FORM_RedoPtr = _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE)>>('FORM_Redo');
  late final _FORM_Redo = _FORM_RedoPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE)>();

  int FORM_ForceToKillFocus(
    FPDF_FORMHANDLE hHandle,
  ) {
    return _FORM_ForceToKillFocus(
      hHandle,
    );
  }

  late final _FORM_ForceToKillFocusPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE)>>('FORM_ForceToKillFocus');
  late final _FORM_ForceToKillFocus = _FORM_ForceToKillFocusPtr.asFunction<int Function(FPDF_FORMHANDLE)>();

  int FORM_GetFocusedAnnot(
    FPDF_FORMHANDLE handle,
    ffi.Pointer<ffi.Int> page_index,
    ffi.Pointer<FPDF_ANNOTATION> annot,
  ) {
    return _FORM_GetFocusedAnnot(
      handle,
      page_index,
      annot,
    );
  }

  late final _FORM_GetFocusedAnnotPtr = _lookup<
          ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, ffi.Pointer<ffi.Int>, ffi.Pointer<FPDF_ANNOTATION>)>>(
      'FORM_GetFocusedAnnot');
  late final _FORM_GetFocusedAnnot = _FORM_GetFocusedAnnotPtr.asFunction<
      int Function(FPDF_FORMHANDLE, ffi.Pointer<ffi.Int>, ffi.Pointer<FPDF_ANNOTATION>)>();

  int FORM_SetFocusedAnnot(
    FPDF_FORMHANDLE handle,
    FPDF_ANNOTATION annot,
  ) {
    return _FORM_SetFocusedAnnot(
      handle,
      annot,
    );
  }

  late final _FORM_SetFocusedAnnotPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>>('FORM_SetFocusedAnnot');
  late final _FORM_SetFocusedAnnot =
      _FORM_SetFocusedAnnotPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>();

  int FPDFPage_HasFormFieldAtPoint(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    double page_x,
    double page_y,
  ) {
    return _FPDFPage_HasFormFieldAtPoint(
      hHandle,
      page,
      page_x,
      page_y,
    );
  }

  late final _FPDFPage_HasFormFieldAtPointPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Double, ffi.Double)>>(
          'FPDFPage_HasFormFieldAtPoint');
  late final _FPDFPage_HasFormFieldAtPoint =
      _FPDFPage_HasFormFieldAtPointPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, double, double)>();

  int FPDFPage_FormFieldZOrderAtPoint(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    double page_x,
    double page_y,
  ) {
    return _FPDFPage_FormFieldZOrderAtPoint(
      hHandle,
      page,
      page_x,
      page_y,
    );
  }

  late final _FPDFPage_FormFieldZOrderAtPointPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Double, ffi.Double)>>(
          'FPDFPage_FormFieldZOrderAtPoint');
  late final _FPDFPage_FormFieldZOrderAtPoint =
      _FPDFPage_FormFieldZOrderAtPointPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, double, double)>();

  void FPDF_SetFormFieldHighlightColor(
    FPDF_FORMHANDLE hHandle,
    int fieldType,
    int color,
  ) {
    return _FPDF_SetFormFieldHighlightColor(
      hHandle,
      fieldType,
      color,
    );
  }

  late final _FPDF_SetFormFieldHighlightColorPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FORMHANDLE, ffi.Int, ffi.UnsignedLong)>>(
          'FPDF_SetFormFieldHighlightColor');
  late final _FPDF_SetFormFieldHighlightColor =
      _FPDF_SetFormFieldHighlightColorPtr.asFunction<void Function(FPDF_FORMHANDLE, int, int)>();

  void FPDF_SetFormFieldHighlightAlpha(
    FPDF_FORMHANDLE hHandle,
    int alpha,
  ) {
    return _FPDF_SetFormFieldHighlightAlpha(
      hHandle,
      alpha,
    );
  }

  late final _FPDF_SetFormFieldHighlightAlphaPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FORMHANDLE, ffi.UnsignedChar)>>(
          'FPDF_SetFormFieldHighlightAlpha');
  late final _FPDF_SetFormFieldHighlightAlpha =
      _FPDF_SetFormFieldHighlightAlphaPtr.asFunction<void Function(FPDF_FORMHANDLE, int)>();

  void FPDF_RemoveFormFieldHighlight(
    FPDF_FORMHANDLE hHandle,
  ) {
    return _FPDF_RemoveFormFieldHighlight(
      hHandle,
    );
  }

  late final _FPDF_RemoveFormFieldHighlightPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FORMHANDLE)>>('FPDF_RemoveFormFieldHighlight');
  late final _FPDF_RemoveFormFieldHighlight =
      _FPDF_RemoveFormFieldHighlightPtr.asFunction<void Function(FPDF_FORMHANDLE)>();

  void FPDF_FFLDraw(
    FPDF_FORMHANDLE hHandle,
    FPDF_BITMAP bitmap,
    FPDF_PAGE page,
    int start_x,
    int start_y,
    int size_x,
    int size_y,
    int rotate,
    int flags,
  ) {
    return _FPDF_FFLDraw(
      hHandle,
      bitmap,
      page,
      start_x,
      start_y,
      size_x,
      size_y,
      rotate,
      flags,
    );
  }

  late final _FPDF_FFLDrawPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(FPDF_FORMHANDLE, FPDF_BITMAP, FPDF_PAGE, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int,
              ffi.Int)>>('FPDF_FFLDraw');
  late final _FPDF_FFLDraw = _FPDF_FFLDrawPtr.asFunction<
      void Function(FPDF_FORMHANDLE, FPDF_BITMAP, FPDF_PAGE, int, int, int, int, int, int)>();

  int FPDF_GetFormType(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_GetFormType(
      document,
    );
  }

  late final _FPDF_GetFormTypePtr = _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_DOCUMENT)>>('FPDF_GetFormType');
  late final _FPDF_GetFormType = _FPDF_GetFormTypePtr.asFunction<int Function(FPDF_DOCUMENT)>();

  int FORM_SetIndexSelected(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int index,
    int selected,
  ) {
    return _FORM_SetIndexSelected(
      hHandle,
      page,
      index,
      selected,
    );
  }

  late final _FORM_SetIndexSelectedPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int, FPDF_BOOL)>>(
          'FORM_SetIndexSelected');
  late final _FORM_SetIndexSelected =
      _FORM_SetIndexSelectedPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int, int)>();

  int FORM_IsIndexSelected(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    int index,
  ) {
    return _FORM_IsIndexSelected(
      hHandle,
      page,
      index,
    );
  }

  late final _FORM_IsIndexSelectedPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Int)>>('FORM_IsIndexSelected');
  late final _FORM_IsIndexSelected =
      _FORM_IsIndexSelectedPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_PAGE, int)>();

  int FPDF_LoadXFA(
    FPDF_DOCUMENT document,
  ) {
    return _FPDF_LoadXFA(
      document,
    );
  }

  late final _FPDF_LoadXFAPtr = _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_DOCUMENT)>>('FPDF_LoadXFA');
  late final _FPDF_LoadXFA = _FPDF_LoadXFAPtr.asFunction<int Function(FPDF_DOCUMENT)>();

  int FPDFAnnot_IsSupportedSubtype(
    int subtype,
  ) {
    return _FPDFAnnot_IsSupportedSubtype(
      subtype,
    );
  }

  late final _FPDFAnnot_IsSupportedSubtypePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION_SUBTYPE)>>('FPDFAnnot_IsSupportedSubtype');
  late final _FPDFAnnot_IsSupportedSubtype = _FPDFAnnot_IsSupportedSubtypePtr.asFunction<int Function(int)>();

  FPDF_ANNOTATION FPDFPage_CreateAnnot(
    FPDF_PAGE page,
    int subtype,
  ) {
    return _FPDFPage_CreateAnnot(
      page,
      subtype,
    );
  }

  late final _FPDFPage_CreateAnnotPtr =
      _lookup<ffi.NativeFunction<FPDF_ANNOTATION Function(FPDF_PAGE, FPDF_ANNOTATION_SUBTYPE)>>('FPDFPage_CreateAnnot');
  late final _FPDFPage_CreateAnnot = _FPDFPage_CreateAnnotPtr.asFunction<FPDF_ANNOTATION Function(FPDF_PAGE, int)>();

  int FPDFPage_GetAnnotCount(
    FPDF_PAGE page,
  ) {
    return _FPDFPage_GetAnnotCount(
      page,
    );
  }

  late final _FPDFPage_GetAnnotCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGE)>>('FPDFPage_GetAnnotCount');
  late final _FPDFPage_GetAnnotCount = _FPDFPage_GetAnnotCountPtr.asFunction<int Function(FPDF_PAGE)>();

  FPDF_ANNOTATION FPDFPage_GetAnnot(
    FPDF_PAGE page,
    int index,
  ) {
    return _FPDFPage_GetAnnot(
      page,
      index,
    );
  }

  late final _FPDFPage_GetAnnotPtr =
      _lookup<ffi.NativeFunction<FPDF_ANNOTATION Function(FPDF_PAGE, ffi.Int)>>('FPDFPage_GetAnnot');
  late final _FPDFPage_GetAnnot = _FPDFPage_GetAnnotPtr.asFunction<FPDF_ANNOTATION Function(FPDF_PAGE, int)>();

  int FPDFPage_GetAnnotIndex(
    FPDF_PAGE page,
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFPage_GetAnnotIndex(
      page,
      annot,
    );
  }

  late final _FPDFPage_GetAnnotIndexPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGE, FPDF_ANNOTATION)>>('FPDFPage_GetAnnotIndex');
  late final _FPDFPage_GetAnnotIndex =
      _FPDFPage_GetAnnotIndexPtr.asFunction<int Function(FPDF_PAGE, FPDF_ANNOTATION)>();

  void FPDFPage_CloseAnnot(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFPage_CloseAnnot(
      annot,
    );
  }

  late final _FPDFPage_CloseAnnotPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_ANNOTATION)>>('FPDFPage_CloseAnnot');
  late final _FPDFPage_CloseAnnot = _FPDFPage_CloseAnnotPtr.asFunction<void Function(FPDF_ANNOTATION)>();

  int FPDFPage_RemoveAnnot(
    FPDF_PAGE page,
    int index,
  ) {
    return _FPDFPage_RemoveAnnot(
      page,
      index,
    );
  }

  late final _FPDFPage_RemoveAnnotPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGE, ffi.Int)>>('FPDFPage_RemoveAnnot');
  late final _FPDFPage_RemoveAnnot = _FPDFPage_RemoveAnnotPtr.asFunction<int Function(FPDF_PAGE, int)>();

  int FPDFAnnot_GetSubtype(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetSubtype(
      annot,
    );
  }

  late final _FPDFAnnot_GetSubtypePtr =
      _lookup<ffi.NativeFunction<FPDF_ANNOTATION_SUBTYPE Function(FPDF_ANNOTATION)>>('FPDFAnnot_GetSubtype');
  late final _FPDFAnnot_GetSubtype = _FPDFAnnot_GetSubtypePtr.asFunction<int Function(FPDF_ANNOTATION)>();

  int FPDFAnnot_IsObjectSupportedSubtype(
    int subtype,
  ) {
    return _FPDFAnnot_IsObjectSupportedSubtype(
      subtype,
    );
  }

  late final _FPDFAnnot_IsObjectSupportedSubtypePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION_SUBTYPE)>>('FPDFAnnot_IsObjectSupportedSubtype');
  late final _FPDFAnnot_IsObjectSupportedSubtype =
      _FPDFAnnot_IsObjectSupportedSubtypePtr.asFunction<int Function(int)>();

  int FPDFAnnot_UpdateObject(
    FPDF_ANNOTATION annot,
    FPDF_PAGEOBJECT obj,
  ) {
    return _FPDFAnnot_UpdateObject(
      annot,
      obj,
    );
  }

  late final _FPDFAnnot_UpdateObjectPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, FPDF_PAGEOBJECT)>>('FPDFAnnot_UpdateObject');
  late final _FPDFAnnot_UpdateObject =
      _FPDFAnnot_UpdateObjectPtr.asFunction<int Function(FPDF_ANNOTATION, FPDF_PAGEOBJECT)>();

  int FPDFAnnot_AddInkStroke(
    FPDF_ANNOTATION annot,
    ffi.Pointer<FS_POINTF> points,
    int point_count,
  ) {
    return _FPDFAnnot_AddInkStroke(
      annot,
      points,
      point_count,
    );
  }

  late final _FPDFAnnot_AddInkStrokePtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_ANNOTATION, ffi.Pointer<FS_POINTF>, ffi.Size)>>(
          'FPDFAnnot_AddInkStroke');
  late final _FPDFAnnot_AddInkStroke =
      _FPDFAnnot_AddInkStrokePtr.asFunction<int Function(FPDF_ANNOTATION, ffi.Pointer<FS_POINTF>, int)>();

  int FPDFAnnot_RemoveInkList(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_RemoveInkList(
      annot,
    );
  }

  late final _FPDFAnnot_RemoveInkListPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION)>>('FPDFAnnot_RemoveInkList');
  late final _FPDFAnnot_RemoveInkList = _FPDFAnnot_RemoveInkListPtr.asFunction<int Function(FPDF_ANNOTATION)>();

  int FPDFAnnot_AppendObject(
    FPDF_ANNOTATION annot,
    FPDF_PAGEOBJECT obj,
  ) {
    return _FPDFAnnot_AppendObject(
      annot,
      obj,
    );
  }

  late final _FPDFAnnot_AppendObjectPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, FPDF_PAGEOBJECT)>>('FPDFAnnot_AppendObject');
  late final _FPDFAnnot_AppendObject =
      _FPDFAnnot_AppendObjectPtr.asFunction<int Function(FPDF_ANNOTATION, FPDF_PAGEOBJECT)>();

  int FPDFAnnot_GetObjectCount(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetObjectCount(
      annot,
    );
  }

  late final _FPDFAnnot_GetObjectCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_ANNOTATION)>>('FPDFAnnot_GetObjectCount');
  late final _FPDFAnnot_GetObjectCount = _FPDFAnnot_GetObjectCountPtr.asFunction<int Function(FPDF_ANNOTATION)>();

  FPDF_PAGEOBJECT FPDFAnnot_GetObject(
    FPDF_ANNOTATION annot,
    int index,
  ) {
    return _FPDFAnnot_GetObject(
      annot,
      index,
    );
  }

  late final _FPDFAnnot_GetObjectPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECT Function(FPDF_ANNOTATION, ffi.Int)>>('FPDFAnnot_GetObject');
  late final _FPDFAnnot_GetObject =
      _FPDFAnnot_GetObjectPtr.asFunction<FPDF_PAGEOBJECT Function(FPDF_ANNOTATION, int)>();

  int FPDFAnnot_RemoveObject(
    FPDF_ANNOTATION annot,
    int index,
  ) {
    return _FPDFAnnot_RemoveObject(
      annot,
      index,
    );
  }

  late final _FPDFAnnot_RemoveObjectPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Int)>>('FPDFAnnot_RemoveObject');
  late final _FPDFAnnot_RemoveObject = _FPDFAnnot_RemoveObjectPtr.asFunction<int Function(FPDF_ANNOTATION, int)>();

  int FPDFAnnot_SetColor(
    FPDF_ANNOTATION annot,
    int type,
    int R,
    int G,
    int B,
    int A,
  ) {
    return _FPDFAnnot_SetColor(
      annot,
      type,
      R,
      G,
      B,
      A,
    );
  }

  late final _FPDFAnnot_SetColorPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Int32, ffi.UnsignedInt, ffi.UnsignedInt, ffi.UnsignedInt,
              ffi.UnsignedInt)>>('FPDFAnnot_SetColor');
  late final _FPDFAnnot_SetColor =
      _FPDFAnnot_SetColorPtr.asFunction<int Function(FPDF_ANNOTATION, int, int, int, int, int)>();

  int FPDFAnnot_GetColor(
    FPDF_ANNOTATION annot,
    int type,
    ffi.Pointer<ffi.UnsignedInt> R,
    ffi.Pointer<ffi.UnsignedInt> G,
    ffi.Pointer<ffi.UnsignedInt> B,
    ffi.Pointer<ffi.UnsignedInt> A,
  ) {
    return _FPDFAnnot_GetColor(
      annot,
      type,
      R,
      G,
      B,
      A,
    );
  }

  late final _FPDFAnnot_GetColorPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Int32, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
              ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>>('FPDFAnnot_GetColor');
  late final _FPDFAnnot_GetColor = _FPDFAnnot_GetColorPtr.asFunction<
      int Function(FPDF_ANNOTATION, int, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
          ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>();

  int FPDFAnnot_HasAttachmentPoints(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_HasAttachmentPoints(
      annot,
    );
  }

  late final _FPDFAnnot_HasAttachmentPointsPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION)>>('FPDFAnnot_HasAttachmentPoints');
  late final _FPDFAnnot_HasAttachmentPoints =
      _FPDFAnnot_HasAttachmentPointsPtr.asFunction<int Function(FPDF_ANNOTATION)>();

  int FPDFAnnot_SetAttachmentPoints(
    FPDF_ANNOTATION annot,
    int quad_index,
    ffi.Pointer<FS_QUADPOINTSF> quad_points,
  ) {
    return _FPDFAnnot_SetAttachmentPoints(
      annot,
      quad_index,
      quad_points,
    );
  }

  late final _FPDFAnnot_SetAttachmentPointsPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Size, ffi.Pointer<FS_QUADPOINTSF>)>>(
          'FPDFAnnot_SetAttachmentPoints');
  late final _FPDFAnnot_SetAttachmentPoints =
      _FPDFAnnot_SetAttachmentPointsPtr.asFunction<int Function(FPDF_ANNOTATION, int, ffi.Pointer<FS_QUADPOINTSF>)>();

  int FPDFAnnot_AppendAttachmentPoints(
    FPDF_ANNOTATION annot,
    ffi.Pointer<FS_QUADPOINTSF> quad_points,
  ) {
    return _FPDFAnnot_AppendAttachmentPoints(
      annot,
      quad_points,
    );
  }

  late final _FPDFAnnot_AppendAttachmentPointsPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Pointer<FS_QUADPOINTSF>)>>(
          'FPDFAnnot_AppendAttachmentPoints');
  late final _FPDFAnnot_AppendAttachmentPoints =
      _FPDFAnnot_AppendAttachmentPointsPtr.asFunction<int Function(FPDF_ANNOTATION, ffi.Pointer<FS_QUADPOINTSF>)>();

  int FPDFAnnot_CountAttachmentPoints(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_CountAttachmentPoints(
      annot,
    );
  }

  late final _FPDFAnnot_CountAttachmentPointsPtr =
      _lookup<ffi.NativeFunction<ffi.Size Function(FPDF_ANNOTATION)>>('FPDFAnnot_CountAttachmentPoints');
  late final _FPDFAnnot_CountAttachmentPoints =
      _FPDFAnnot_CountAttachmentPointsPtr.asFunction<int Function(FPDF_ANNOTATION)>();

  int FPDFAnnot_GetAttachmentPoints(
    FPDF_ANNOTATION annot,
    int quad_index,
    ffi.Pointer<FS_QUADPOINTSF> quad_points,
  ) {
    return _FPDFAnnot_GetAttachmentPoints(
      annot,
      quad_index,
      quad_points,
    );
  }

  late final _FPDFAnnot_GetAttachmentPointsPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Size, ffi.Pointer<FS_QUADPOINTSF>)>>(
          'FPDFAnnot_GetAttachmentPoints');
  late final _FPDFAnnot_GetAttachmentPoints =
      _FPDFAnnot_GetAttachmentPointsPtr.asFunction<int Function(FPDF_ANNOTATION, int, ffi.Pointer<FS_QUADPOINTSF>)>();

  int FPDFAnnot_SetRect(
    FPDF_ANNOTATION annot,
    ffi.Pointer<FS_RECTF> rect,
  ) {
    return _FPDFAnnot_SetRect(
      annot,
      rect,
    );
  }

  late final _FPDFAnnot_SetRectPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Pointer<FS_RECTF>)>>('FPDFAnnot_SetRect');
  late final _FPDFAnnot_SetRect =
      _FPDFAnnot_SetRectPtr.asFunction<int Function(FPDF_ANNOTATION, ffi.Pointer<FS_RECTF>)>();

  int FPDFAnnot_GetRect(
    FPDF_ANNOTATION annot,
    ffi.Pointer<FS_RECTF> rect,
  ) {
    return _FPDFAnnot_GetRect(
      annot,
      rect,
    );
  }

  late final _FPDFAnnot_GetRectPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Pointer<FS_RECTF>)>>('FPDFAnnot_GetRect');
  late final _FPDFAnnot_GetRect =
      _FPDFAnnot_GetRectPtr.asFunction<int Function(FPDF_ANNOTATION, ffi.Pointer<FS_RECTF>)>();

  int FPDFAnnot_GetVertices(
    FPDF_ANNOTATION annot,
    ffi.Pointer<FS_POINTF> buffer,
    int length,
  ) {
    return _FPDFAnnot_GetVertices(
      annot,
      buffer,
      length,
    );
  }

  late final _FPDFAnnot_GetVerticesPtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_ANNOTATION, ffi.Pointer<FS_POINTF>, ffi.UnsignedLong)>>(
          'FPDFAnnot_GetVertices');
  late final _FPDFAnnot_GetVertices =
      _FPDFAnnot_GetVerticesPtr.asFunction<int Function(FPDF_ANNOTATION, ffi.Pointer<FS_POINTF>, int)>();

  int FPDFAnnot_GetInkListCount(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetInkListCount(
      annot,
    );
  }

  late final _FPDFAnnot_GetInkListCountPtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_ANNOTATION)>>('FPDFAnnot_GetInkListCount');
  late final _FPDFAnnot_GetInkListCount = _FPDFAnnot_GetInkListCountPtr.asFunction<int Function(FPDF_ANNOTATION)>();

  int FPDFAnnot_GetInkListPath(
    FPDF_ANNOTATION annot,
    int path_index,
    ffi.Pointer<FS_POINTF> buffer,
    int length,
  ) {
    return _FPDFAnnot_GetInkListPath(
      annot,
      path_index,
      buffer,
      length,
    );
  }

  late final _FPDFAnnot_GetInkListPathPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_ANNOTATION, ffi.UnsignedLong, ffi.Pointer<FS_POINTF>,
              ffi.UnsignedLong)>>('FPDFAnnot_GetInkListPath');
  late final _FPDFAnnot_GetInkListPath =
      _FPDFAnnot_GetInkListPathPtr.asFunction<int Function(FPDF_ANNOTATION, int, ffi.Pointer<FS_POINTF>, int)>();

  int FPDFAnnot_GetLine(
    FPDF_ANNOTATION annot,
    ffi.Pointer<FS_POINTF> start,
    ffi.Pointer<FS_POINTF> end,
  ) {
    return _FPDFAnnot_GetLine(
      annot,
      start,
      end,
    );
  }

  late final _FPDFAnnot_GetLinePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Pointer<FS_POINTF>, ffi.Pointer<FS_POINTF>)>>(
          'FPDFAnnot_GetLine');
  late final _FPDFAnnot_GetLine =
      _FPDFAnnot_GetLinePtr.asFunction<int Function(FPDF_ANNOTATION, ffi.Pointer<FS_POINTF>, ffi.Pointer<FS_POINTF>)>();

  int FPDFAnnot_SetBorder(
    FPDF_ANNOTATION annot,
    double horizontal_radius,
    double vertical_radius,
    double border_width,
  ) {
    return _FPDFAnnot_SetBorder(
      annot,
      horizontal_radius,
      vertical_radius,
      border_width,
    );
  }

  late final _FPDFAnnot_SetBorderPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Float, ffi.Float, ffi.Float)>>(
          'FPDFAnnot_SetBorder');
  late final _FPDFAnnot_SetBorder =
      _FPDFAnnot_SetBorderPtr.asFunction<int Function(FPDF_ANNOTATION, double, double, double)>();

  int FPDFAnnot_GetBorder(
    FPDF_ANNOTATION annot,
    ffi.Pointer<ffi.Float> horizontal_radius,
    ffi.Pointer<ffi.Float> vertical_radius,
    ffi.Pointer<ffi.Float> border_width,
  ) {
    return _FPDFAnnot_GetBorder(
      annot,
      horizontal_radius,
      vertical_radius,
      border_width,
    );
  }

  late final _FPDFAnnot_GetBorderPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>,
              ffi.Pointer<ffi.Float>)>>('FPDFAnnot_GetBorder');
  late final _FPDFAnnot_GetBorder = _FPDFAnnot_GetBorderPtr.asFunction<
      int Function(FPDF_ANNOTATION, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>)>();

  int FPDFAnnot_GetFormAdditionalActionJavaScript(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
    int event,
    ffi.Pointer<FPDF_WCHAR> buffer,
    int buflen,
  ) {
    return _FPDFAnnot_GetFormAdditionalActionJavaScript(
      hHandle,
      annot,
      event,
      buffer,
      buflen,
    );
  }

  late final _FPDFAnnot_GetFormAdditionalActionJavaScriptPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Int, ffi.Pointer<FPDF_WCHAR>,
              ffi.UnsignedLong)>>('FPDFAnnot_GetFormAdditionalActionJavaScript');
  late final _FPDFAnnot_GetFormAdditionalActionJavaScript = _FPDFAnnot_GetFormAdditionalActionJavaScriptPtr.asFunction<
      int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, int, ffi.Pointer<FPDF_WCHAR>, int)>();

  int FPDFAnnot_HasKey(
    FPDF_ANNOTATION annot,
    FPDF_BYTESTRING key,
  ) {
    return _FPDFAnnot_HasKey(
      annot,
      key,
    );
  }

  late final _FPDFAnnot_HasKeyPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, FPDF_BYTESTRING)>>('FPDFAnnot_HasKey');
  late final _FPDFAnnot_HasKey = _FPDFAnnot_HasKeyPtr.asFunction<int Function(FPDF_ANNOTATION, FPDF_BYTESTRING)>();

  int FPDFAnnot_GetValueType(
    FPDF_ANNOTATION annot,
    FPDF_BYTESTRING key,
  ) {
    return _FPDFAnnot_GetValueType(
      annot,
      key,
    );
  }

  late final _FPDFAnnot_GetValueTypePtr =
      _lookup<ffi.NativeFunction<FPDF_OBJECT_TYPE Function(FPDF_ANNOTATION, FPDF_BYTESTRING)>>(
          'FPDFAnnot_GetValueType');
  late final _FPDFAnnot_GetValueType =
      _FPDFAnnot_GetValueTypePtr.asFunction<int Function(FPDF_ANNOTATION, FPDF_BYTESTRING)>();

  int FPDFAnnot_SetStringValue(
    FPDF_ANNOTATION annot,
    FPDF_BYTESTRING key,
    FPDF_WIDESTRING value,
  ) {
    return _FPDFAnnot_SetStringValue(
      annot,
      key,
      value,
    );
  }

  late final _FPDFAnnot_SetStringValuePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, FPDF_BYTESTRING, FPDF_WIDESTRING)>>(
          'FPDFAnnot_SetStringValue');
  late final _FPDFAnnot_SetStringValue =
      _FPDFAnnot_SetStringValuePtr.asFunction<int Function(FPDF_ANNOTATION, FPDF_BYTESTRING, FPDF_WIDESTRING)>();

  int FPDFAnnot_GetStringValue(
    FPDF_ANNOTATION annot,
    FPDF_BYTESTRING key,
    ffi.Pointer<FPDF_WCHAR> buffer,
    int buflen,
  ) {
    return _FPDFAnnot_GetStringValue(
      annot,
      key,
      buffer,
      buflen,
    );
  }

  late final _FPDFAnnot_GetStringValuePtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_ANNOTATION, FPDF_BYTESTRING, ffi.Pointer<FPDF_WCHAR>,
              ffi.UnsignedLong)>>('FPDFAnnot_GetStringValue');
  late final _FPDFAnnot_GetStringValue = _FPDFAnnot_GetStringValuePtr.asFunction<
      int Function(FPDF_ANNOTATION, FPDF_BYTESTRING, ffi.Pointer<FPDF_WCHAR>, int)>();

  int FPDFAnnot_GetNumberValue(
    FPDF_ANNOTATION annot,
    FPDF_BYTESTRING key,
    ffi.Pointer<ffi.Float> value,
  ) {
    return _FPDFAnnot_GetNumberValue(
      annot,
      key,
      value,
    );
  }

  late final _FPDFAnnot_GetNumberValuePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, FPDF_BYTESTRING, ffi.Pointer<ffi.Float>)>>(
          'FPDFAnnot_GetNumberValue');
  late final _FPDFAnnot_GetNumberValue =
      _FPDFAnnot_GetNumberValuePtr.asFunction<int Function(FPDF_ANNOTATION, FPDF_BYTESTRING, ffi.Pointer<ffi.Float>)>();

  int FPDFAnnot_SetAP(
    FPDF_ANNOTATION annot,
    int appearanceMode,
    FPDF_WIDESTRING value,
  ) {
    return _FPDFAnnot_SetAP(
      annot,
      appearanceMode,
      value,
    );
  }

  late final _FPDFAnnot_SetAPPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, FPDF_ANNOT_APPEARANCEMODE, FPDF_WIDESTRING)>>(
          'FPDFAnnot_SetAP');
  late final _FPDFAnnot_SetAP = _FPDFAnnot_SetAPPtr.asFunction<int Function(FPDF_ANNOTATION, int, FPDF_WIDESTRING)>();

  int FPDFAnnot_GetAP(
    FPDF_ANNOTATION annot,
    int appearanceMode,
    ffi.Pointer<FPDF_WCHAR> buffer,
    int buflen,
  ) {
    return _FPDFAnnot_GetAP(
      annot,
      appearanceMode,
      buffer,
      buflen,
    );
  }

  late final _FPDFAnnot_GetAPPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_ANNOTATION, FPDF_ANNOT_APPEARANCEMODE, ffi.Pointer<FPDF_WCHAR>,
              ffi.UnsignedLong)>>('FPDFAnnot_GetAP');
  late final _FPDFAnnot_GetAP =
      _FPDFAnnot_GetAPPtr.asFunction<int Function(FPDF_ANNOTATION, int, ffi.Pointer<FPDF_WCHAR>, int)>();

  FPDF_ANNOTATION FPDFAnnot_GetLinkedAnnot(
    FPDF_ANNOTATION annot,
    FPDF_BYTESTRING key,
  ) {
    return _FPDFAnnot_GetLinkedAnnot(
      annot,
      key,
    );
  }

  late final _FPDFAnnot_GetLinkedAnnotPtr =
      _lookup<ffi.NativeFunction<FPDF_ANNOTATION Function(FPDF_ANNOTATION, FPDF_BYTESTRING)>>(
          'FPDFAnnot_GetLinkedAnnot');
  late final _FPDFAnnot_GetLinkedAnnot =
      _FPDFAnnot_GetLinkedAnnotPtr.asFunction<FPDF_ANNOTATION Function(FPDF_ANNOTATION, FPDF_BYTESTRING)>();

  int FPDFAnnot_GetFlags(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetFlags(
      annot,
    );
  }

  late final _FPDFAnnot_GetFlagsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_ANNOTATION)>>('FPDFAnnot_GetFlags');
  late final _FPDFAnnot_GetFlags = _FPDFAnnot_GetFlagsPtr.asFunction<int Function(FPDF_ANNOTATION)>();

  int FPDFAnnot_SetFlags(
    FPDF_ANNOTATION annot,
    int flags,
  ) {
    return _FPDFAnnot_SetFlags(
      annot,
      flags,
    );
  }

  late final _FPDFAnnot_SetFlagsPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Int)>>('FPDFAnnot_SetFlags');
  late final _FPDFAnnot_SetFlags = _FPDFAnnot_SetFlagsPtr.asFunction<int Function(FPDF_ANNOTATION, int)>();

  int FPDFAnnot_GetFormFieldFlags(
    FPDF_FORMHANDLE handle,
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetFormFieldFlags(
      handle,
      annot,
    );
  }

  late final _FPDFAnnot_GetFormFieldFlagsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>>('FPDFAnnot_GetFormFieldFlags');
  late final _FPDFAnnot_GetFormFieldFlags =
      _FPDFAnnot_GetFormFieldFlagsPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>();

  FPDF_ANNOTATION FPDFAnnot_GetFormFieldAtPoint(
    FPDF_FORMHANDLE hHandle,
    FPDF_PAGE page,
    ffi.Pointer<FS_POINTF> point,
  ) {
    return _FPDFAnnot_GetFormFieldAtPoint(
      hHandle,
      page,
      point,
    );
  }

  late final _FPDFAnnot_GetFormFieldAtPointPtr =
      _lookup<ffi.NativeFunction<FPDF_ANNOTATION Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Pointer<FS_POINTF>)>>(
          'FPDFAnnot_GetFormFieldAtPoint');
  late final _FPDFAnnot_GetFormFieldAtPoint = _FPDFAnnot_GetFormFieldAtPointPtr.asFunction<
      FPDF_ANNOTATION Function(FPDF_FORMHANDLE, FPDF_PAGE, ffi.Pointer<FS_POINTF>)>();

  int FPDFAnnot_GetFormFieldName(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
    ffi.Pointer<FPDF_WCHAR> buffer,
    int buflen,
  ) {
    return _FPDFAnnot_GetFormFieldName(
      hHandle,
      annot,
      buffer,
      buflen,
    );
  }

  late final _FPDFAnnot_GetFormFieldNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<FPDF_WCHAR>,
              ffi.UnsignedLong)>>('FPDFAnnot_GetFormFieldName');
  late final _FPDFAnnot_GetFormFieldName = _FPDFAnnot_GetFormFieldNamePtr.asFunction<
      int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<FPDF_WCHAR>, int)>();

  int FPDFAnnot_GetFormFieldAlternateName(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
    ffi.Pointer<FPDF_WCHAR> buffer,
    int buflen,
  ) {
    return _FPDFAnnot_GetFormFieldAlternateName(
      hHandle,
      annot,
      buffer,
      buflen,
    );
  }

  late final _FPDFAnnot_GetFormFieldAlternateNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<FPDF_WCHAR>,
              ffi.UnsignedLong)>>('FPDFAnnot_GetFormFieldAlternateName');
  late final _FPDFAnnot_GetFormFieldAlternateName = _FPDFAnnot_GetFormFieldAlternateNamePtr.asFunction<
      int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<FPDF_WCHAR>, int)>();

  int FPDFAnnot_GetFormFieldType(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetFormFieldType(
      hHandle,
      annot,
    );
  }

  late final _FPDFAnnot_GetFormFieldTypePtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>>('FPDFAnnot_GetFormFieldType');
  late final _FPDFAnnot_GetFormFieldType =
      _FPDFAnnot_GetFormFieldTypePtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>();

  int FPDFAnnot_GetFormFieldValue(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
    ffi.Pointer<FPDF_WCHAR> buffer,
    int buflen,
  ) {
    return _FPDFAnnot_GetFormFieldValue(
      hHandle,
      annot,
      buffer,
      buflen,
    );
  }

  late final _FPDFAnnot_GetFormFieldValuePtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<FPDF_WCHAR>,
              ffi.UnsignedLong)>>('FPDFAnnot_GetFormFieldValue');
  late final _FPDFAnnot_GetFormFieldValue = _FPDFAnnot_GetFormFieldValuePtr.asFunction<
      int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<FPDF_WCHAR>, int)>();

  int FPDFAnnot_GetOptionCount(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetOptionCount(
      hHandle,
      annot,
    );
  }

  late final _FPDFAnnot_GetOptionCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>>('FPDFAnnot_GetOptionCount');
  late final _FPDFAnnot_GetOptionCount =
      _FPDFAnnot_GetOptionCountPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>();

  int FPDFAnnot_GetOptionLabel(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
    int index,
    ffi.Pointer<FPDF_WCHAR> buffer,
    int buflen,
  ) {
    return _FPDFAnnot_GetOptionLabel(
      hHandle,
      annot,
      index,
      buffer,
      buflen,
    );
  }

  late final _FPDFAnnot_GetOptionLabelPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Int, ffi.Pointer<FPDF_WCHAR>,
              ffi.UnsignedLong)>>('FPDFAnnot_GetOptionLabel');
  late final _FPDFAnnot_GetOptionLabel = _FPDFAnnot_GetOptionLabelPtr.asFunction<
      int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, int, ffi.Pointer<FPDF_WCHAR>, int)>();

  int FPDFAnnot_IsOptionSelected(
    FPDF_FORMHANDLE handle,
    FPDF_ANNOTATION annot,
    int index,
  ) {
    return _FPDFAnnot_IsOptionSelected(
      handle,
      annot,
      index,
    );
  }

  late final _FPDFAnnot_IsOptionSelectedPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Int)>>(
          'FPDFAnnot_IsOptionSelected');
  late final _FPDFAnnot_IsOptionSelected =
      _FPDFAnnot_IsOptionSelectedPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, int)>();

  int FPDFAnnot_GetFontSize(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
    ffi.Pointer<ffi.Float> value,
  ) {
    return _FPDFAnnot_GetFontSize(
      hHandle,
      annot,
      value,
    );
  }

  late final _FPDFAnnot_GetFontSizePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<ffi.Float>)>>(
          'FPDFAnnot_GetFontSize');
  late final _FPDFAnnot_GetFontSize =
      _FPDFAnnot_GetFontSizePtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<ffi.Float>)>();

  int FPDFAnnot_IsChecked(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_IsChecked(
      hHandle,
      annot,
    );
  }

  late final _FPDFAnnot_IsCheckedPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>>('FPDFAnnot_IsChecked');
  late final _FPDFAnnot_IsChecked =
      _FPDFAnnot_IsCheckedPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>();

  int FPDFAnnot_SetFocusableSubtypes(
    FPDF_FORMHANDLE hHandle,
    ffi.Pointer<FPDF_ANNOTATION_SUBTYPE> subtypes,
    int count,
  ) {
    return _FPDFAnnot_SetFocusableSubtypes(
      hHandle,
      subtypes,
      count,
    );
  }

  late final _FPDFAnnot_SetFocusableSubtypesPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, ffi.Pointer<FPDF_ANNOTATION_SUBTYPE>, ffi.Size)>>(
          'FPDFAnnot_SetFocusableSubtypes');
  late final _FPDFAnnot_SetFocusableSubtypes = _FPDFAnnot_SetFocusableSubtypesPtr.asFunction<
      int Function(FPDF_FORMHANDLE, ffi.Pointer<FPDF_ANNOTATION_SUBTYPE>, int)>();

  int FPDFAnnot_GetFocusableSubtypesCount(
    FPDF_FORMHANDLE hHandle,
  ) {
    return _FPDFAnnot_GetFocusableSubtypesCount(
      hHandle,
    );
  }

  late final _FPDFAnnot_GetFocusableSubtypesCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FORMHANDLE)>>('FPDFAnnot_GetFocusableSubtypesCount');
  late final _FPDFAnnot_GetFocusableSubtypesCount =
      _FPDFAnnot_GetFocusableSubtypesCountPtr.asFunction<int Function(FPDF_FORMHANDLE)>();

  int FPDFAnnot_GetFocusableSubtypes(
    FPDF_FORMHANDLE hHandle,
    ffi.Pointer<FPDF_ANNOTATION_SUBTYPE> subtypes,
    int count,
  ) {
    return _FPDFAnnot_GetFocusableSubtypes(
      hHandle,
      subtypes,
      count,
    );
  }

  late final _FPDFAnnot_GetFocusableSubtypesPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FORMHANDLE, ffi.Pointer<FPDF_ANNOTATION_SUBTYPE>, ffi.Size)>>(
          'FPDFAnnot_GetFocusableSubtypes');
  late final _FPDFAnnot_GetFocusableSubtypes = _FPDFAnnot_GetFocusableSubtypesPtr.asFunction<
      int Function(FPDF_FORMHANDLE, ffi.Pointer<FPDF_ANNOTATION_SUBTYPE>, int)>();

  FPDF_LINK FPDFAnnot_GetLink(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetLink(
      annot,
    );
  }

  late final _FPDFAnnot_GetLinkPtr =
      _lookup<ffi.NativeFunction<FPDF_LINK Function(FPDF_ANNOTATION)>>('FPDFAnnot_GetLink');
  late final _FPDFAnnot_GetLink = _FPDFAnnot_GetLinkPtr.asFunction<FPDF_LINK Function(FPDF_ANNOTATION)>();

  int FPDFAnnot_GetFormControlCount(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetFormControlCount(
      hHandle,
      annot,
    );
  }

  late final _FPDFAnnot_GetFormControlCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>>('FPDFAnnot_GetFormControlCount');
  late final _FPDFAnnot_GetFormControlCount =
      _FPDFAnnot_GetFormControlCountPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>();

  int FPDFAnnot_GetFormControlIndex(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetFormControlIndex(
      hHandle,
      annot,
    );
  }

  late final _FPDFAnnot_GetFormControlIndexPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>>('FPDFAnnot_GetFormControlIndex');
  late final _FPDFAnnot_GetFormControlIndex =
      _FPDFAnnot_GetFormControlIndexPtr.asFunction<int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION)>();

  int FPDFAnnot_GetFormFieldExportValue(
    FPDF_FORMHANDLE hHandle,
    FPDF_ANNOTATION annot,
    ffi.Pointer<FPDF_WCHAR> buffer,
    int buflen,
  ) {
    return _FPDFAnnot_GetFormFieldExportValue(
      hHandle,
      annot,
      buffer,
      buflen,
    );
  }

  late final _FPDFAnnot_GetFormFieldExportValuePtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<FPDF_WCHAR>,
              ffi.UnsignedLong)>>('FPDFAnnot_GetFormFieldExportValue');
  late final _FPDFAnnot_GetFormFieldExportValue = _FPDFAnnot_GetFormFieldExportValuePtr.asFunction<
      int Function(FPDF_FORMHANDLE, FPDF_ANNOTATION, ffi.Pointer<FPDF_WCHAR>, int)>();

  int FPDFAnnot_SetURI(
    FPDF_ANNOTATION annot,
    ffi.Pointer<ffi.Char> uri,
  ) {
    return _FPDFAnnot_SetURI(
      annot,
      uri,
    );
  }

  late final _FPDFAnnot_SetURIPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_ANNOTATION, ffi.Pointer<ffi.Char>)>>('FPDFAnnot_SetURI');
  late final _FPDFAnnot_SetURI =
      _FPDFAnnot_SetURIPtr.asFunction<int Function(FPDF_ANNOTATION, ffi.Pointer<ffi.Char>)>();

  FPDF_ATTACHMENT FPDFAnnot_GetFileAttachment(
    FPDF_ANNOTATION annot,
  ) {
    return _FPDFAnnot_GetFileAttachment(
      annot,
    );
  }

  late final _FPDFAnnot_GetFileAttachmentPtr =
      _lookup<ffi.NativeFunction<FPDF_ATTACHMENT Function(FPDF_ANNOTATION)>>('FPDFAnnot_GetFileAttachment');
  late final _FPDFAnnot_GetFileAttachment =
      _FPDFAnnot_GetFileAttachmentPtr.asFunction<FPDF_ATTACHMENT Function(FPDF_ANNOTATION)>();

  FPDF_ATTACHMENT FPDFAnnot_AddFileAttachment(
    FPDF_ANNOTATION annot,
    FPDF_WIDESTRING name,
  ) {
    return _FPDFAnnot_AddFileAttachment(
      annot,
      name,
    );
  }

  late final _FPDFAnnot_AddFileAttachmentPtr =
      _lookup<ffi.NativeFunction<FPDF_ATTACHMENT Function(FPDF_ANNOTATION, FPDF_WIDESTRING)>>(
          'FPDFAnnot_AddFileAttachment');
  late final _FPDFAnnot_AddFileAttachment =
      _FPDFAnnot_AddFileAttachmentPtr.asFunction<FPDF_ATTACHMENT Function(FPDF_ANNOTATION, FPDF_WIDESTRING)>();

  FPDF_TEXTPAGE FPDFText_LoadPage(
    FPDF_PAGE page,
  ) {
    return _FPDFText_LoadPage(
      page,
    );
  }

  late final _FPDFText_LoadPagePtr =
      _lookup<ffi.NativeFunction<FPDF_TEXTPAGE Function(FPDF_PAGE)>>('FPDFText_LoadPage');
  late final _FPDFText_LoadPage = _FPDFText_LoadPagePtr.asFunction<FPDF_TEXTPAGE Function(FPDF_PAGE)>();

  void FPDFText_ClosePage(
    FPDF_TEXTPAGE text_page,
  ) {
    return _FPDFText_ClosePage(
      text_page,
    );
  }

  late final _FPDFText_ClosePagePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_TEXTPAGE)>>('FPDFText_ClosePage');
  late final _FPDFText_ClosePage = _FPDFText_ClosePagePtr.asFunction<void Function(FPDF_TEXTPAGE)>();

  int FPDFText_CountChars(
    FPDF_TEXTPAGE text_page,
  ) {
    return _FPDFText_CountChars(
      text_page,
    );
  }

  late final _FPDFText_CountCharsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_TEXTPAGE)>>('FPDFText_CountChars');
  late final _FPDFText_CountChars = _FPDFText_CountCharsPtr.asFunction<int Function(FPDF_TEXTPAGE)>();

  int FPDFText_GetUnicode(
    FPDF_TEXTPAGE text_page,
    int index,
  ) {
    return _FPDFText_GetUnicode(
      text_page,
      index,
    );
  }

  late final _FPDFText_GetUnicodePtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedInt Function(FPDF_TEXTPAGE, ffi.Int)>>('FPDFText_GetUnicode');
  late final _FPDFText_GetUnicode = _FPDFText_GetUnicodePtr.asFunction<int Function(FPDF_TEXTPAGE, int)>();

  int FPDFText_IsGenerated(
    FPDF_TEXTPAGE text_page,
    int index,
  ) {
    return _FPDFText_IsGenerated(
      text_page,
      index,
    );
  }

  late final _FPDFText_IsGeneratedPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_TEXTPAGE, ffi.Int)>>('FPDFText_IsGenerated');
  late final _FPDFText_IsGenerated = _FPDFText_IsGeneratedPtr.asFunction<int Function(FPDF_TEXTPAGE, int)>();

  int FPDFText_IsHyphen(
    FPDF_TEXTPAGE text_page,
    int index,
  ) {
    return _FPDFText_IsHyphen(
      text_page,
      index,
    );
  }

  late final _FPDFText_IsHyphenPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_TEXTPAGE, ffi.Int)>>('FPDFText_IsHyphen');
  late final _FPDFText_IsHyphen = _FPDFText_IsHyphenPtr.asFunction<int Function(FPDF_TEXTPAGE, int)>();

  int FPDFText_HasUnicodeMapError(
    FPDF_TEXTPAGE text_page,
    int index,
  ) {
    return _FPDFText_HasUnicodeMapError(
      text_page,
      index,
    );
  }

  late final _FPDFText_HasUnicodeMapErrorPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_TEXTPAGE, ffi.Int)>>('FPDFText_HasUnicodeMapError');
  late final _FPDFText_HasUnicodeMapError =
      _FPDFText_HasUnicodeMapErrorPtr.asFunction<int Function(FPDF_TEXTPAGE, int)>();

  double FPDFText_GetFontSize(
    FPDF_TEXTPAGE text_page,
    int index,
  ) {
    return _FPDFText_GetFontSize(
      text_page,
      index,
    );
  }

  late final _FPDFText_GetFontSizePtr =
      _lookup<ffi.NativeFunction<ffi.Double Function(FPDF_TEXTPAGE, ffi.Int)>>('FPDFText_GetFontSize');
  late final _FPDFText_GetFontSize = _FPDFText_GetFontSizePtr.asFunction<double Function(FPDF_TEXTPAGE, int)>();

  int FPDFText_GetFontInfo(
    FPDF_TEXTPAGE text_page,
    int index,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
    ffi.Pointer<ffi.Int> flags,
  ) {
    return _FPDFText_GetFontInfo(
      text_page,
      index,
      buffer,
      buflen,
      flags,
    );
  }

  late final _FPDFText_GetFontInfoPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<ffi.Void>, ffi.UnsignedLong,
              ffi.Pointer<ffi.Int>)>>('FPDFText_GetFontInfo');
  late final _FPDFText_GetFontInfo = _FPDFText_GetFontInfoPtr.asFunction<
      int Function(FPDF_TEXTPAGE, int, ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.Int>)>();

  int FPDFText_GetFontWeight(
    FPDF_TEXTPAGE text_page,
    int index,
  ) {
    return _FPDFText_GetFontWeight(
      text_page,
      index,
    );
  }

  late final _FPDFText_GetFontWeightPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_TEXTPAGE, ffi.Int)>>('FPDFText_GetFontWeight');
  late final _FPDFText_GetFontWeight = _FPDFText_GetFontWeightPtr.asFunction<int Function(FPDF_TEXTPAGE, int)>();

  int FPDFText_GetTextRenderMode(
    FPDF_TEXTPAGE text_page,
    int index,
  ) {
    return _FPDFText_GetTextRenderMode(
      text_page,
      index,
    );
  }

  late final _FPDFText_GetTextRenderModePtr =
      _lookup<ffi.NativeFunction<ffi.Int32 Function(FPDF_TEXTPAGE, ffi.Int)>>('FPDFText_GetTextRenderMode');
  late final _FPDFText_GetTextRenderMode =
      _FPDFText_GetTextRenderModePtr.asFunction<int Function(FPDF_TEXTPAGE, int)>();

  int FPDFText_GetFillColor(
    FPDF_TEXTPAGE text_page,
    int index,
    ffi.Pointer<ffi.UnsignedInt> R,
    ffi.Pointer<ffi.UnsignedInt> G,
    ffi.Pointer<ffi.UnsignedInt> B,
    ffi.Pointer<ffi.UnsignedInt> A,
  ) {
    return _FPDFText_GetFillColor(
      text_page,
      index,
      R,
      G,
      B,
      A,
    );
  }

  late final _FPDFText_GetFillColorPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
              ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>>('FPDFText_GetFillColor');
  late final _FPDFText_GetFillColor = _FPDFText_GetFillColorPtr.asFunction<
      int Function(FPDF_TEXTPAGE, int, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
          ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>();

  int FPDFText_GetStrokeColor(
    FPDF_TEXTPAGE text_page,
    int index,
    ffi.Pointer<ffi.UnsignedInt> R,
    ffi.Pointer<ffi.UnsignedInt> G,
    ffi.Pointer<ffi.UnsignedInt> B,
    ffi.Pointer<ffi.UnsignedInt> A,
  ) {
    return _FPDFText_GetStrokeColor(
      text_page,
      index,
      R,
      G,
      B,
      A,
    );
  }

  late final _FPDFText_GetStrokeColorPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
              ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>>('FPDFText_GetStrokeColor');
  late final _FPDFText_GetStrokeColor = _FPDFText_GetStrokeColorPtr.asFunction<
      int Function(FPDF_TEXTPAGE, int, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
          ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>();

  double FPDFText_GetCharAngle(
    FPDF_TEXTPAGE text_page,
    int index,
  ) {
    return _FPDFText_GetCharAngle(
      text_page,
      index,
    );
  }

  late final _FPDFText_GetCharAnglePtr =
      _lookup<ffi.NativeFunction<ffi.Float Function(FPDF_TEXTPAGE, ffi.Int)>>('FPDFText_GetCharAngle');
  late final _FPDFText_GetCharAngle = _FPDFText_GetCharAnglePtr.asFunction<double Function(FPDF_TEXTPAGE, int)>();

  int FPDFText_GetCharBox(
    FPDF_TEXTPAGE text_page,
    int index,
    ffi.Pointer<ffi.Double> left,
    ffi.Pointer<ffi.Double> right,
    ffi.Pointer<ffi.Double> bottom,
    ffi.Pointer<ffi.Double> top,
  ) {
    return _FPDFText_GetCharBox(
      text_page,
      index,
      left,
      right,
      bottom,
      top,
    );
  }

  late final _FPDFText_GetCharBoxPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>,
              ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>>('FPDFText_GetCharBox');
  late final _FPDFText_GetCharBox = _FPDFText_GetCharBoxPtr.asFunction<
      int Function(FPDF_TEXTPAGE, int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>,
          ffi.Pointer<ffi.Double>)>();

  int FPDFText_GetLooseCharBox(
    FPDF_TEXTPAGE text_page,
    int index,
    ffi.Pointer<FS_RECTF> rect,
  ) {
    return _FPDFText_GetLooseCharBox(
      text_page,
      index,
      rect,
    );
  }

  late final _FPDFText_GetLooseCharBoxPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<FS_RECTF>)>>(
          'FPDFText_GetLooseCharBox');
  late final _FPDFText_GetLooseCharBox =
      _FPDFText_GetLooseCharBoxPtr.asFunction<int Function(FPDF_TEXTPAGE, int, ffi.Pointer<FS_RECTF>)>();

  int FPDFText_GetMatrix(
    FPDF_TEXTPAGE text_page,
    int index,
    ffi.Pointer<FS_MATRIX> matrix,
  ) {
    return _FPDFText_GetMatrix(
      text_page,
      index,
      matrix,
    );
  }

  late final _FPDFText_GetMatrixPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<FS_MATRIX>)>>(
          'FPDFText_GetMatrix');
  late final _FPDFText_GetMatrix =
      _FPDFText_GetMatrixPtr.asFunction<int Function(FPDF_TEXTPAGE, int, ffi.Pointer<FS_MATRIX>)>();

  int FPDFText_GetCharOrigin(
    FPDF_TEXTPAGE text_page,
    int index,
    ffi.Pointer<ffi.Double> x,
    ffi.Pointer<ffi.Double> y,
  ) {
    return _FPDFText_GetCharOrigin(
      text_page,
      index,
      x,
      y,
    );
  }

  late final _FPDFText_GetCharOriginPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(
              FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>>('FPDFText_GetCharOrigin');
  late final _FPDFText_GetCharOrigin = _FPDFText_GetCharOriginPtr.asFunction<
      int Function(FPDF_TEXTPAGE, int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>();

  int FPDFText_GetCharIndexAtPos(
    FPDF_TEXTPAGE text_page,
    double x,
    double y,
    double xTolerance,
    double yTolerance,
  ) {
    return _FPDFText_GetCharIndexAtPos(
      text_page,
      x,
      y,
      xTolerance,
      yTolerance,
    );
  }

  late final _FPDFText_GetCharIndexAtPosPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_TEXTPAGE, ffi.Double, ffi.Double, ffi.Double, ffi.Double)>>(
          'FPDFText_GetCharIndexAtPos');
  late final _FPDFText_GetCharIndexAtPos =
      _FPDFText_GetCharIndexAtPosPtr.asFunction<int Function(FPDF_TEXTPAGE, double, double, double, double)>();

  int FPDFText_GetText(
    FPDF_TEXTPAGE text_page,
    int start_index,
    int count,
    ffi.Pointer<ffi.UnsignedShort> result,
  ) {
    return _FPDFText_GetText(
      text_page,
      start_index,
      count,
      result,
    );
  }

  late final _FPDFText_GetTextPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_TEXTPAGE, ffi.Int, ffi.Int, ffi.Pointer<ffi.UnsignedShort>)>>(
          'FPDFText_GetText');
  late final _FPDFText_GetText =
      _FPDFText_GetTextPtr.asFunction<int Function(FPDF_TEXTPAGE, int, int, ffi.Pointer<ffi.UnsignedShort>)>();

  int FPDFText_CountRects(
    FPDF_TEXTPAGE text_page,
    int start_index,
    int count,
  ) {
    return _FPDFText_CountRects(
      text_page,
      start_index,
      count,
    );
  }

  late final _FPDFText_CountRectsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_TEXTPAGE, ffi.Int, ffi.Int)>>('FPDFText_CountRects');
  late final _FPDFText_CountRects = _FPDFText_CountRectsPtr.asFunction<int Function(FPDF_TEXTPAGE, int, int)>();

  int FPDFText_GetRect(
    FPDF_TEXTPAGE text_page,
    int rect_index,
    ffi.Pointer<ffi.Double> left,
    ffi.Pointer<ffi.Double> top,
    ffi.Pointer<ffi.Double> right,
    ffi.Pointer<ffi.Double> bottom,
  ) {
    return _FPDFText_GetRect(
      text_page,
      rect_index,
      left,
      top,
      right,
      bottom,
    );
  }

  late final _FPDFText_GetRectPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>,
              ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>>('FPDFText_GetRect');
  late final _FPDFText_GetRect = _FPDFText_GetRectPtr.asFunction<
      int Function(FPDF_TEXTPAGE, int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>,
          ffi.Pointer<ffi.Double>)>();

  int FPDFText_GetBoundedText(
    FPDF_TEXTPAGE text_page,
    double left,
    double top,
    double right,
    double bottom,
    ffi.Pointer<ffi.UnsignedShort> buffer,
    int buflen,
  ) {
    return _FPDFText_GetBoundedText(
      text_page,
      left,
      top,
      right,
      bottom,
      buffer,
      buflen,
    );
  }

  late final _FPDFText_GetBoundedTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Int Function(FPDF_TEXTPAGE, ffi.Double, ffi.Double, ffi.Double, ffi.Double,
              ffi.Pointer<ffi.UnsignedShort>, ffi.Int)>>('FPDFText_GetBoundedText');
  late final _FPDFText_GetBoundedText = _FPDFText_GetBoundedTextPtr.asFunction<
      int Function(FPDF_TEXTPAGE, double, double, double, double, ffi.Pointer<ffi.UnsignedShort>, int)>();

  FPDF_SCHHANDLE FPDFText_FindStart(
    FPDF_TEXTPAGE text_page,
    FPDF_WIDESTRING findwhat,
    int flags,
    int start_index,
  ) {
    return _FPDFText_FindStart(
      text_page,
      findwhat,
      flags,
      start_index,
    );
  }

  late final _FPDFText_FindStartPtr =
      _lookup<ffi.NativeFunction<FPDF_SCHHANDLE Function(FPDF_TEXTPAGE, FPDF_WIDESTRING, ffi.UnsignedLong, ffi.Int)>>(
          'FPDFText_FindStart');
  late final _FPDFText_FindStart =
      _FPDFText_FindStartPtr.asFunction<FPDF_SCHHANDLE Function(FPDF_TEXTPAGE, FPDF_WIDESTRING, int, int)>();

  int FPDFText_FindNext(
    FPDF_SCHHANDLE handle,
  ) {
    return _FPDFText_FindNext(
      handle,
    );
  }

  late final _FPDFText_FindNextPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_SCHHANDLE)>>('FPDFText_FindNext');
  late final _FPDFText_FindNext = _FPDFText_FindNextPtr.asFunction<int Function(FPDF_SCHHANDLE)>();

  int FPDFText_FindPrev(
    FPDF_SCHHANDLE handle,
  ) {
    return _FPDFText_FindPrev(
      handle,
    );
  }

  late final _FPDFText_FindPrevPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_SCHHANDLE)>>('FPDFText_FindPrev');
  late final _FPDFText_FindPrev = _FPDFText_FindPrevPtr.asFunction<int Function(FPDF_SCHHANDLE)>();

  int FPDFText_GetSchResultIndex(
    FPDF_SCHHANDLE handle,
  ) {
    return _FPDFText_GetSchResultIndex(
      handle,
    );
  }

  late final _FPDFText_GetSchResultIndexPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_SCHHANDLE)>>('FPDFText_GetSchResultIndex');
  late final _FPDFText_GetSchResultIndex = _FPDFText_GetSchResultIndexPtr.asFunction<int Function(FPDF_SCHHANDLE)>();

  int FPDFText_GetSchCount(
    FPDF_SCHHANDLE handle,
  ) {
    return _FPDFText_GetSchCount(
      handle,
    );
  }

  late final _FPDFText_GetSchCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_SCHHANDLE)>>('FPDFText_GetSchCount');
  late final _FPDFText_GetSchCount = _FPDFText_GetSchCountPtr.asFunction<int Function(FPDF_SCHHANDLE)>();

  void FPDFText_FindClose(
    FPDF_SCHHANDLE handle,
  ) {
    return _FPDFText_FindClose(
      handle,
    );
  }

  late final _FPDFText_FindClosePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_SCHHANDLE)>>('FPDFText_FindClose');
  late final _FPDFText_FindClose = _FPDFText_FindClosePtr.asFunction<void Function(FPDF_SCHHANDLE)>();

  FPDF_PAGELINK FPDFLink_LoadWebLinks(
    FPDF_TEXTPAGE text_page,
  ) {
    return _FPDFLink_LoadWebLinks(
      text_page,
    );
  }

  late final _FPDFLink_LoadWebLinksPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGELINK Function(FPDF_TEXTPAGE)>>('FPDFLink_LoadWebLinks');
  late final _FPDFLink_LoadWebLinks = _FPDFLink_LoadWebLinksPtr.asFunction<FPDF_PAGELINK Function(FPDF_TEXTPAGE)>();

  int FPDFLink_CountWebLinks(
    FPDF_PAGELINK link_page,
  ) {
    return _FPDFLink_CountWebLinks(
      link_page,
    );
  }

  late final _FPDFLink_CountWebLinksPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGELINK)>>('FPDFLink_CountWebLinks');
  late final _FPDFLink_CountWebLinks = _FPDFLink_CountWebLinksPtr.asFunction<int Function(FPDF_PAGELINK)>();

  int FPDFLink_GetURL(
    FPDF_PAGELINK link_page,
    int link_index,
    ffi.Pointer<ffi.UnsignedShort> buffer,
    int buflen,
  ) {
    return _FPDFLink_GetURL(
      link_page,
      link_index,
      buffer,
      buflen,
    );
  }

  late final _FPDFLink_GetURLPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGELINK, ffi.Int, ffi.Pointer<ffi.UnsignedShort>, ffi.Int)>>(
          'FPDFLink_GetURL');
  late final _FPDFLink_GetURL =
      _FPDFLink_GetURLPtr.asFunction<int Function(FPDF_PAGELINK, int, ffi.Pointer<ffi.UnsignedShort>, int)>();

  int FPDFLink_CountRects(
    FPDF_PAGELINK link_page,
    int link_index,
  ) {
    return _FPDFLink_CountRects(
      link_page,
      link_index,
    );
  }

  late final _FPDFLink_CountRectsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGELINK, ffi.Int)>>('FPDFLink_CountRects');
  late final _FPDFLink_CountRects = _FPDFLink_CountRectsPtr.asFunction<int Function(FPDF_PAGELINK, int)>();

  int FPDFLink_GetRect(
    FPDF_PAGELINK link_page,
    int link_index,
    int rect_index,
    ffi.Pointer<ffi.Double> left,
    ffi.Pointer<ffi.Double> top,
    ffi.Pointer<ffi.Double> right,
    ffi.Pointer<ffi.Double> bottom,
  ) {
    return _FPDFLink_GetRect(
      link_page,
      link_index,
      rect_index,
      left,
      top,
      right,
      bottom,
    );
  }

  late final _FPDFLink_GetRectPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGELINK, ffi.Int, ffi.Int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>,
              ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>>('FPDFLink_GetRect');
  late final _FPDFLink_GetRect = _FPDFLink_GetRectPtr.asFunction<
      int Function(FPDF_PAGELINK, int, int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>,
          ffi.Pointer<ffi.Double>)>();

  int FPDFLink_GetTextRange(
    FPDF_PAGELINK link_page,
    int link_index,
    ffi.Pointer<ffi.Int> start_char_index,
    ffi.Pointer<ffi.Int> char_count,
  ) {
    return _FPDFLink_GetTextRange(
      link_page,
      link_index,
      start_char_index,
      char_count,
    );
  }

  late final _FPDFLink_GetTextRangePtr = _lookup<
          ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGELINK, ffi.Int, ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>)>>(
      'FPDFLink_GetTextRange');
  late final _FPDFLink_GetTextRange = _FPDFLink_GetTextRangePtr.asFunction<
      int Function(FPDF_PAGELINK, int, ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>)>();

  void FPDFLink_CloseWebLinks(
    FPDF_PAGELINK link_page,
  ) {
    return _FPDFLink_CloseWebLinks(
      link_page,
    );
  }

  late final _FPDFLink_CloseWebLinksPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_PAGELINK)>>('FPDFLink_CloseWebLinks');
  late final _FPDFLink_CloseWebLinks = _FPDFLink_CloseWebLinksPtr.asFunction<void Function(FPDF_PAGELINK)>();

  FPDF_BOOKMARK FPDFBookmark_GetFirstChild(
    FPDF_DOCUMENT document,
    FPDF_BOOKMARK bookmark,
  ) {
    return _FPDFBookmark_GetFirstChild(
      document,
      bookmark,
    );
  }

  late final _FPDFBookmark_GetFirstChildPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOKMARK Function(FPDF_DOCUMENT, FPDF_BOOKMARK)>>('FPDFBookmark_GetFirstChild');
  late final _FPDFBookmark_GetFirstChild =
      _FPDFBookmark_GetFirstChildPtr.asFunction<FPDF_BOOKMARK Function(FPDF_DOCUMENT, FPDF_BOOKMARK)>();

  FPDF_BOOKMARK FPDFBookmark_GetNextSibling(
    FPDF_DOCUMENT document,
    FPDF_BOOKMARK bookmark,
  ) {
    return _FPDFBookmark_GetNextSibling(
      document,
      bookmark,
    );
  }

  late final _FPDFBookmark_GetNextSiblingPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOKMARK Function(FPDF_DOCUMENT, FPDF_BOOKMARK)>>('FPDFBookmark_GetNextSibling');
  late final _FPDFBookmark_GetNextSibling =
      _FPDFBookmark_GetNextSiblingPtr.asFunction<FPDF_BOOKMARK Function(FPDF_DOCUMENT, FPDF_BOOKMARK)>();

  int FPDFBookmark_GetTitle(
    FPDF_BOOKMARK bookmark,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDFBookmark_GetTitle(
      bookmark,
      buffer,
      buflen,
    );
  }

  late final _FPDFBookmark_GetTitlePtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_BOOKMARK, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>(
          'FPDFBookmark_GetTitle');
  late final _FPDFBookmark_GetTitle =
      _FPDFBookmark_GetTitlePtr.asFunction<int Function(FPDF_BOOKMARK, ffi.Pointer<ffi.Void>, int)>();

  int FPDFBookmark_GetCount(
    FPDF_BOOKMARK bookmark,
  ) {
    return _FPDFBookmark_GetCount(
      bookmark,
    );
  }

  late final _FPDFBookmark_GetCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_BOOKMARK)>>('FPDFBookmark_GetCount');
  late final _FPDFBookmark_GetCount = _FPDFBookmark_GetCountPtr.asFunction<int Function(FPDF_BOOKMARK)>();

  FPDF_BOOKMARK FPDFBookmark_Find(
    FPDF_DOCUMENT document,
    FPDF_WIDESTRING title,
  ) {
    return _FPDFBookmark_Find(
      document,
      title,
    );
  }

  late final _FPDFBookmark_FindPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOKMARK Function(FPDF_DOCUMENT, FPDF_WIDESTRING)>>('FPDFBookmark_Find');
  late final _FPDFBookmark_Find =
      _FPDFBookmark_FindPtr.asFunction<FPDF_BOOKMARK Function(FPDF_DOCUMENT, FPDF_WIDESTRING)>();

  FPDF_DEST FPDFBookmark_GetDest(
    FPDF_DOCUMENT document,
    FPDF_BOOKMARK bookmark,
  ) {
    return _FPDFBookmark_GetDest(
      document,
      bookmark,
    );
  }

  late final _FPDFBookmark_GetDestPtr =
      _lookup<ffi.NativeFunction<FPDF_DEST Function(FPDF_DOCUMENT, FPDF_BOOKMARK)>>('FPDFBookmark_GetDest');
  late final _FPDFBookmark_GetDest =
      _FPDFBookmark_GetDestPtr.asFunction<FPDF_DEST Function(FPDF_DOCUMENT, FPDF_BOOKMARK)>();

  FPDF_ACTION FPDFBookmark_GetAction(
    FPDF_BOOKMARK bookmark,
  ) {
    return _FPDFBookmark_GetAction(
      bookmark,
    );
  }

  late final _FPDFBookmark_GetActionPtr =
      _lookup<ffi.NativeFunction<FPDF_ACTION Function(FPDF_BOOKMARK)>>('FPDFBookmark_GetAction');
  late final _FPDFBookmark_GetAction = _FPDFBookmark_GetActionPtr.asFunction<FPDF_ACTION Function(FPDF_BOOKMARK)>();

  int FPDFAction_GetType(
    FPDF_ACTION action,
  ) {
    return _FPDFAction_GetType(
      action,
    );
  }

  late final _FPDFAction_GetTypePtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_ACTION)>>('FPDFAction_GetType');
  late final _FPDFAction_GetType = _FPDFAction_GetTypePtr.asFunction<int Function(FPDF_ACTION)>();

  FPDF_DEST FPDFAction_GetDest(
    FPDF_DOCUMENT document,
    FPDF_ACTION action,
  ) {
    return _FPDFAction_GetDest(
      document,
      action,
    );
  }

  late final _FPDFAction_GetDestPtr =
      _lookup<ffi.NativeFunction<FPDF_DEST Function(FPDF_DOCUMENT, FPDF_ACTION)>>('FPDFAction_GetDest');
  late final _FPDFAction_GetDest = _FPDFAction_GetDestPtr.asFunction<FPDF_DEST Function(FPDF_DOCUMENT, FPDF_ACTION)>();

  int FPDFAction_GetFilePath(
    FPDF_ACTION action,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDFAction_GetFilePath(
      action,
      buffer,
      buflen,
    );
  }

  late final _FPDFAction_GetFilePathPtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_ACTION, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>(
          'FPDFAction_GetFilePath');
  late final _FPDFAction_GetFilePath =
      _FPDFAction_GetFilePathPtr.asFunction<int Function(FPDF_ACTION, ffi.Pointer<ffi.Void>, int)>();

  int FPDFAction_GetURIPath(
    FPDF_DOCUMENT document,
    FPDF_ACTION action,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDFAction_GetURIPath(
      document,
      action,
      buffer,
      buflen,
    );
  }

  late final _FPDFAction_GetURIPathPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(
              FPDF_DOCUMENT, FPDF_ACTION, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>('FPDFAction_GetURIPath');
  late final _FPDFAction_GetURIPath =
      _FPDFAction_GetURIPathPtr.asFunction<int Function(FPDF_DOCUMENT, FPDF_ACTION, ffi.Pointer<ffi.Void>, int)>();

  int FPDFDest_GetDestPageIndex(
    FPDF_DOCUMENT document,
    FPDF_DEST dest,
  ) {
    return _FPDFDest_GetDestPageIndex(
      document,
      dest,
    );
  }

  late final _FPDFDest_GetDestPageIndexPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_DOCUMENT, FPDF_DEST)>>('FPDFDest_GetDestPageIndex');
  late final _FPDFDest_GetDestPageIndex =
      _FPDFDest_GetDestPageIndexPtr.asFunction<int Function(FPDF_DOCUMENT, FPDF_DEST)>();

  int FPDFDest_GetView(
    FPDF_DEST dest,
    ffi.Pointer<ffi.UnsignedLong> pNumParams,
    ffi.Pointer<FS_FLOAT> pParams,
  ) {
    return _FPDFDest_GetView(
      dest,
      pNumParams,
      pParams,
    );
  }

  late final _FPDFDest_GetViewPtr = _lookup<
          ffi
          .NativeFunction<ffi.UnsignedLong Function(FPDF_DEST, ffi.Pointer<ffi.UnsignedLong>, ffi.Pointer<FS_FLOAT>)>>(
      'FPDFDest_GetView');
  late final _FPDFDest_GetView =
      _FPDFDest_GetViewPtr.asFunction<int Function(FPDF_DEST, ffi.Pointer<ffi.UnsignedLong>, ffi.Pointer<FS_FLOAT>)>();

  int FPDFDest_GetLocationInPage(
    FPDF_DEST dest,
    ffi.Pointer<FPDF_BOOL> hasXVal,
    ffi.Pointer<FPDF_BOOL> hasYVal,
    ffi.Pointer<FPDF_BOOL> hasZoomVal,
    ffi.Pointer<FS_FLOAT> x,
    ffi.Pointer<FS_FLOAT> y,
    ffi.Pointer<FS_FLOAT> zoom,
  ) {
    return _FPDFDest_GetLocationInPage(
      dest,
      hasXVal,
      hasYVal,
      hasZoomVal,
      x,
      y,
      zoom,
    );
  }

  late final _FPDFDest_GetLocationInPagePtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_DEST, ffi.Pointer<FPDF_BOOL>, ffi.Pointer<FPDF_BOOL>, ffi.Pointer<FPDF_BOOL>,
              ffi.Pointer<FS_FLOAT>, ffi.Pointer<FS_FLOAT>, ffi.Pointer<FS_FLOAT>)>>('FPDFDest_GetLocationInPage');
  late final _FPDFDest_GetLocationInPage = _FPDFDest_GetLocationInPagePtr.asFunction<
      int Function(FPDF_DEST, ffi.Pointer<FPDF_BOOL>, ffi.Pointer<FPDF_BOOL>, ffi.Pointer<FPDF_BOOL>,
          ffi.Pointer<FS_FLOAT>, ffi.Pointer<FS_FLOAT>, ffi.Pointer<FS_FLOAT>)>();

  FPDF_LINK FPDFLink_GetLinkAtPoint(
    FPDF_PAGE page,
    double x,
    double y,
  ) {
    return _FPDFLink_GetLinkAtPoint(
      page,
      x,
      y,
    );
  }

  late final _FPDFLink_GetLinkAtPointPtr =
      _lookup<ffi.NativeFunction<FPDF_LINK Function(FPDF_PAGE, ffi.Double, ffi.Double)>>('FPDFLink_GetLinkAtPoint');
  late final _FPDFLink_GetLinkAtPoint =
      _FPDFLink_GetLinkAtPointPtr.asFunction<FPDF_LINK Function(FPDF_PAGE, double, double)>();

  int FPDFLink_GetLinkZOrderAtPoint(
    FPDF_PAGE page,
    double x,
    double y,
  ) {
    return _FPDFLink_GetLinkZOrderAtPoint(
      page,
      x,
      y,
    );
  }

  late final _FPDFLink_GetLinkZOrderAtPointPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGE, ffi.Double, ffi.Double)>>('FPDFLink_GetLinkZOrderAtPoint');
  late final _FPDFLink_GetLinkZOrderAtPoint =
      _FPDFLink_GetLinkZOrderAtPointPtr.asFunction<int Function(FPDF_PAGE, double, double)>();

  FPDF_DEST FPDFLink_GetDest(
    FPDF_DOCUMENT document,
    FPDF_LINK link,
  ) {
    return _FPDFLink_GetDest(
      document,
      link,
    );
  }

  late final _FPDFLink_GetDestPtr =
      _lookup<ffi.NativeFunction<FPDF_DEST Function(FPDF_DOCUMENT, FPDF_LINK)>>('FPDFLink_GetDest');
  late final _FPDFLink_GetDest = _FPDFLink_GetDestPtr.asFunction<FPDF_DEST Function(FPDF_DOCUMENT, FPDF_LINK)>();

  FPDF_ACTION FPDFLink_GetAction(
    FPDF_LINK link,
  ) {
    return _FPDFLink_GetAction(
      link,
    );
  }

  late final _FPDFLink_GetActionPtr =
      _lookup<ffi.NativeFunction<FPDF_ACTION Function(FPDF_LINK)>>('FPDFLink_GetAction');
  late final _FPDFLink_GetAction = _FPDFLink_GetActionPtr.asFunction<FPDF_ACTION Function(FPDF_LINK)>();

  int FPDFLink_Enumerate(
    FPDF_PAGE page,
    ffi.Pointer<ffi.Int> start_pos,
    ffi.Pointer<FPDF_LINK> link_annot,
  ) {
    return _FPDFLink_Enumerate(
      page,
      start_pos,
      link_annot,
    );
  }

  late final _FPDFLink_EnumeratePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGE, ffi.Pointer<ffi.Int>, ffi.Pointer<FPDF_LINK>)>>(
          'FPDFLink_Enumerate');
  late final _FPDFLink_Enumerate =
      _FPDFLink_EnumeratePtr.asFunction<int Function(FPDF_PAGE, ffi.Pointer<ffi.Int>, ffi.Pointer<FPDF_LINK>)>();

  FPDF_ANNOTATION FPDFLink_GetAnnot(
    FPDF_PAGE page,
    FPDF_LINK link_annot,
  ) {
    return _FPDFLink_GetAnnot(
      page,
      link_annot,
    );
  }

  late final _FPDFLink_GetAnnotPtr =
      _lookup<ffi.NativeFunction<FPDF_ANNOTATION Function(FPDF_PAGE, FPDF_LINK)>>('FPDFLink_GetAnnot');
  late final _FPDFLink_GetAnnot = _FPDFLink_GetAnnotPtr.asFunction<FPDF_ANNOTATION Function(FPDF_PAGE, FPDF_LINK)>();

  int FPDFLink_GetAnnotRect(
    FPDF_LINK link_annot,
    ffi.Pointer<FS_RECTF> rect,
  ) {
    return _FPDFLink_GetAnnotRect(
      link_annot,
      rect,
    );
  }

  late final _FPDFLink_GetAnnotRectPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_LINK, ffi.Pointer<FS_RECTF>)>>('FPDFLink_GetAnnotRect');
  late final _FPDFLink_GetAnnotRect =
      _FPDFLink_GetAnnotRectPtr.asFunction<int Function(FPDF_LINK, ffi.Pointer<FS_RECTF>)>();

  int FPDFLink_CountQuadPoints(
    FPDF_LINK link_annot,
  ) {
    return _FPDFLink_CountQuadPoints(
      link_annot,
    );
  }

  late final _FPDFLink_CountQuadPointsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_LINK)>>('FPDFLink_CountQuadPoints');
  late final _FPDFLink_CountQuadPoints = _FPDFLink_CountQuadPointsPtr.asFunction<int Function(FPDF_LINK)>();

  int FPDFLink_GetQuadPoints(
    FPDF_LINK link_annot,
    int quad_index,
    ffi.Pointer<FS_QUADPOINTSF> quad_points,
  ) {
    return _FPDFLink_GetQuadPoints(
      link_annot,
      quad_index,
      quad_points,
    );
  }

  late final _FPDFLink_GetQuadPointsPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_LINK, ffi.Int, ffi.Pointer<FS_QUADPOINTSF>)>>(
          'FPDFLink_GetQuadPoints');
  late final _FPDFLink_GetQuadPoints =
      _FPDFLink_GetQuadPointsPtr.asFunction<int Function(FPDF_LINK, int, ffi.Pointer<FS_QUADPOINTSF>)>();

  FPDF_ACTION FPDF_GetPageAAction(
    FPDF_PAGE page,
    int aa_type,
  ) {
    return _FPDF_GetPageAAction(
      page,
      aa_type,
    );
  }

  late final _FPDF_GetPageAActionPtr =
      _lookup<ffi.NativeFunction<FPDF_ACTION Function(FPDF_PAGE, ffi.Int)>>('FPDF_GetPageAAction');
  late final _FPDF_GetPageAAction = _FPDF_GetPageAActionPtr.asFunction<FPDF_ACTION Function(FPDF_PAGE, int)>();

  int FPDF_GetFileIdentifier(
    FPDF_DOCUMENT document,
    int id_type,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDF_GetFileIdentifier(
      document,
      id_type,
      buffer,
      buflen,
    );
  }

  late final _FPDF_GetFileIdentifierPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(
              FPDF_DOCUMENT, ffi.Int32, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>('FPDF_GetFileIdentifier');
  late final _FPDF_GetFileIdentifier =
      _FPDF_GetFileIdentifierPtr.asFunction<int Function(FPDF_DOCUMENT, int, ffi.Pointer<ffi.Void>, int)>();

  int FPDF_GetMetaText(
    FPDF_DOCUMENT document,
    FPDF_BYTESTRING tag,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDF_GetMetaText(
      document,
      tag,
      buffer,
      buflen,
    );
  }

  late final _FPDF_GetMetaTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(
              FPDF_DOCUMENT, FPDF_BYTESTRING, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>('FPDF_GetMetaText');
  late final _FPDF_GetMetaText =
      _FPDF_GetMetaTextPtr.asFunction<int Function(FPDF_DOCUMENT, FPDF_BYTESTRING, ffi.Pointer<ffi.Void>, int)>();

  int FPDF_GetPageLabel(
    FPDF_DOCUMENT document,
    int page_index,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDF_GetPageLabel(
      document,
      page_index,
      buffer,
      buflen,
    );
  }

  late final _FPDF_GetPageLabelPtr = _lookup<
          ffi
          .NativeFunction<ffi.UnsignedLong Function(FPDF_DOCUMENT, ffi.Int, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>(
      'FPDF_GetPageLabel');
  late final _FPDF_GetPageLabel =
      _FPDF_GetPageLabelPtr.asFunction<int Function(FPDF_DOCUMENT, int, ffi.Pointer<ffi.Void>, int)>();

  FPDF_DOCUMENT FPDF_CreateNewDocument() {
    return _FPDF_CreateNewDocument();
  }

  late final _FPDF_CreateNewDocumentPtr =
      _lookup<ffi.NativeFunction<FPDF_DOCUMENT Function()>>('FPDF_CreateNewDocument');
  late final _FPDF_CreateNewDocument = _FPDF_CreateNewDocumentPtr.asFunction<FPDF_DOCUMENT Function()>();

  FPDF_PAGE FPDFPage_New(
    FPDF_DOCUMENT document,
    int page_index,
    double width,
    double height,
  ) {
    return _FPDFPage_New(
      document,
      page_index,
      width,
      height,
    );
  }

  late final _FPDFPage_NewPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGE Function(FPDF_DOCUMENT, ffi.Int, ffi.Double, ffi.Double)>>('FPDFPage_New');
  late final _FPDFPage_New = _FPDFPage_NewPtr.asFunction<FPDF_PAGE Function(FPDF_DOCUMENT, int, double, double)>();

  void FPDFPage_Delete(
    FPDF_DOCUMENT document,
    int page_index,
  ) {
    return _FPDFPage_Delete(
      document,
      page_index,
    );
  }

  late final _FPDFPage_DeletePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_DOCUMENT, ffi.Int)>>('FPDFPage_Delete');
  late final _FPDFPage_Delete = _FPDFPage_DeletePtr.asFunction<void Function(FPDF_DOCUMENT, int)>();

  int FPDF_MovePages(
    FPDF_DOCUMENT document,
    ffi.Pointer<ffi.Int> page_indices,
    int page_indices_len,
    int dest_page_index,
  ) {
    return _FPDF_MovePages(
      document,
      page_indices,
      page_indices_len,
      dest_page_index,
    );
  }

  late final _FPDF_MovePagesPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_DOCUMENT, ffi.Pointer<ffi.Int>, ffi.UnsignedLong, ffi.Int)>>(
          'FPDF_MovePages');
  late final _FPDF_MovePages =
      _FPDF_MovePagesPtr.asFunction<int Function(FPDF_DOCUMENT, ffi.Pointer<ffi.Int>, int, int)>();

  int FPDFPage_GetRotation(
    FPDF_PAGE page,
  ) {
    return _FPDFPage_GetRotation(
      page,
    );
  }

  late final _FPDFPage_GetRotationPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGE)>>('FPDFPage_GetRotation');
  late final _FPDFPage_GetRotation = _FPDFPage_GetRotationPtr.asFunction<int Function(FPDF_PAGE)>();

  void FPDFPage_SetRotation(
    FPDF_PAGE page,
    int rotate,
  ) {
    return _FPDFPage_SetRotation(
      page,
      rotate,
    );
  }

  late final _FPDFPage_SetRotationPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_PAGE, ffi.Int)>>('FPDFPage_SetRotation');
  late final _FPDFPage_SetRotation = _FPDFPage_SetRotationPtr.asFunction<void Function(FPDF_PAGE, int)>();

  void FPDFPage_InsertObject(
    FPDF_PAGE page,
    FPDF_PAGEOBJECT page_object,
  ) {
    return _FPDFPage_InsertObject(
      page,
      page_object,
    );
  }

  late final _FPDFPage_InsertObjectPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_PAGE, FPDF_PAGEOBJECT)>>('FPDFPage_InsertObject');
  late final _FPDFPage_InsertObject = _FPDFPage_InsertObjectPtr.asFunction<void Function(FPDF_PAGE, FPDF_PAGEOBJECT)>();

  int FPDFPage_RemoveObject(
    FPDF_PAGE page,
    FPDF_PAGEOBJECT page_object,
  ) {
    return _FPDFPage_RemoveObject(
      page,
      page_object,
    );
  }

  late final _FPDFPage_RemoveObjectPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGE, FPDF_PAGEOBJECT)>>('FPDFPage_RemoveObject');
  late final _FPDFPage_RemoveObject = _FPDFPage_RemoveObjectPtr.asFunction<int Function(FPDF_PAGE, FPDF_PAGEOBJECT)>();

  int FPDFPage_CountObjects(
    FPDF_PAGE page,
  ) {
    return _FPDFPage_CountObjects(
      page,
    );
  }

  late final _FPDFPage_CountObjectsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGE)>>('FPDFPage_CountObjects');
  late final _FPDFPage_CountObjects = _FPDFPage_CountObjectsPtr.asFunction<int Function(FPDF_PAGE)>();

  FPDF_PAGEOBJECT FPDFPage_GetObject(
    FPDF_PAGE page,
    int index,
  ) {
    return _FPDFPage_GetObject(
      page,
      index,
    );
  }

  late final _FPDFPage_GetObjectPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECT Function(FPDF_PAGE, ffi.Int)>>('FPDFPage_GetObject');
  late final _FPDFPage_GetObject = _FPDFPage_GetObjectPtr.asFunction<FPDF_PAGEOBJECT Function(FPDF_PAGE, int)>();

  int FPDFPage_HasTransparency(
    FPDF_PAGE page,
  ) {
    return _FPDFPage_HasTransparency(
      page,
    );
  }

  late final _FPDFPage_HasTransparencyPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGE)>>('FPDFPage_HasTransparency');
  late final _FPDFPage_HasTransparency = _FPDFPage_HasTransparencyPtr.asFunction<int Function(FPDF_PAGE)>();

  int FPDFPage_GenerateContent(
    FPDF_PAGE page,
  ) {
    return _FPDFPage_GenerateContent(
      page,
    );
  }

  late final _FPDFPage_GenerateContentPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGE)>>('FPDFPage_GenerateContent');
  late final _FPDFPage_GenerateContent = _FPDFPage_GenerateContentPtr.asFunction<int Function(FPDF_PAGE)>();

  void FPDFPageObj_Destroy(
    FPDF_PAGEOBJECT page_object,
  ) {
    return _FPDFPageObj_Destroy(
      page_object,
    );
  }

  late final _FPDFPageObj_DestroyPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_PAGEOBJECT)>>('FPDFPageObj_Destroy');
  late final _FPDFPageObj_Destroy = _FPDFPageObj_DestroyPtr.asFunction<void Function(FPDF_PAGEOBJECT)>();

  int FPDFPageObj_HasTransparency(
    FPDF_PAGEOBJECT page_object,
  ) {
    return _FPDFPageObj_HasTransparency(
      page_object,
    );
  }

  late final _FPDFPageObj_HasTransparencyPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT)>>('FPDFPageObj_HasTransparency');
  late final _FPDFPageObj_HasTransparency = _FPDFPageObj_HasTransparencyPtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  int FPDFPageObj_GetType(
    FPDF_PAGEOBJECT page_object,
  ) {
    return _FPDFPageObj_GetType(
      page_object,
    );
  }

  late final _FPDFPageObj_GetTypePtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGEOBJECT)>>('FPDFPageObj_GetType');
  late final _FPDFPageObj_GetType = _FPDFPageObj_GetTypePtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  void FPDFPageObj_Transform(
    FPDF_PAGEOBJECT page_object,
    double a,
    double b,
    double c,
    double d,
    double e,
    double f,
  ) {
    return _FPDFPageObj_Transform(
      page_object,
      a,
      b,
      c,
      d,
      e,
      f,
    );
  }

  late final _FPDFPageObj_TransformPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(FPDF_PAGEOBJECT, ffi.Double, ffi.Double, ffi.Double, ffi.Double, ffi.Double,
              ffi.Double)>>('FPDFPageObj_Transform');
  late final _FPDFPageObj_Transform = _FPDFPageObj_TransformPtr.asFunction<
      void Function(FPDF_PAGEOBJECT, double, double, double, double, double, double)>();

  int FPDFPageObj_GetMatrix(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<FS_MATRIX> matrix,
  ) {
    return _FPDFPageObj_GetMatrix(
      page_object,
      matrix,
    );
  }

  late final _FPDFPageObj_GetMatrixPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<FS_MATRIX>)>>('FPDFPageObj_GetMatrix');
  late final _FPDFPageObj_GetMatrix =
      _FPDFPageObj_GetMatrixPtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<FS_MATRIX>)>();

  int FPDFPageObj_SetMatrix(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<FS_MATRIX> matrix,
  ) {
    return _FPDFPageObj_SetMatrix(
      page_object,
      matrix,
    );
  }

  late final _FPDFPageObj_SetMatrixPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<FS_MATRIX>)>>('FPDFPageObj_SetMatrix');
  late final _FPDFPageObj_SetMatrix =
      _FPDFPageObj_SetMatrixPtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<FS_MATRIX>)>();

  void FPDFPage_TransformAnnots(
    FPDF_PAGE page,
    double a,
    double b,
    double c,
    double d,
    double e,
    double f,
  ) {
    return _FPDFPage_TransformAnnots(
      page,
      a,
      b,
      c,
      d,
      e,
      f,
    );
  }

  late final _FPDFPage_TransformAnnotsPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(FPDF_PAGE, ffi.Double, ffi.Double, ffi.Double, ffi.Double, ffi.Double,
              ffi.Double)>>('FPDFPage_TransformAnnots');
  late final _FPDFPage_TransformAnnots = _FPDFPage_TransformAnnotsPtr.asFunction<
      void Function(FPDF_PAGE, double, double, double, double, double, double)>();

  FPDF_PAGEOBJECT FPDFPageObj_NewImageObj(
    FPDF_DOCUMENT document,
  ) {
    return _FPDFPageObj_NewImageObj(
      document,
    );
  }

  late final _FPDFPageObj_NewImageObjPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECT Function(FPDF_DOCUMENT)>>('FPDFPageObj_NewImageObj');
  late final _FPDFPageObj_NewImageObj =
      _FPDFPageObj_NewImageObjPtr.asFunction<FPDF_PAGEOBJECT Function(FPDF_DOCUMENT)>();

  int FPDFPageObj_CountMarks(
    FPDF_PAGEOBJECT page_object,
  ) {
    return _FPDFPageObj_CountMarks(
      page_object,
    );
  }

  late final _FPDFPageObj_CountMarksPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGEOBJECT)>>('FPDFPageObj_CountMarks');
  late final _FPDFPageObj_CountMarks = _FPDFPageObj_CountMarksPtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  FPDF_PAGEOBJECTMARK FPDFPageObj_GetMark(
    FPDF_PAGEOBJECT page_object,
    int index,
  ) {
    return _FPDFPageObj_GetMark(
      page_object,
      index,
    );
  }

  late final _FPDFPageObj_GetMarkPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECTMARK Function(FPDF_PAGEOBJECT, ffi.UnsignedLong)>>(
          'FPDFPageObj_GetMark');
  late final _FPDFPageObj_GetMark =
      _FPDFPageObj_GetMarkPtr.asFunction<FPDF_PAGEOBJECTMARK Function(FPDF_PAGEOBJECT, int)>();

  FPDF_PAGEOBJECTMARK FPDFPageObj_AddMark(
    FPDF_PAGEOBJECT page_object,
    FPDF_BYTESTRING name,
  ) {
    return _FPDFPageObj_AddMark(
      page_object,
      name,
    );
  }

  late final _FPDFPageObj_AddMarkPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECTMARK Function(FPDF_PAGEOBJECT, FPDF_BYTESTRING)>>(
          'FPDFPageObj_AddMark');
  late final _FPDFPageObj_AddMark =
      _FPDFPageObj_AddMarkPtr.asFunction<FPDF_PAGEOBJECTMARK Function(FPDF_PAGEOBJECT, FPDF_BYTESTRING)>();

  int FPDFPageObj_RemoveMark(
    FPDF_PAGEOBJECT page_object,
    FPDF_PAGEOBJECTMARK mark,
  ) {
    return _FPDFPageObj_RemoveMark(
      page_object,
      mark,
    );
  }

  late final _FPDFPageObj_RemoveMarkPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK)>>('FPDFPageObj_RemoveMark');
  late final _FPDFPageObj_RemoveMark =
      _FPDFPageObj_RemoveMarkPtr.asFunction<int Function(FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK)>();

  int FPDFPageObjMark_GetName(
    FPDF_PAGEOBJECTMARK mark,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
    ffi.Pointer<ffi.UnsignedLong> out_buflen,
  ) {
    return _FPDFPageObjMark_GetName(
      mark,
      buffer,
      buflen,
      out_buflen,
    );
  }

  late final _FPDFPageObjMark_GetNamePtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECTMARK, ffi.Pointer<ffi.Void>, ffi.UnsignedLong,
              ffi.Pointer<ffi.UnsignedLong>)>>('FPDFPageObjMark_GetName');
  late final _FPDFPageObjMark_GetName = _FPDFPageObjMark_GetNamePtr.asFunction<
      int Function(FPDF_PAGEOBJECTMARK, ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.UnsignedLong>)>();

  int FPDFPageObjMark_CountParams(
    FPDF_PAGEOBJECTMARK mark,
  ) {
    return _FPDFPageObjMark_CountParams(
      mark,
    );
  }

  late final _FPDFPageObjMark_CountParamsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGEOBJECTMARK)>>('FPDFPageObjMark_CountParams');
  late final _FPDFPageObjMark_CountParams =
      _FPDFPageObjMark_CountParamsPtr.asFunction<int Function(FPDF_PAGEOBJECTMARK)>();

  int FPDFPageObjMark_GetParamKey(
    FPDF_PAGEOBJECTMARK mark,
    int index,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
    ffi.Pointer<ffi.UnsignedLong> out_buflen,
  ) {
    return _FPDFPageObjMark_GetParamKey(
      mark,
      index,
      buffer,
      buflen,
      out_buflen,
    );
  }

  late final _FPDFPageObjMark_GetParamKeyPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECTMARK, ffi.UnsignedLong, ffi.Pointer<ffi.Void>, ffi.UnsignedLong,
              ffi.Pointer<ffi.UnsignedLong>)>>('FPDFPageObjMark_GetParamKey');
  late final _FPDFPageObjMark_GetParamKey = _FPDFPageObjMark_GetParamKeyPtr.asFunction<
      int Function(FPDF_PAGEOBJECTMARK, int, ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.UnsignedLong>)>();

  int FPDFPageObjMark_GetParamValueType(
    FPDF_PAGEOBJECTMARK mark,
    FPDF_BYTESTRING key,
  ) {
    return _FPDFPageObjMark_GetParamValueType(
      mark,
      key,
    );
  }

  late final _FPDFPageObjMark_GetParamValueTypePtr =
      _lookup<ffi.NativeFunction<FPDF_OBJECT_TYPE Function(FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING)>>(
          'FPDFPageObjMark_GetParamValueType');
  late final _FPDFPageObjMark_GetParamValueType =
      _FPDFPageObjMark_GetParamValueTypePtr.asFunction<int Function(FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING)>();

  int FPDFPageObjMark_GetParamIntValue(
    FPDF_PAGEOBJECTMARK mark,
    FPDF_BYTESTRING key,
    ffi.Pointer<ffi.Int> out_value,
  ) {
    return _FPDFPageObjMark_GetParamIntValue(
      mark,
      key,
      out_value,
    );
  }

  late final _FPDFPageObjMark_GetParamIntValuePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING, ffi.Pointer<ffi.Int>)>>(
          'FPDFPageObjMark_GetParamIntValue');
  late final _FPDFPageObjMark_GetParamIntValue = _FPDFPageObjMark_GetParamIntValuePtr.asFunction<
      int Function(FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING, ffi.Pointer<ffi.Int>)>();

  int FPDFPageObjMark_GetParamStringValue(
    FPDF_PAGEOBJECTMARK mark,
    FPDF_BYTESTRING key,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
    ffi.Pointer<ffi.UnsignedLong> out_buflen,
  ) {
    return _FPDFPageObjMark_GetParamStringValue(
      mark,
      key,
      buffer,
      buflen,
      out_buflen,
    );
  }

  late final _FPDFPageObjMark_GetParamStringValuePtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING, ffi.Pointer<ffi.Void>, ffi.UnsignedLong,
              ffi.Pointer<ffi.UnsignedLong>)>>('FPDFPageObjMark_GetParamStringValue');
  late final _FPDFPageObjMark_GetParamStringValue = _FPDFPageObjMark_GetParamStringValuePtr.asFunction<
      int Function(FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING, ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.UnsignedLong>)>();

  int FPDFPageObjMark_GetParamBlobValue(
    FPDF_PAGEOBJECTMARK mark,
    FPDF_BYTESTRING key,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
    ffi.Pointer<ffi.UnsignedLong> out_buflen,
  ) {
    return _FPDFPageObjMark_GetParamBlobValue(
      mark,
      key,
      buffer,
      buflen,
      out_buflen,
    );
  }

  late final _FPDFPageObjMark_GetParamBlobValuePtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING, ffi.Pointer<ffi.Void>, ffi.UnsignedLong,
              ffi.Pointer<ffi.UnsignedLong>)>>('FPDFPageObjMark_GetParamBlobValue');
  late final _FPDFPageObjMark_GetParamBlobValue = _FPDFPageObjMark_GetParamBlobValuePtr.asFunction<
      int Function(FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING, ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.UnsignedLong>)>();

  int FPDFPageObjMark_SetIntParam(
    FPDF_DOCUMENT document,
    FPDF_PAGEOBJECT page_object,
    FPDF_PAGEOBJECTMARK mark,
    FPDF_BYTESTRING key,
    int value,
  ) {
    return _FPDFPageObjMark_SetIntParam(
      document,
      page_object,
      mark,
      key,
      value,
    );
  }

  late final _FPDFPageObjMark_SetIntParamPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_DOCUMENT, FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING,
              ffi.Int)>>('FPDFPageObjMark_SetIntParam');
  late final _FPDFPageObjMark_SetIntParam = _FPDFPageObjMark_SetIntParamPtr.asFunction<
      int Function(FPDF_DOCUMENT, FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING, int)>();

  int FPDFPageObjMark_SetStringParam(
    FPDF_DOCUMENT document,
    FPDF_PAGEOBJECT page_object,
    FPDF_PAGEOBJECTMARK mark,
    FPDF_BYTESTRING key,
    FPDF_BYTESTRING value,
  ) {
    return _FPDFPageObjMark_SetStringParam(
      document,
      page_object,
      mark,
      key,
      value,
    );
  }

  late final _FPDFPageObjMark_SetStringParamPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_DOCUMENT, FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING,
              FPDF_BYTESTRING)>>('FPDFPageObjMark_SetStringParam');
  late final _FPDFPageObjMark_SetStringParam = _FPDFPageObjMark_SetStringParamPtr.asFunction<
      int Function(FPDF_DOCUMENT, FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING, FPDF_BYTESTRING)>();

  int FPDFPageObjMark_SetBlobParam(
    FPDF_DOCUMENT document,
    FPDF_PAGEOBJECT page_object,
    FPDF_PAGEOBJECTMARK mark,
    FPDF_BYTESTRING key,
    ffi.Pointer<ffi.Void> value,
    int value_len,
  ) {
    return _FPDFPageObjMark_SetBlobParam(
      document,
      page_object,
      mark,
      key,
      value,
      value_len,
    );
  }

  late final _FPDFPageObjMark_SetBlobParamPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_DOCUMENT, FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING,
              ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>('FPDFPageObjMark_SetBlobParam');
  late final _FPDFPageObjMark_SetBlobParam = _FPDFPageObjMark_SetBlobParamPtr.asFunction<
      int Function(FPDF_DOCUMENT, FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING, ffi.Pointer<ffi.Void>, int)>();

  int FPDFPageObjMark_RemoveParam(
    FPDF_PAGEOBJECT page_object,
    FPDF_PAGEOBJECTMARK mark,
    FPDF_BYTESTRING key,
  ) {
    return _FPDFPageObjMark_RemoveParam(
      page_object,
      mark,
      key,
    );
  }

  late final _FPDFPageObjMark_RemoveParamPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING)>>(
          'FPDFPageObjMark_RemoveParam');
  late final _FPDFPageObjMark_RemoveParam =
      _FPDFPageObjMark_RemoveParamPtr.asFunction<int Function(FPDF_PAGEOBJECT, FPDF_PAGEOBJECTMARK, FPDF_BYTESTRING)>();

  int FPDFImageObj_LoadJpegFile(
    ffi.Pointer<FPDF_PAGE> pages,
    int count,
    FPDF_PAGEOBJECT image_object,
    ffi.Pointer<FPDF_FILEACCESS> file_access,
  ) {
    return _FPDFImageObj_LoadJpegFile(
      pages,
      count,
      image_object,
      file_access,
    );
  }

  late final _FPDFImageObj_LoadJpegFilePtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(ffi.Pointer<FPDF_PAGE>, ffi.Int, FPDF_PAGEOBJECT,
              ffi.Pointer<FPDF_FILEACCESS>)>>('FPDFImageObj_LoadJpegFile');
  late final _FPDFImageObj_LoadJpegFile = _FPDFImageObj_LoadJpegFilePtr.asFunction<
      int Function(ffi.Pointer<FPDF_PAGE>, int, FPDF_PAGEOBJECT, ffi.Pointer<FPDF_FILEACCESS>)>();

  int FPDFImageObj_LoadJpegFileInline(
    ffi.Pointer<FPDF_PAGE> pages,
    int count,
    FPDF_PAGEOBJECT image_object,
    ffi.Pointer<FPDF_FILEACCESS> file_access,
  ) {
    return _FPDFImageObj_LoadJpegFileInline(
      pages,
      count,
      image_object,
      file_access,
    );
  }

  late final _FPDFImageObj_LoadJpegFileInlinePtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(ffi.Pointer<FPDF_PAGE>, ffi.Int, FPDF_PAGEOBJECT,
              ffi.Pointer<FPDF_FILEACCESS>)>>('FPDFImageObj_LoadJpegFileInline');
  late final _FPDFImageObj_LoadJpegFileInline = _FPDFImageObj_LoadJpegFileInlinePtr.asFunction<
      int Function(ffi.Pointer<FPDF_PAGE>, int, FPDF_PAGEOBJECT, ffi.Pointer<FPDF_FILEACCESS>)>();

  int FPDFImageObj_SetMatrix(
    FPDF_PAGEOBJECT image_object,
    double a,
    double b,
    double c,
    double d,
    double e,
    double f,
  ) {
    return _FPDFImageObj_SetMatrix(
      image_object,
      a,
      b,
      c,
      d,
      e,
      f,
    );
  }

  late final _FPDFImageObj_SetMatrixPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Double, ffi.Double, ffi.Double, ffi.Double, ffi.Double,
              ffi.Double)>>('FPDFImageObj_SetMatrix');
  late final _FPDFImageObj_SetMatrix = _FPDFImageObj_SetMatrixPtr.asFunction<
      int Function(FPDF_PAGEOBJECT, double, double, double, double, double, double)>();

  int FPDFImageObj_SetBitmap(
    ffi.Pointer<FPDF_PAGE> pages,
    int count,
    FPDF_PAGEOBJECT image_object,
    FPDF_BITMAP bitmap,
  ) {
    return _FPDFImageObj_SetBitmap(
      pages,
      count,
      image_object,
      bitmap,
    );
  }

  late final _FPDFImageObj_SetBitmapPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(ffi.Pointer<FPDF_PAGE>, ffi.Int, FPDF_PAGEOBJECT, FPDF_BITMAP)>>(
          'FPDFImageObj_SetBitmap');
  late final _FPDFImageObj_SetBitmap =
      _FPDFImageObj_SetBitmapPtr.asFunction<int Function(ffi.Pointer<FPDF_PAGE>, int, FPDF_PAGEOBJECT, FPDF_BITMAP)>();

  FPDF_BITMAP FPDFImageObj_GetBitmap(
    FPDF_PAGEOBJECT image_object,
  ) {
    return _FPDFImageObj_GetBitmap(
      image_object,
    );
  }

  late final _FPDFImageObj_GetBitmapPtr =
      _lookup<ffi.NativeFunction<FPDF_BITMAP Function(FPDF_PAGEOBJECT)>>('FPDFImageObj_GetBitmap');
  late final _FPDFImageObj_GetBitmap = _FPDFImageObj_GetBitmapPtr.asFunction<FPDF_BITMAP Function(FPDF_PAGEOBJECT)>();

  FPDF_BITMAP FPDFImageObj_GetRenderedBitmap(
    FPDF_DOCUMENT document,
    FPDF_PAGE page,
    FPDF_PAGEOBJECT image_object,
  ) {
    return _FPDFImageObj_GetRenderedBitmap(
      document,
      page,
      image_object,
    );
  }

  late final _FPDFImageObj_GetRenderedBitmapPtr =
      _lookup<ffi.NativeFunction<FPDF_BITMAP Function(FPDF_DOCUMENT, FPDF_PAGE, FPDF_PAGEOBJECT)>>(
          'FPDFImageObj_GetRenderedBitmap');
  late final _FPDFImageObj_GetRenderedBitmap =
      _FPDFImageObj_GetRenderedBitmapPtr.asFunction<FPDF_BITMAP Function(FPDF_DOCUMENT, FPDF_PAGE, FPDF_PAGEOBJECT)>();

  int FPDFImageObj_GetImageDataDecoded(
    FPDF_PAGEOBJECT image_object,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDFImageObj_GetImageDataDecoded(
      image_object,
      buffer,
      buflen,
    );
  }

  late final _FPDFImageObj_GetImageDataDecodedPtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>(
          'FPDFImageObj_GetImageDataDecoded');
  late final _FPDFImageObj_GetImageDataDecoded =
      _FPDFImageObj_GetImageDataDecodedPtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Void>, int)>();

  int FPDFImageObj_GetImageDataRaw(
    FPDF_PAGEOBJECT image_object,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDFImageObj_GetImageDataRaw(
      image_object,
      buffer,
      buflen,
    );
  }

  late final _FPDFImageObj_GetImageDataRawPtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>(
          'FPDFImageObj_GetImageDataRaw');
  late final _FPDFImageObj_GetImageDataRaw =
      _FPDFImageObj_GetImageDataRawPtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Void>, int)>();

  int FPDFImageObj_GetImageFilterCount(
    FPDF_PAGEOBJECT image_object,
  ) {
    return _FPDFImageObj_GetImageFilterCount(
      image_object,
    );
  }

  late final _FPDFImageObj_GetImageFilterCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGEOBJECT)>>('FPDFImageObj_GetImageFilterCount');
  late final _FPDFImageObj_GetImageFilterCount =
      _FPDFImageObj_GetImageFilterCountPtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  int FPDFImageObj_GetImageFilter(
    FPDF_PAGEOBJECT image_object,
    int index,
    ffi.Pointer<ffi.Void> buffer,
    int buflen,
  ) {
    return _FPDFImageObj_GetImageFilter(
      image_object,
      index,
      buffer,
      buflen,
    );
  }

  late final _FPDFImageObj_GetImageFilterPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(
              FPDF_PAGEOBJECT, ffi.Int, ffi.Pointer<ffi.Void>, ffi.UnsignedLong)>>('FPDFImageObj_GetImageFilter');
  late final _FPDFImageObj_GetImageFilter =
      _FPDFImageObj_GetImageFilterPtr.asFunction<int Function(FPDF_PAGEOBJECT, int, ffi.Pointer<ffi.Void>, int)>();

  int FPDFImageObj_GetImageMetadata(
    FPDF_PAGEOBJECT image_object,
    FPDF_PAGE page,
    ffi.Pointer<FPDF_IMAGEOBJ_METADATA> metadata,
  ) {
    return _FPDFImageObj_GetImageMetadata(
      image_object,
      page,
      metadata,
    );
  }

  late final _FPDFImageObj_GetImageMetadataPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, FPDF_PAGE, ffi.Pointer<FPDF_IMAGEOBJ_METADATA>)>>(
          'FPDFImageObj_GetImageMetadata');
  late final _FPDFImageObj_GetImageMetadata = _FPDFImageObj_GetImageMetadataPtr.asFunction<
      int Function(FPDF_PAGEOBJECT, FPDF_PAGE, ffi.Pointer<FPDF_IMAGEOBJ_METADATA>)>();

  int FPDFImageObj_GetImagePixelSize(
    FPDF_PAGEOBJECT image_object,
    ffi.Pointer<ffi.UnsignedInt> width,
    ffi.Pointer<ffi.UnsignedInt> height,
  ) {
    return _FPDFImageObj_GetImagePixelSize(
      image_object,
      width,
      height,
    );
  }

  late final _FPDFImageObj_GetImagePixelSizePtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.UnsignedInt>,
              ffi.Pointer<ffi.UnsignedInt>)>>('FPDFImageObj_GetImagePixelSize');
  late final _FPDFImageObj_GetImagePixelSize = _FPDFImageObj_GetImagePixelSizePtr.asFunction<
      int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>();

  FPDF_PAGEOBJECT FPDFPageObj_CreateNewPath(
    double x,
    double y,
  ) {
    return _FPDFPageObj_CreateNewPath(
      x,
      y,
    );
  }

  late final _FPDFPageObj_CreateNewPathPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECT Function(ffi.Float, ffi.Float)>>('FPDFPageObj_CreateNewPath');
  late final _FPDFPageObj_CreateNewPath =
      _FPDFPageObj_CreateNewPathPtr.asFunction<FPDF_PAGEOBJECT Function(double, double)>();

  FPDF_PAGEOBJECT FPDFPageObj_CreateNewRect(
    double x,
    double y,
    double w,
    double h,
  ) {
    return _FPDFPageObj_CreateNewRect(
      x,
      y,
      w,
      h,
    );
  }

  late final _FPDFPageObj_CreateNewRectPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECT Function(ffi.Float, ffi.Float, ffi.Float, ffi.Float)>>(
          'FPDFPageObj_CreateNewRect');
  late final _FPDFPageObj_CreateNewRect =
      _FPDFPageObj_CreateNewRectPtr.asFunction<FPDF_PAGEOBJECT Function(double, double, double, double)>();

  int FPDFPageObj_GetBounds(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<ffi.Float> left,
    ffi.Pointer<ffi.Float> bottom,
    ffi.Pointer<ffi.Float> right,
    ffi.Pointer<ffi.Float> top,
  ) {
    return _FPDFPageObj_GetBounds(
      page_object,
      left,
      bottom,
      right,
      top,
    );
  }

  late final _FPDFPageObj_GetBoundsPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>,
              ffi.Pointer<ffi.Float>)>>('FPDFPageObj_GetBounds');
  late final _FPDFPageObj_GetBounds = _FPDFPageObj_GetBoundsPtr.asFunction<
      int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>,
          ffi.Pointer<ffi.Float>)>();

  int FPDFPageObj_GetRotatedBounds(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<FS_QUADPOINTSF> quad_points,
  ) {
    return _FPDFPageObj_GetRotatedBounds(
      page_object,
      quad_points,
    );
  }

  late final _FPDFPageObj_GetRotatedBoundsPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<FS_QUADPOINTSF>)>>(
          'FPDFPageObj_GetRotatedBounds');
  late final _FPDFPageObj_GetRotatedBounds =
      _FPDFPageObj_GetRotatedBoundsPtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<FS_QUADPOINTSF>)>();

  void FPDFPageObj_SetBlendMode(
    FPDF_PAGEOBJECT page_object,
    FPDF_BYTESTRING blend_mode,
  ) {
    return _FPDFPageObj_SetBlendMode(
      page_object,
      blend_mode,
    );
  }

  late final _FPDFPageObj_SetBlendModePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_PAGEOBJECT, FPDF_BYTESTRING)>>('FPDFPageObj_SetBlendMode');
  late final _FPDFPageObj_SetBlendMode =
      _FPDFPageObj_SetBlendModePtr.asFunction<void Function(FPDF_PAGEOBJECT, FPDF_BYTESTRING)>();

  int FPDFPageObj_SetStrokeColor(
    FPDF_PAGEOBJECT page_object,
    int R,
    int G,
    int B,
    int A,
  ) {
    return _FPDFPageObj_SetStrokeColor(
      page_object,
      R,
      G,
      B,
      A,
    );
  }

  late final _FPDFPageObj_SetStrokeColorPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.UnsignedInt, ffi.UnsignedInt, ffi.UnsignedInt,
              ffi.UnsignedInt)>>('FPDFPageObj_SetStrokeColor');
  late final _FPDFPageObj_SetStrokeColor =
      _FPDFPageObj_SetStrokeColorPtr.asFunction<int Function(FPDF_PAGEOBJECT, int, int, int, int)>();

  int FPDFPageObj_GetStrokeColor(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<ffi.UnsignedInt> R,
    ffi.Pointer<ffi.UnsignedInt> G,
    ffi.Pointer<ffi.UnsignedInt> B,
    ffi.Pointer<ffi.UnsignedInt> A,
  ) {
    return _FPDFPageObj_GetStrokeColor(
      page_object,
      R,
      G,
      B,
      A,
    );
  }

  late final _FPDFPageObj_GetStrokeColorPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
              ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>>('FPDFPageObj_GetStrokeColor');
  late final _FPDFPageObj_GetStrokeColor = _FPDFPageObj_GetStrokeColorPtr.asFunction<
      int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
          ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>();

  int FPDFPageObj_SetStrokeWidth(
    FPDF_PAGEOBJECT page_object,
    double width,
  ) {
    return _FPDFPageObj_SetStrokeWidth(
      page_object,
      width,
    );
  }

  late final _FPDFPageObj_SetStrokeWidthPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Float)>>('FPDFPageObj_SetStrokeWidth');
  late final _FPDFPageObj_SetStrokeWidth =
      _FPDFPageObj_SetStrokeWidthPtr.asFunction<int Function(FPDF_PAGEOBJECT, double)>();

  int FPDFPageObj_GetStrokeWidth(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<ffi.Float> width,
  ) {
    return _FPDFPageObj_GetStrokeWidth(
      page_object,
      width,
    );
  }

  late final _FPDFPageObj_GetStrokeWidthPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>)>>(
          'FPDFPageObj_GetStrokeWidth');
  late final _FPDFPageObj_GetStrokeWidth =
      _FPDFPageObj_GetStrokeWidthPtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>)>();

  int FPDFPageObj_GetLineJoin(
    FPDF_PAGEOBJECT page_object,
  ) {
    return _FPDFPageObj_GetLineJoin(
      page_object,
    );
  }

  late final _FPDFPageObj_GetLineJoinPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGEOBJECT)>>('FPDFPageObj_GetLineJoin');
  late final _FPDFPageObj_GetLineJoin = _FPDFPageObj_GetLineJoinPtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  int FPDFPageObj_SetLineJoin(
    FPDF_PAGEOBJECT page_object,
    int line_join,
  ) {
    return _FPDFPageObj_SetLineJoin(
      page_object,
      line_join,
    );
  }

  late final _FPDFPageObj_SetLineJoinPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Int)>>('FPDFPageObj_SetLineJoin');
  late final _FPDFPageObj_SetLineJoin = _FPDFPageObj_SetLineJoinPtr.asFunction<int Function(FPDF_PAGEOBJECT, int)>();

  int FPDFPageObj_GetLineCap(
    FPDF_PAGEOBJECT page_object,
  ) {
    return _FPDFPageObj_GetLineCap(
      page_object,
    );
  }

  late final _FPDFPageObj_GetLineCapPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGEOBJECT)>>('FPDFPageObj_GetLineCap');
  late final _FPDFPageObj_GetLineCap = _FPDFPageObj_GetLineCapPtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  int FPDFPageObj_SetLineCap(
    FPDF_PAGEOBJECT page_object,
    int line_cap,
  ) {
    return _FPDFPageObj_SetLineCap(
      page_object,
      line_cap,
    );
  }

  late final _FPDFPageObj_SetLineCapPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Int)>>('FPDFPageObj_SetLineCap');
  late final _FPDFPageObj_SetLineCap = _FPDFPageObj_SetLineCapPtr.asFunction<int Function(FPDF_PAGEOBJECT, int)>();

  int FPDFPageObj_SetFillColor(
    FPDF_PAGEOBJECT page_object,
    int R,
    int G,
    int B,
    int A,
  ) {
    return _FPDFPageObj_SetFillColor(
      page_object,
      R,
      G,
      B,
      A,
    );
  }

  late final _FPDFPageObj_SetFillColorPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.UnsignedInt, ffi.UnsignedInt, ffi.UnsignedInt,
              ffi.UnsignedInt)>>('FPDFPageObj_SetFillColor');
  late final _FPDFPageObj_SetFillColor =
      _FPDFPageObj_SetFillColorPtr.asFunction<int Function(FPDF_PAGEOBJECT, int, int, int, int)>();

  int FPDFPageObj_GetFillColor(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<ffi.UnsignedInt> R,
    ffi.Pointer<ffi.UnsignedInt> G,
    ffi.Pointer<ffi.UnsignedInt> B,
    ffi.Pointer<ffi.UnsignedInt> A,
  ) {
    return _FPDFPageObj_GetFillColor(
      page_object,
      R,
      G,
      B,
      A,
    );
  }

  late final _FPDFPageObj_GetFillColorPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
              ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>>('FPDFPageObj_GetFillColor');
  late final _FPDFPageObj_GetFillColor = _FPDFPageObj_GetFillColorPtr.asFunction<
      int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>,
          ffi.Pointer<ffi.UnsignedInt>, ffi.Pointer<ffi.UnsignedInt>)>();

  int FPDFPageObj_GetDashPhase(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<ffi.Float> phase,
  ) {
    return _FPDFPageObj_GetDashPhase(
      page_object,
      phase,
    );
  }

  late final _FPDFPageObj_GetDashPhasePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>)>>(
          'FPDFPageObj_GetDashPhase');
  late final _FPDFPageObj_GetDashPhase =
      _FPDFPageObj_GetDashPhasePtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>)>();

  int FPDFPageObj_SetDashPhase(
    FPDF_PAGEOBJECT page_object,
    double phase,
  ) {
    return _FPDFPageObj_SetDashPhase(
      page_object,
      phase,
    );
  }

  late final _FPDFPageObj_SetDashPhasePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Float)>>('FPDFPageObj_SetDashPhase');
  late final _FPDFPageObj_SetDashPhase =
      _FPDFPageObj_SetDashPhasePtr.asFunction<int Function(FPDF_PAGEOBJECT, double)>();

  int FPDFPageObj_GetDashCount(
    FPDF_PAGEOBJECT page_object,
  ) {
    return _FPDFPageObj_GetDashCount(
      page_object,
    );
  }

  late final _FPDFPageObj_GetDashCountPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGEOBJECT)>>('FPDFPageObj_GetDashCount');
  late final _FPDFPageObj_GetDashCount = _FPDFPageObj_GetDashCountPtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  int FPDFPageObj_GetDashArray(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<ffi.Float> dash_array,
    int dash_count,
  ) {
    return _FPDFPageObj_GetDashArray(
      page_object,
      dash_array,
      dash_count,
    );
  }

  late final _FPDFPageObj_GetDashArrayPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>, ffi.Size)>>(
          'FPDFPageObj_GetDashArray');
  late final _FPDFPageObj_GetDashArray =
      _FPDFPageObj_GetDashArrayPtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>, int)>();

  int FPDFPageObj_SetDashArray(
    FPDF_PAGEOBJECT page_object,
    ffi.Pointer<ffi.Float> dash_array,
    int dash_count,
    double phase,
  ) {
    return _FPDFPageObj_SetDashArray(
      page_object,
      dash_array,
      dash_count,
      phase,
    );
  }

  late final _FPDFPageObj_SetDashArrayPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>, ffi.Size, ffi.Float)>>(
          'FPDFPageObj_SetDashArray');
  late final _FPDFPageObj_SetDashArray =
      _FPDFPageObj_SetDashArrayPtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>, int, double)>();

  int FPDFPath_CountSegments(
    FPDF_PAGEOBJECT path,
  ) {
    return _FPDFPath_CountSegments(
      path,
    );
  }

  late final _FPDFPath_CountSegmentsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGEOBJECT)>>('FPDFPath_CountSegments');
  late final _FPDFPath_CountSegments = _FPDFPath_CountSegmentsPtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  FPDF_PATHSEGMENT FPDFPath_GetPathSegment(
    FPDF_PAGEOBJECT path,
    int index,
  ) {
    return _FPDFPath_GetPathSegment(
      path,
      index,
    );
  }

  late final _FPDFPath_GetPathSegmentPtr =
      _lookup<ffi.NativeFunction<FPDF_PATHSEGMENT Function(FPDF_PAGEOBJECT, ffi.Int)>>('FPDFPath_GetPathSegment');
  late final _FPDFPath_GetPathSegment =
      _FPDFPath_GetPathSegmentPtr.asFunction<FPDF_PATHSEGMENT Function(FPDF_PAGEOBJECT, int)>();

  int FPDFPathSegment_GetPoint(
    FPDF_PATHSEGMENT segment,
    ffi.Pointer<ffi.Float> x,
    ffi.Pointer<ffi.Float> y,
  ) {
    return _FPDFPathSegment_GetPoint(
      segment,
      x,
      y,
    );
  }

  late final _FPDFPathSegment_GetPointPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PATHSEGMENT, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>)>>(
          'FPDFPathSegment_GetPoint');
  late final _FPDFPathSegment_GetPoint = _FPDFPathSegment_GetPointPtr.asFunction<
      int Function(FPDF_PATHSEGMENT, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Float>)>();

  int FPDFPathSegment_GetType(
    FPDF_PATHSEGMENT segment,
  ) {
    return _FPDFPathSegment_GetType(
      segment,
    );
  }

  late final _FPDFPathSegment_GetTypePtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PATHSEGMENT)>>('FPDFPathSegment_GetType');
  late final _FPDFPathSegment_GetType = _FPDFPathSegment_GetTypePtr.asFunction<int Function(FPDF_PATHSEGMENT)>();

  int FPDFPathSegment_GetClose(
    FPDF_PATHSEGMENT segment,
  ) {
    return _FPDFPathSegment_GetClose(
      segment,
    );
  }

  late final _FPDFPathSegment_GetClosePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PATHSEGMENT)>>('FPDFPathSegment_GetClose');
  late final _FPDFPathSegment_GetClose = _FPDFPathSegment_GetClosePtr.asFunction<int Function(FPDF_PATHSEGMENT)>();

  int FPDFPath_MoveTo(
    FPDF_PAGEOBJECT path,
    double x,
    double y,
  ) {
    return _FPDFPath_MoveTo(
      path,
      x,
      y,
    );
  }

  late final _FPDFPath_MoveToPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Float, ffi.Float)>>('FPDFPath_MoveTo');
  late final _FPDFPath_MoveTo = _FPDFPath_MoveToPtr.asFunction<int Function(FPDF_PAGEOBJECT, double, double)>();

  int FPDFPath_LineTo(
    FPDF_PAGEOBJECT path,
    double x,
    double y,
  ) {
    return _FPDFPath_LineTo(
      path,
      x,
      y,
    );
  }

  late final _FPDFPath_LineToPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Float, ffi.Float)>>('FPDFPath_LineTo');
  late final _FPDFPath_LineTo = _FPDFPath_LineToPtr.asFunction<int Function(FPDF_PAGEOBJECT, double, double)>();

  int FPDFPath_BezierTo(
    FPDF_PAGEOBJECT path,
    double x1,
    double y1,
    double x2,
    double y2,
    double x3,
    double y3,
  ) {
    return _FPDFPath_BezierTo(
      path,
      x1,
      y1,
      x2,
      y2,
      x3,
      y3,
    );
  }

  late final _FPDFPath_BezierToPtr = _lookup<
      ffi.NativeFunction<
          FPDF_BOOL Function(
              FPDF_PAGEOBJECT, ffi.Float, ffi.Float, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>>('FPDFPath_BezierTo');
  late final _FPDFPath_BezierTo =
      _FPDFPath_BezierToPtr.asFunction<int Function(FPDF_PAGEOBJECT, double, double, double, double, double, double)>();

  int FPDFPath_Close(
    FPDF_PAGEOBJECT path,
  ) {
    return _FPDFPath_Close(
      path,
    );
  }

  late final _FPDFPath_ClosePtr = _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT)>>('FPDFPath_Close');
  late final _FPDFPath_Close = _FPDFPath_ClosePtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  int FPDFPath_SetDrawMode(
    FPDF_PAGEOBJECT path,
    int fillmode,
    int stroke,
  ) {
    return _FPDFPath_SetDrawMode(
      path,
      fillmode,
      stroke,
    );
  }

  late final _FPDFPath_SetDrawModePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Int, FPDF_BOOL)>>('FPDFPath_SetDrawMode');
  late final _FPDFPath_SetDrawMode = _FPDFPath_SetDrawModePtr.asFunction<int Function(FPDF_PAGEOBJECT, int, int)>();

  int FPDFPath_GetDrawMode(
    FPDF_PAGEOBJECT path,
    ffi.Pointer<ffi.Int> fillmode,
    ffi.Pointer<FPDF_BOOL> stroke,
  ) {
    return _FPDFPath_GetDrawMode(
      path,
      fillmode,
      stroke,
    );
  }

  late final _FPDFPath_GetDrawModePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Int>, ffi.Pointer<FPDF_BOOL>)>>(
          'FPDFPath_GetDrawMode');
  late final _FPDFPath_GetDrawMode = _FPDFPath_GetDrawModePtr.asFunction<
      int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Int>, ffi.Pointer<FPDF_BOOL>)>();

  FPDF_PAGEOBJECT FPDFPageObj_NewTextObj(
    FPDF_DOCUMENT document,
    FPDF_BYTESTRING font,
    double font_size,
  ) {
    return _FPDFPageObj_NewTextObj(
      document,
      font,
      font_size,
    );
  }

  late final _FPDFPageObj_NewTextObjPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECT Function(FPDF_DOCUMENT, FPDF_BYTESTRING, ffi.Float)>>(
          'FPDFPageObj_NewTextObj');
  late final _FPDFPageObj_NewTextObj =
      _FPDFPageObj_NewTextObjPtr.asFunction<FPDF_PAGEOBJECT Function(FPDF_DOCUMENT, FPDF_BYTESTRING, double)>();

  int FPDFText_SetText(
    FPDF_PAGEOBJECT text_object,
    FPDF_WIDESTRING text,
  ) {
    return _FPDFText_SetText(
      text_object,
      text,
    );
  }

  late final _FPDFText_SetTextPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, FPDF_WIDESTRING)>>('FPDFText_SetText');
  late final _FPDFText_SetText = _FPDFText_SetTextPtr.asFunction<int Function(FPDF_PAGEOBJECT, FPDF_WIDESTRING)>();

  int FPDFText_SetCharcodes(
    FPDF_PAGEOBJECT text_object,
    ffi.Pointer<ffi.Uint32> charcodes,
    int count,
  ) {
    return _FPDFText_SetCharcodes(
      text_object,
      charcodes,
      count,
    );
  }

  late final _FPDFText_SetCharcodesPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Uint32>, ffi.Size)>>(
          'FPDFText_SetCharcodes');
  late final _FPDFText_SetCharcodes =
      _FPDFText_SetCharcodesPtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Uint32>, int)>();

  FPDF_FONT FPDFText_LoadFont(
    FPDF_DOCUMENT document,
    ffi.Pointer<ffi.Uint8> data,
    int size,
    int font_type,
    int cid,
  ) {
    return _FPDFText_LoadFont(
      document,
      data,
      size,
      font_type,
      cid,
    );
  }

  late final _FPDFText_LoadFontPtr = _lookup<
          ffi
          .NativeFunction<FPDF_FONT Function(FPDF_DOCUMENT, ffi.Pointer<ffi.Uint8>, ffi.Uint32, ffi.Int, FPDF_BOOL)>>(
      'FPDFText_LoadFont');
  late final _FPDFText_LoadFont =
      _FPDFText_LoadFontPtr.asFunction<FPDF_FONT Function(FPDF_DOCUMENT, ffi.Pointer<ffi.Uint8>, int, int, int)>();

  FPDF_FONT FPDFText_LoadStandardFont(
    FPDF_DOCUMENT document,
    FPDF_BYTESTRING font,
  ) {
    return _FPDFText_LoadStandardFont(
      document,
      font,
    );
  }

  late final _FPDFText_LoadStandardFontPtr =
      _lookup<ffi.NativeFunction<FPDF_FONT Function(FPDF_DOCUMENT, FPDF_BYTESTRING)>>('FPDFText_LoadStandardFont');
  late final _FPDFText_LoadStandardFont =
      _FPDFText_LoadStandardFontPtr.asFunction<FPDF_FONT Function(FPDF_DOCUMENT, FPDF_BYTESTRING)>();

  FPDF_FONT FPDFText_LoadCidType2Font(
    FPDF_DOCUMENT document,
    ffi.Pointer<ffi.Uint8> font_data,
    int font_data_size,
    FPDF_BYTESTRING to_unicode_cmap,
    ffi.Pointer<ffi.Uint8> cid_to_gid_map_data,
    int cid_to_gid_map_data_size,
  ) {
    return _FPDFText_LoadCidType2Font(
      document,
      font_data,
      font_data_size,
      to_unicode_cmap,
      cid_to_gid_map_data,
      cid_to_gid_map_data_size,
    );
  }

  late final _FPDFText_LoadCidType2FontPtr = _lookup<
      ffi.NativeFunction<
          FPDF_FONT Function(FPDF_DOCUMENT, ffi.Pointer<ffi.Uint8>, ffi.Uint32, FPDF_BYTESTRING, ffi.Pointer<ffi.Uint8>,
              ffi.Uint32)>>('FPDFText_LoadCidType2Font');
  late final _FPDFText_LoadCidType2Font = _FPDFText_LoadCidType2FontPtr.asFunction<
      FPDF_FONT Function(FPDF_DOCUMENT, ffi.Pointer<ffi.Uint8>, int, FPDF_BYTESTRING, ffi.Pointer<ffi.Uint8>, int)>();

  int FPDFTextObj_GetFontSize(
    FPDF_PAGEOBJECT text,
    ffi.Pointer<ffi.Float> size,
  ) {
    return _FPDFTextObj_GetFontSize(
      text,
      size,
    );
  }

  late final _FPDFTextObj_GetFontSizePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>)>>(
          'FPDFTextObj_GetFontSize');
  late final _FPDFTextObj_GetFontSize =
      _FPDFTextObj_GetFontSizePtr.asFunction<int Function(FPDF_PAGEOBJECT, ffi.Pointer<ffi.Float>)>();

  void FPDFFont_Close(
    FPDF_FONT font,
  ) {
    return _FPDFFont_Close(
      font,
    );
  }

  late final _FPDFFont_ClosePtr = _lookup<ffi.NativeFunction<ffi.Void Function(FPDF_FONT)>>('FPDFFont_Close');
  late final _FPDFFont_Close = _FPDFFont_ClosePtr.asFunction<void Function(FPDF_FONT)>();

  FPDF_PAGEOBJECT FPDFPageObj_CreateTextObj(
    FPDF_DOCUMENT document,
    FPDF_FONT font,
    double font_size,
  ) {
    return _FPDFPageObj_CreateTextObj(
      document,
      font,
      font_size,
    );
  }

  late final _FPDFPageObj_CreateTextObjPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECT Function(FPDF_DOCUMENT, FPDF_FONT, ffi.Float)>>(
          'FPDFPageObj_CreateTextObj');
  late final _FPDFPageObj_CreateTextObj =
      _FPDFPageObj_CreateTextObjPtr.asFunction<FPDF_PAGEOBJECT Function(FPDF_DOCUMENT, FPDF_FONT, double)>();

  int FPDFTextObj_GetTextRenderMode(
    FPDF_PAGEOBJECT text,
  ) {
    return _FPDFTextObj_GetTextRenderMode(
      text,
    );
  }

  late final _FPDFTextObj_GetTextRenderModePtr =
      _lookup<ffi.NativeFunction<ffi.Int32 Function(FPDF_PAGEOBJECT)>>('FPDFTextObj_GetTextRenderMode');
  late final _FPDFTextObj_GetTextRenderMode =
      _FPDFTextObj_GetTextRenderModePtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  int FPDFTextObj_SetTextRenderMode(
    FPDF_PAGEOBJECT text,
    int render_mode,
  ) {
    return _FPDFTextObj_SetTextRenderMode(
      text,
      render_mode,
    );
  }

  late final _FPDFTextObj_SetTextRenderModePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_PAGEOBJECT, ffi.Int32)>>('FPDFTextObj_SetTextRenderMode');
  late final _FPDFTextObj_SetTextRenderMode =
      _FPDFTextObj_SetTextRenderModePtr.asFunction<int Function(FPDF_PAGEOBJECT, int)>();

  int FPDFTextObj_GetText(
    FPDF_PAGEOBJECT text_object,
    FPDF_TEXTPAGE text_page,
    ffi.Pointer<FPDF_WCHAR> buffer,
    int length,
  ) {
    return _FPDFTextObj_GetText(
      text_object,
      text_page,
      buffer,
      length,
    );
  }

  late final _FPDFTextObj_GetTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.UnsignedLong Function(
              FPDF_PAGEOBJECT, FPDF_TEXTPAGE, ffi.Pointer<FPDF_WCHAR>, ffi.UnsignedLong)>>('FPDFTextObj_GetText');
  late final _FPDFTextObj_GetText =
      _FPDFTextObj_GetTextPtr.asFunction<int Function(FPDF_PAGEOBJECT, FPDF_TEXTPAGE, ffi.Pointer<FPDF_WCHAR>, int)>();

  FPDF_BITMAP FPDFTextObj_GetRenderedBitmap(
    FPDF_DOCUMENT document,
    FPDF_PAGE page,
    FPDF_PAGEOBJECT text_object,
    double scale,
  ) {
    return _FPDFTextObj_GetRenderedBitmap(
      document,
      page,
      text_object,
      scale,
    );
  }

  late final _FPDFTextObj_GetRenderedBitmapPtr =
      _lookup<ffi.NativeFunction<FPDF_BITMAP Function(FPDF_DOCUMENT, FPDF_PAGE, FPDF_PAGEOBJECT, ffi.Float)>>(
          'FPDFTextObj_GetRenderedBitmap');
  late final _FPDFTextObj_GetRenderedBitmap = _FPDFTextObj_GetRenderedBitmapPtr.asFunction<
      FPDF_BITMAP Function(FPDF_DOCUMENT, FPDF_PAGE, FPDF_PAGEOBJECT, double)>();

  FPDF_FONT FPDFTextObj_GetFont(
    FPDF_PAGEOBJECT text,
  ) {
    return _FPDFTextObj_GetFont(
      text,
    );
  }

  late final _FPDFTextObj_GetFontPtr =
      _lookup<ffi.NativeFunction<FPDF_FONT Function(FPDF_PAGEOBJECT)>>('FPDFTextObj_GetFont');
  late final _FPDFTextObj_GetFont = _FPDFTextObj_GetFontPtr.asFunction<FPDF_FONT Function(FPDF_PAGEOBJECT)>();

  int FPDFFont_GetFontName(
    FPDF_FONT font,
    ffi.Pointer<ffi.Char> buffer,
    int length,
  ) {
    return _FPDFFont_GetFontName(
      font,
      buffer,
      length,
    );
  }

  late final _FPDFFont_GetFontNamePtr =
      _lookup<ffi.NativeFunction<ffi.UnsignedLong Function(FPDF_FONT, ffi.Pointer<ffi.Char>, ffi.UnsignedLong)>>(
          'FPDFFont_GetFontName');
  late final _FPDFFont_GetFontName =
      _FPDFFont_GetFontNamePtr.asFunction<int Function(FPDF_FONT, ffi.Pointer<ffi.Char>, int)>();

  int FPDFFont_GetFontData(
    FPDF_FONT font,
    ffi.Pointer<ffi.Uint8> buffer,
    int buflen,
    ffi.Pointer<ffi.Size> out_buflen,
  ) {
    return _FPDFFont_GetFontData(
      font,
      buffer,
      buflen,
      out_buflen,
    );
  }

  late final _FPDFFont_GetFontDataPtr = _lookup<
          ffi.NativeFunction<FPDF_BOOL Function(FPDF_FONT, ffi.Pointer<ffi.Uint8>, ffi.Size, ffi.Pointer<ffi.Size>)>>(
      'FPDFFont_GetFontData');
  late final _FPDFFont_GetFontData = _FPDFFont_GetFontDataPtr.asFunction<
      int Function(FPDF_FONT, ffi.Pointer<ffi.Uint8>, int, ffi.Pointer<ffi.Size>)>();

  int FPDFFont_GetIsEmbedded(
    FPDF_FONT font,
  ) {
    return _FPDFFont_GetIsEmbedded(
      font,
    );
  }

  late final _FPDFFont_GetIsEmbeddedPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FONT)>>('FPDFFont_GetIsEmbedded');
  late final _FPDFFont_GetIsEmbedded = _FPDFFont_GetIsEmbeddedPtr.asFunction<int Function(FPDF_FONT)>();

  int FPDFFont_GetFlags(
    FPDF_FONT font,
  ) {
    return _FPDFFont_GetFlags(
      font,
    );
  }

  late final _FPDFFont_GetFlagsPtr = _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FONT)>>('FPDFFont_GetFlags');
  late final _FPDFFont_GetFlags = _FPDFFont_GetFlagsPtr.asFunction<int Function(FPDF_FONT)>();

  int FPDFFont_GetWeight(
    FPDF_FONT font,
  ) {
    return _FPDFFont_GetWeight(
      font,
    );
  }

  late final _FPDFFont_GetWeightPtr = _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_FONT)>>('FPDFFont_GetWeight');
  late final _FPDFFont_GetWeight = _FPDFFont_GetWeightPtr.asFunction<int Function(FPDF_FONT)>();

  int FPDFFont_GetItalicAngle(
    FPDF_FONT font,
    ffi.Pointer<ffi.Int> angle,
  ) {
    return _FPDFFont_GetItalicAngle(
      font,
      angle,
    );
  }

  late final _FPDFFont_GetItalicAnglePtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FONT, ffi.Pointer<ffi.Int>)>>('FPDFFont_GetItalicAngle');
  late final _FPDFFont_GetItalicAngle =
      _FPDFFont_GetItalicAnglePtr.asFunction<int Function(FPDF_FONT, ffi.Pointer<ffi.Int>)>();

  int FPDFFont_GetAscent(
    FPDF_FONT font,
    double font_size,
    ffi.Pointer<ffi.Float> ascent,
  ) {
    return _FPDFFont_GetAscent(
      font,
      font_size,
      ascent,
    );
  }

  late final _FPDFFont_GetAscentPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FONT, ffi.Float, ffi.Pointer<ffi.Float>)>>(
          'FPDFFont_GetAscent');
  late final _FPDFFont_GetAscent =
      _FPDFFont_GetAscentPtr.asFunction<int Function(FPDF_FONT, double, ffi.Pointer<ffi.Float>)>();

  int FPDFFont_GetDescent(
    FPDF_FONT font,
    double font_size,
    ffi.Pointer<ffi.Float> descent,
  ) {
    return _FPDFFont_GetDescent(
      font,
      font_size,
      descent,
    );
  }

  late final _FPDFFont_GetDescentPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FONT, ffi.Float, ffi.Pointer<ffi.Float>)>>(
          'FPDFFont_GetDescent');
  late final _FPDFFont_GetDescent =
      _FPDFFont_GetDescentPtr.asFunction<int Function(FPDF_FONT, double, ffi.Pointer<ffi.Float>)>();

  int FPDFFont_GetGlyphWidth(
    FPDF_FONT font,
    int glyph,
    double font_size,
    ffi.Pointer<ffi.Float> width,
  ) {
    return _FPDFFont_GetGlyphWidth(
      font,
      glyph,
      font_size,
      width,
    );
  }

  late final _FPDFFont_GetGlyphWidthPtr =
      _lookup<ffi.NativeFunction<FPDF_BOOL Function(FPDF_FONT, ffi.Uint32, ffi.Float, ffi.Pointer<ffi.Float>)>>(
          'FPDFFont_GetGlyphWidth');
  late final _FPDFFont_GetGlyphWidth =
      _FPDFFont_GetGlyphWidthPtr.asFunction<int Function(FPDF_FONT, int, double, ffi.Pointer<ffi.Float>)>();

  FPDF_GLYPHPATH FPDFFont_GetGlyphPath(
    FPDF_FONT font,
    int glyph,
    double font_size,
  ) {
    return _FPDFFont_GetGlyphPath(
      font,
      glyph,
      font_size,
    );
  }

  late final _FPDFFont_GetGlyphPathPtr =
      _lookup<ffi.NativeFunction<FPDF_GLYPHPATH Function(FPDF_FONT, ffi.Uint32, ffi.Float)>>('FPDFFont_GetGlyphPath');
  late final _FPDFFont_GetGlyphPath =
      _FPDFFont_GetGlyphPathPtr.asFunction<FPDF_GLYPHPATH Function(FPDF_FONT, int, double)>();

  int FPDFGlyphPath_CountGlyphSegments(
    FPDF_GLYPHPATH glyphpath,
  ) {
    return _FPDFGlyphPath_CountGlyphSegments(
      glyphpath,
    );
  }

  late final _FPDFGlyphPath_CountGlyphSegmentsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_GLYPHPATH)>>('FPDFGlyphPath_CountGlyphSegments');
  late final _FPDFGlyphPath_CountGlyphSegments =
      _FPDFGlyphPath_CountGlyphSegmentsPtr.asFunction<int Function(FPDF_GLYPHPATH)>();

  FPDF_PATHSEGMENT FPDFGlyphPath_GetGlyphPathSegment(
    FPDF_GLYPHPATH glyphpath,
    int index,
  ) {
    return _FPDFGlyphPath_GetGlyphPathSegment(
      glyphpath,
      index,
    );
  }

  late final _FPDFGlyphPath_GetGlyphPathSegmentPtr =
      _lookup<ffi.NativeFunction<FPDF_PATHSEGMENT Function(FPDF_GLYPHPATH, ffi.Int)>>(
          'FPDFGlyphPath_GetGlyphPathSegment');
  late final _FPDFGlyphPath_GetGlyphPathSegment =
      _FPDFGlyphPath_GetGlyphPathSegmentPtr.asFunction<FPDF_PATHSEGMENT Function(FPDF_GLYPHPATH, int)>();

  int FPDFFormObj_CountObjects(
    FPDF_PAGEOBJECT form_object,
  ) {
    return _FPDFFormObj_CountObjects(
      form_object,
    );
  }

  late final _FPDFFormObj_CountObjectsPtr =
      _lookup<ffi.NativeFunction<ffi.Int Function(FPDF_PAGEOBJECT)>>('FPDFFormObj_CountObjects');
  late final _FPDFFormObj_CountObjects = _FPDFFormObj_CountObjectsPtr.asFunction<int Function(FPDF_PAGEOBJECT)>();

  FPDF_PAGEOBJECT FPDFFormObj_GetObject(
    FPDF_PAGEOBJECT form_object,
    int index,
  ) {
    return _FPDFFormObj_GetObject(
      form_object,
      index,
    );
  }

  late final _FPDFFormObj_GetObjectPtr =
      _lookup<ffi.NativeFunction<FPDF_PAGEOBJECT Function(FPDF_PAGEOBJECT, ffi.UnsignedLong)>>('FPDFFormObj_GetObject');
  late final _FPDFFormObj_GetObject =
      _FPDFFormObj_GetObjectPtr.asFunction<FPDF_PAGEOBJECT Function(FPDF_PAGEOBJECT, int)>();
}

abstract class FPDF_TEXT_RENDERMODE {
  static const int FPDF_TEXTRENDERMODE_UNKNOWN = -1;
  static const int FPDF_TEXTRENDERMODE_FILL = 0;
  static const int FPDF_TEXTRENDERMODE_STROKE = 1;
  static const int FPDF_TEXTRENDERMODE_FILL_STROKE = 2;
  static const int FPDF_TEXTRENDERMODE_INVISIBLE = 3;
  static const int FPDF_TEXTRENDERMODE_FILL_CLIP = 4;
  static const int FPDF_TEXTRENDERMODE_STROKE_CLIP = 5;
  static const int FPDF_TEXTRENDERMODE_FILL_STROKE_CLIP = 6;
  static const int FPDF_TEXTRENDERMODE_CLIP = 7;
  static const int FPDF_TEXTRENDERMODE_LAST = 7;
}

final class fpdf_action_t__ extends ffi.Opaque {}

final class fpdf_annotation_t__ extends ffi.Opaque {}

final class fpdf_attachment_t__ extends ffi.Opaque {}

final class fpdf_avail_t__ extends ffi.Opaque {}

final class fpdf_bitmap_t__ extends ffi.Opaque {}

final class fpdf_bookmark_t__ extends ffi.Opaque {}

final class fpdf_clippath_t__ extends ffi.Opaque {}

final class fpdf_dest_t__ extends ffi.Opaque {}

final class fpdf_document_t__ extends ffi.Opaque {}

final class fpdf_font_t__ extends ffi.Opaque {}

final class fpdf_form_handle_t__ extends ffi.Opaque {}

final class fpdf_glyphpath_t__ extends ffi.Opaque {}

final class fpdf_javascript_action_t extends ffi.Opaque {}

final class fpdf_link_t__ extends ffi.Opaque {}

final class fpdf_page_t__ extends ffi.Opaque {}

final class fpdf_pagelink_t__ extends ffi.Opaque {}

final class fpdf_pageobject_t__ extends ffi.Opaque {}

final class fpdf_pageobjectmark_t__ extends ffi.Opaque {}

final class fpdf_pagerange_t__ extends ffi.Opaque {}

final class fpdf_pathsegment_t extends ffi.Opaque {}

final class fpdf_schhandle_t__ extends ffi.Opaque {}

final class fpdf_signature_t__ extends ffi.Opaque {}

final class fpdf_structelement_t__ extends ffi.Opaque {}

final class fpdf_structelement_attr_t__ extends ffi.Opaque {}

final class fpdf_structelement_attr_value_t__ extends ffi.Opaque {}

final class fpdf_structtree_t__ extends ffi.Opaque {}

final class fpdf_textpage_t__ extends ffi.Opaque {}

final class fpdf_widget_t__ extends ffi.Opaque {}

final class fpdf_xobject_t__ extends ffi.Opaque {}

abstract class _FPDF_DUPLEXTYPE_ {
  static const int DuplexUndefined = 0;
  static const int Simplex = 1;
  static const int DuplexFlipShortEdge = 2;
  static const int DuplexFlipLongEdge = 3;
}

final class FPDF_BSTR_ extends ffi.Struct {
  external ffi.Pointer<ffi.Char> str;

  @ffi.Int()
  external int len;
}

final class _FS_MATRIX_ extends ffi.Struct {
  @ffi.Float()
  external double a;

  @ffi.Float()
  external double b;

  @ffi.Float()
  external double c;

  @ffi.Float()
  external double d;

  @ffi.Float()
  external double e;

  @ffi.Float()
  external double f;
}

final class _FS_RECTF_ extends ffi.Struct {
  @ffi.Float()
  external double left;

  @ffi.Float()
  external double top;

  @ffi.Float()
  external double right;

  @ffi.Float()
  external double bottom;
}

final class FS_SIZEF_ extends ffi.Struct {
  @ffi.Float()
  external double width;

  @ffi.Float()
  external double height;
}

final class FS_POINTF_ extends ffi.Struct {
  @ffi.Float()
  external double x;

  @ffi.Float()
  external double y;
}

final class _FS_QUADPOINTSF extends ffi.Struct {
  @FS_FLOAT()
  external double x1;

  @FS_FLOAT()
  external double y1;

  @FS_FLOAT()
  external double x2;

  @FS_FLOAT()
  external double y2;

  @FS_FLOAT()
  external double x3;

  @FS_FLOAT()
  external double y3;

  @FS_FLOAT()
  external double x4;

  @FS_FLOAT()
  external double y4;
}

typedef FS_FLOAT = ffi.Float;
typedef DartFS_FLOAT = double;

abstract class FPDF_RENDERER_TYPE {
  static const int FPDF_RENDERERTYPE_AGG = 0;
  static const int FPDF_RENDERERTYPE_SKIA = 1;
}

final class FPDF_LIBRARY_CONFIG_ extends ffi.Struct {
  @ffi.Int()
  external int version;

  external ffi.Pointer<ffi.Pointer<ffi.Char>> m_pUserFontPaths;

  external ffi.Pointer<ffi.Void> m_pIsolate;

  @ffi.UnsignedInt()
  external int m_v8EmbedderSlot;

  external ffi.Pointer<ffi.Void> m_pPlatform;

  @ffi.Int32()
  external int m_RendererType;
}

typedef FPDF_LIBRARY_CONFIG = FPDF_LIBRARY_CONFIG_;
typedef FPDF_DWORD = ffi.UnsignedLong;
typedef DartFPDF_DWORD = int;
typedef FPDF_BOOL = ffi.Int;
typedef DartFPDF_BOOL = int;
typedef FPDF_DOCUMENT = ffi.Pointer<fpdf_document_t__>;
typedef FPDF_STRING = ffi.Pointer<ffi.Char>;
typedef FPDF_BYTESTRING = ffi.Pointer<ffi.Char>;

final class FPDF_FILEACCESS extends ffi.Struct {
  @ffi.UnsignedLong()
  external int m_FileLen;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Int Function(ffi.Pointer<ffi.Void> param, ffi.UnsignedLong position, ffi.Pointer<ffi.UnsignedChar> pBuf,
              ffi.UnsignedLong size)>> m_GetBlock;

  external ffi.Pointer<ffi.Void> m_Param;
}

final class FPDF_FILEHANDLER_ extends ffi.Struct {
  external ffi.Pointer<ffi.Void> clientData;

  external ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void> clientData)>> Release;

  external ffi.Pointer<ffi.NativeFunction<FPDF_DWORD Function(ffi.Pointer<ffi.Void> clientData)>> GetSize;

  external ffi.Pointer<
          ffi.NativeFunction<
              FPDF_RESULT Function(
                  ffi.Pointer<ffi.Void> clientData, FPDF_DWORD offset, ffi.Pointer<ffi.Void> buffer, FPDF_DWORD size)>>
      ReadBlock;

  external ffi.Pointer<
          ffi.NativeFunction<
              FPDF_RESULT Function(
                  ffi.Pointer<ffi.Void> clientData, FPDF_DWORD offset, ffi.Pointer<ffi.Void> buffer, FPDF_DWORD size)>>
      WriteBlock;

  external ffi.Pointer<ffi.NativeFunction<FPDF_RESULT Function(ffi.Pointer<ffi.Void> clientData)>> Flush;

  external ffi.Pointer<ffi.NativeFunction<FPDF_RESULT Function(ffi.Pointer<ffi.Void> clientData, FPDF_DWORD size)>>
      Truncate;
}

typedef FPDF_RESULT = ffi.Int;
typedef DartFPDF_RESULT = int;
typedef FPDF_PAGE = ffi.Pointer<fpdf_page_t__>;
typedef FS_RECTF = _FS_RECTF_;
typedef FS_SIZEF = FS_SIZEF_;

final class FPDF_COLORSCHEME_ extends ffi.Struct {
  @FPDF_DWORD()
  external int path_fill_color;

  @FPDF_DWORD()
  external int path_stroke_color;

  @FPDF_DWORD()
  external int text_fill_color;

  @FPDF_DWORD()
  external int text_stroke_color;
}

typedef HDC = ffi.Pointer<HDC__>;

final class HDC__ extends ffi.Struct {
  @ffi.Int()
  external int unused;
}

typedef FPDF_BITMAP = ffi.Pointer<fpdf_bitmap_t__>;
typedef FS_MATRIX = _FS_MATRIX_;
typedef FPDF_PAGERANGE = ffi.Pointer<fpdf_pagerange_t__>;
typedef FPDF_DEST = ffi.Pointer<fpdf_dest_t__>;

final class _IPDF_JsPlatform extends ffi.Struct {
  @ffi.Int()
  external int version;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Int Function(ffi.Pointer<_IPDF_JsPlatform> pThis, FPDF_WIDESTRING Msg, FPDF_WIDESTRING Title,
              ffi.Int Type, ffi.Int Icon)>> app_alert;

  external ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<_IPDF_JsPlatform> pThis, ffi.Int nType)>>
      app_beep;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Int Function(
              ffi.Pointer<_IPDF_JsPlatform> pThis,
              FPDF_WIDESTRING Question,
              FPDF_WIDESTRING Title,
              FPDF_WIDESTRING Default,
              FPDF_WIDESTRING cLabel,
              FPDF_BOOL bPassword,
              ffi.Pointer<ffi.Void> response,
              ffi.Int length)>> app_response;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Int Function(ffi.Pointer<_IPDF_JsPlatform> pThis, ffi.Pointer<ffi.Void> filePath, ffi.Int length)>>
      Doc_getFilePath;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.Pointer<_IPDF_JsPlatform> pThis,
              ffi.Pointer<ffi.Void> mailData,
              ffi.Int length,
              FPDF_BOOL bUI,
              FPDF_WIDESTRING To,
              FPDF_WIDESTRING Subject,
              FPDF_WIDESTRING CC,
              FPDF_WIDESTRING BCC,
              FPDF_WIDESTRING Msg)>> Doc_mail;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.Pointer<_IPDF_JsPlatform> pThis,
              FPDF_BOOL bUI,
              ffi.Int nStart,
              ffi.Int nEnd,
              FPDF_BOOL bSilent,
              FPDF_BOOL bShrinkToFit,
              FPDF_BOOL bPrintAsImage,
              FPDF_BOOL bReverse,
              FPDF_BOOL bAnnotations)>> Doc_print;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<_IPDF_JsPlatform> pThis, ffi.Pointer<ffi.Void> formData, ffi.Int length,
              FPDF_WIDESTRING URL)>> Doc_submitForm;

  external ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<_IPDF_JsPlatform> pThis, ffi.Int nPageNum)>>
      Doc_gotoPage;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Int Function(ffi.Pointer<_IPDF_JsPlatform> pThis, ffi.Pointer<ffi.Void> filePath, ffi.Int length)>>
      Field_browse;

  external ffi.Pointer<ffi.Void> m_pFormfillinfo;

  external ffi.Pointer<ffi.Void> m_isolate;

  @ffi.UnsignedInt()
  external int m_v8EmbedderSlot;
}

typedef FPDF_WIDESTRING = ffi.Pointer<FPDF_WCHAR>;
typedef FPDF_WCHAR = ffi.UnsignedShort;
typedef DartFPDF_WCHAR = int;

final class _FPDF_SYSTEMTIME extends ffi.Struct {
  @ffi.UnsignedShort()
  external int wYear;

  @ffi.UnsignedShort()
  external int wMonth;

  @ffi.UnsignedShort()
  external int wDayOfWeek;

  @ffi.UnsignedShort()
  external int wDay;

  @ffi.UnsignedShort()
  external int wHour;

  @ffi.UnsignedShort()
  external int wMinute;

  @ffi.UnsignedShort()
  external int wSecond;

  @ffi.UnsignedShort()
  external int wMilliseconds;
}

final class _FPDF_FORMFILLINFO extends ffi.Struct {
  @ffi.Int()
  external int version;

  external ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis)>> Release;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_PAGE page, ffi.Double left, ffi.Double top,
              ffi.Double right, ffi.Double bottom)>> FFI_Invalidate;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_PAGE page, ffi.Double left, ffi.Double top,
              ffi.Double right, ffi.Double bottom)>> FFI_OutputSelectedRect;

  external ffi
      .Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, ffi.Int nCursorType)>>
      FFI_SetCursor;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Int Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, ffi.Int uElapse, TimerCallback lpTimerFunc)>>
      FFI_SetTimer;

  external ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, ffi.Int nTimerID)>>
      FFI_KillTimer;

  external ffi.Pointer<ffi.NativeFunction<FPDF_SYSTEMTIME Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis)>>
      FFI_GetLocalTime;

  external ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis)>> FFI_OnChange;

  external ffi.Pointer<
          ffi.NativeFunction<
              FPDF_PAGE Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_DOCUMENT document, ffi.Int nPageIndex)>>
      FFI_GetPage;

  external ffi
      .Pointer<ffi.NativeFunction<FPDF_PAGE Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_DOCUMENT document)>>
      FFI_GetCurrentPage;

  external ffi.Pointer<ffi.NativeFunction<ffi.Int Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_PAGE page)>>
      FFI_GetRotation;

  external ffi.Pointer<
          ffi.NativeFunction<ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_BYTESTRING namedAction)>>
      FFI_ExecuteNamedAction;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_WIDESTRING value, FPDF_DWORD valueLen,
              FPDF_BOOL is_focus)>> FFI_SetTextFieldFocus;

  external ffi
      .Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_BYTESTRING bsURI)>>
      FFI_DoURIAction;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, ffi.Int nPageIndex, ffi.Int zoomMode,
              ffi.Pointer<ffi.Float> fPosArray, ffi.Int sizeofArray)>> FFI_DoGoToAction;

  external ffi.Pointer<IPDF_JSPLATFORM> m_pJsPlatform;

  @FPDF_BOOL()
  external int xfa_disabled;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_PAGE page, FPDF_BOOL bVisible, ffi.Double left,
              ffi.Double top, ffi.Double right, ffi.Double bottom)>> FFI_DisplayCaret;

  external ffi
      .Pointer<ffi.NativeFunction<ffi.Int Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_DOCUMENT document)>>
      FFI_GetCurrentPageIndex;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_DOCUMENT document, ffi.Int iCurPage)>>
      FFI_SetCurrentPage;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_DOCUMENT document, FPDF_WIDESTRING wsURL)>>
      FFI_GotoURL;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.Pointer<_FPDF_FORMFILLINFO> pThis,
              FPDF_PAGE page,
              ffi.Pointer<ffi.Double> left,
              ffi.Pointer<ffi.Double> top,
              ffi.Pointer<ffi.Double> right,
              ffi.Pointer<ffi.Double> bottom)>> FFI_GetPageViewRect;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, ffi.Int page_count, FPDF_DWORD event_type)>>
      FFI_PageEvent;

  external ffi.Pointer<
      ffi.NativeFunction<
          FPDF_BOOL Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_PAGE page, FPDF_WIDGET hWidget,
              ffi.Int menuFlag, ffi.Float x, ffi.Float y)>> FFI_PopupMenu;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Pointer<FPDF_FILEHANDLER> Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, ffi.Int fileFlag,
              FPDF_WIDESTRING wsURL, ffi.Pointer<ffi.Char> mode)>> FFI_OpenFile;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.Pointer<_FPDF_FORMFILLINFO> pThis,
              ffi.Pointer<FPDF_FILEHANDLER> fileHandler,
              FPDF_WIDESTRING pTo,
              FPDF_WIDESTRING pSubject,
              FPDF_WIDESTRING pCC,
              FPDF_WIDESTRING pBcc,
              FPDF_WIDESTRING pMsg)>> FFI_EmailTo;

  external ffi.Pointer<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, ffi.Pointer<FPDF_FILEHANDLER> fileHandler,
              ffi.Int fileFlag, FPDF_WIDESTRING uploadTo)>> FFI_UploadTo;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Int Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, ffi.Pointer<ffi.Void> platform, ffi.Int length)>>
      FFI_GetPlatform;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Int Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, ffi.Pointer<ffi.Void> language, ffi.Int length)>>
      FFI_GetLanguage;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Pointer<FPDF_FILEHANDLER> Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_WIDESTRING URL)>>
      FFI_DownloadFromURL;

  external ffi.Pointer<
      ffi.NativeFunction<
          FPDF_BOOL Function(
              ffi.Pointer<_FPDF_FORMFILLINFO> pThis,
              FPDF_WIDESTRING wsURL,
              FPDF_WIDESTRING wsData,
              FPDF_WIDESTRING wsContentType,
              FPDF_WIDESTRING wsEncode,
              FPDF_WIDESTRING wsHeader,
              ffi.Pointer<FPDF_BSTR> response)>> FFI_PostRequestURL;

  external ffi.Pointer<
      ffi.NativeFunction<
          FPDF_BOOL Function(ffi.Pointer<_FPDF_FORMFILLINFO> pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData,
              FPDF_WIDESTRING wsEncode)>> FFI_PutRequestURL;

  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> param, FPDF_ANNOTATION annot, ffi.Int page_index)>>
      FFI_OnFocusChange;

  /// Method: FFI_DoURIActionWithKeyboardModifier
  /// Ask the implementation to navigate to a uniform resource identifier
  /// with the specified modifiers.
  /// Interface Version:
  /// Ignored if |version| < 2.
  /// Implementation Required:
  /// No
  /// Parameters:
  /// param           -   Pointer to the interface structure itself.
  /// uri             -   A byte string which indicates the uniform
  /// resource identifier, terminated by 0.
  /// modifiers       -   Keyboard modifier that indicates which of
  /// the virtual keys are down, if any.
  /// Return value:
  /// None.
  /// Comments:
  /// If the embedder who is version 2 and does not implement this API,
  /// then a call will be redirected to FFI_DoURIAction.
  /// See the URI actions description of <<PDF Reference, version 1.7>>
  /// for more details.
  external ffi.Pointer<
          ffi.NativeFunction<
              ffi.Void Function(ffi.Pointer<_FPDF_FORMFILLINFO> param, FPDF_BYTESTRING uri, ffi.Int modifiers)>>
      FFI_DoURIActionWithKeyboardModifier;
}

typedef TimerCallback = ffi.Pointer<ffi.NativeFunction<TimerCallbackFunction>>;
typedef TimerCallbackFunction = ffi.Void Function(ffi.Int idEvent);
typedef DartTimerCallbackFunction = void Function(int idEvent);
typedef FPDF_SYSTEMTIME = _FPDF_SYSTEMTIME;
typedef IPDF_JSPLATFORM = _IPDF_JsPlatform;
typedef FPDF_WIDGET = ffi.Pointer<fpdf_widget_t__>;
typedef FPDF_FILEHANDLER = FPDF_FILEHANDLER_;
typedef FPDF_BSTR = FPDF_BSTR_;
typedef FPDF_ANNOTATION = ffi.Pointer<fpdf_annotation_t__>;
typedef FPDF_FORMHANDLE = ffi.Pointer<fpdf_form_handle_t__>;
typedef FPDF_FORMFILLINFO = _FPDF_FORMFILLINFO;
typedef FS_POINTF = FS_POINTF_;

abstract class FPDFANNOT_COLORTYPE {
  static const int FPDFANNOT_COLORTYPE_Color = 0;
  static const int FPDFANNOT_COLORTYPE_InteriorColor = 1;
}

typedef FPDF_ANNOTATION_SUBTYPE = ffi.Int;
typedef DartFPDF_ANNOTATION_SUBTYPE = int;
typedef FPDF_PAGEOBJECT = ffi.Pointer<fpdf_pageobject_t__>;
typedef FS_QUADPOINTSF = _FS_QUADPOINTSF;
typedef FPDF_OBJECT_TYPE = ffi.Int;
typedef DartFPDF_OBJECT_TYPE = int;
typedef FPDF_ANNOT_APPEARANCEMODE = ffi.Int;
typedef DartFPDF_ANNOT_APPEARANCEMODE = int;
typedef FPDF_LINK = ffi.Pointer<fpdf_link_t__>;
typedef FPDF_ATTACHMENT = ffi.Pointer<fpdf_attachment_t__>;
typedef FPDF_TEXTPAGE = ffi.Pointer<fpdf_textpage_t__>;
typedef FPDF_SCHHANDLE = ffi.Pointer<fpdf_schhandle_t__>;
typedef FPDF_PAGELINK = ffi.Pointer<fpdf_pagelink_t__>;

abstract class FPDF_FILEIDTYPE {
  static const int FILEIDTYPE_PERMANENT = 0;
  static const int FILEIDTYPE_CHANGING = 1;
}

typedef FPDF_BOOKMARK = ffi.Pointer<fpdf_bookmark_t__>;
typedef FPDF_ACTION = ffi.Pointer<fpdf_action_t__>;

final class FPDF_IMAGEOBJ_METADATA extends ffi.Struct {
  @ffi.UnsignedInt()
  external int width;

  @ffi.UnsignedInt()
  external int height;

  @ffi.Float()
  external double horizontal_dpi;

  @ffi.Float()
  external double vertical_dpi;

  @ffi.UnsignedInt()
  external int bits_per_pixel;

  @ffi.Int()
  external int colorspace;

  @ffi.Int()
  external int marked_content_id;
}

typedef FPDF_PAGEOBJECTMARK = ffi.Pointer<fpdf_pageobjectmark_t__>;
typedef FPDF_PATHSEGMENT = ffi.Pointer<fpdf_pathsegment_t>;
typedef FPDF_FONT = ffi.Pointer<fpdf_font_t__>;
typedef FPDF_GLYPHPATH = ffi.Pointer<fpdf_glyphpath_t__>;

const int FPDF_OBJECT_UNKNOWN = 0;

const int FPDF_OBJECT_BOOLEAN = 1;

const int FPDF_OBJECT_NUMBER = 2;

const int FPDF_OBJECT_STRING = 3;

const int FPDF_OBJECT_NAME = 4;

const int FPDF_OBJECT_ARRAY = 5;

const int FPDF_OBJECT_DICTIONARY = 6;

const int FPDF_OBJECT_STREAM = 7;

const int FPDF_OBJECT_NULLOBJ = 8;

const int FPDF_OBJECT_REFERENCE = 9;

const int FPDF_POLICY_MACHINETIME_ACCESS = 0;

const int FPDF_ERR_SUCCESS = 0;

const int FPDF_ERR_UNKNOWN = 1;

const int FPDF_ERR_FILE = 2;

const int FPDF_ERR_FORMAT = 3;

const int FPDF_ERR_PASSWORD = 4;

const int FPDF_ERR_SECURITY = 5;

const int FPDF_ERR_PAGE = 6;

const int FPDF_ANNOT = 1;

const int FPDF_LCD_TEXT = 2;

const int FPDF_NO_NATIVETEXT = 4;

const int FPDF_GRAYSCALE = 8;

const int FPDF_DEBUG_INFO = 128;

const int FPDF_NO_CATCH = 256;

const int FPDF_RENDER_LIMITEDIMAGECACHE = 512;

const int FPDF_RENDER_FORCEHALFTONE = 1024;

const int FPDF_PRINTING = 2048;

const int FPDF_RENDER_NO_SMOOTHTEXT = 4096;

const int FPDF_RENDER_NO_SMOOTHIMAGE = 8192;

const int FPDF_RENDER_NO_SMOOTHPATH = 16384;

const int FPDF_REVERSE_BYTE_ORDER = 16;

const int FPDF_CONVERT_FILL_TO_STROKE = 32;

const int FPDFBitmap_Unknown = 0;

const int FPDFBitmap_Gray = 1;

const int FPDFBitmap_BGR = 2;

const int FPDFBitmap_BGRx = 3;

const int FPDFBitmap_BGRA = 4;

const int FORMTYPE_NONE = 0;

const int FORMTYPE_ACRO_FORM = 1;

const int FORMTYPE_XFA_FULL = 2;

const int FORMTYPE_XFA_FOREGROUND = 3;

const int FORMTYPE_COUNT = 4;

const int JSPLATFORM_ALERT_BUTTON_OK = 0;

const int JSPLATFORM_ALERT_BUTTON_OKCANCEL = 1;

const int JSPLATFORM_ALERT_BUTTON_YESNO = 2;

const int JSPLATFORM_ALERT_BUTTON_YESNOCANCEL = 3;

const int JSPLATFORM_ALERT_BUTTON_DEFAULT = 0;

const int JSPLATFORM_ALERT_ICON_ERROR = 0;

const int JSPLATFORM_ALERT_ICON_WARNING = 1;

const int JSPLATFORM_ALERT_ICON_QUESTION = 2;

const int JSPLATFORM_ALERT_ICON_STATUS = 3;

const int JSPLATFORM_ALERT_ICON_ASTERISK = 4;

const int JSPLATFORM_ALERT_ICON_DEFAULT = 0;

const int JSPLATFORM_ALERT_RETURN_OK = 1;

const int JSPLATFORM_ALERT_RETURN_CANCEL = 2;

const int JSPLATFORM_ALERT_RETURN_NO = 3;

const int JSPLATFORM_ALERT_RETURN_YES = 4;

const int JSPLATFORM_BEEP_ERROR = 0;

const int JSPLATFORM_BEEP_WARNING = 1;

const int JSPLATFORM_BEEP_QUESTION = 2;

const int JSPLATFORM_BEEP_STATUS = 3;

const int JSPLATFORM_BEEP_DEFAULT = 4;

const int FXCT_ARROW = 0;

const int FXCT_NESW = 1;

const int FXCT_NWSE = 2;

const int FXCT_VBEAM = 3;

const int FXCT_HBEAM = 4;

const int FXCT_HAND = 5;

const int FPDFDOC_AACTION_WC = 16;

const int FPDFDOC_AACTION_WS = 17;

const int FPDFDOC_AACTION_DS = 18;

const int FPDFDOC_AACTION_WP = 19;

const int FPDFDOC_AACTION_DP = 20;

const int FPDFPAGE_AACTION_OPEN = 0;

const int FPDFPAGE_AACTION_CLOSE = 1;

const int FPDF_FORMFIELD_UNKNOWN = 0;

const int FPDF_FORMFIELD_PUSHBUTTON = 1;

const int FPDF_FORMFIELD_CHECKBOX = 2;

const int FPDF_FORMFIELD_RADIOBUTTON = 3;

const int FPDF_FORMFIELD_COMBOBOX = 4;

const int FPDF_FORMFIELD_LISTBOX = 5;

const int FPDF_FORMFIELD_TEXTFIELD = 6;

const int FPDF_FORMFIELD_SIGNATURE = 7;

const int FPDF_FORMFIELD_COUNT = 8;

const int FPDF_ANNOT_UNKNOWN = 0;

const int FPDF_ANNOT_TEXT = 1;

const int FPDF_ANNOT_LINK = 2;

const int FPDF_ANNOT_FREETEXT = 3;

const int FPDF_ANNOT_LINE = 4;

const int FPDF_ANNOT_SQUARE = 5;

const int FPDF_ANNOT_CIRCLE = 6;

const int FPDF_ANNOT_POLYGON = 7;

const int FPDF_ANNOT_POLYLINE = 8;

const int FPDF_ANNOT_HIGHLIGHT = 9;

const int FPDF_ANNOT_UNDERLINE = 10;

const int FPDF_ANNOT_SQUIGGLY = 11;

const int FPDF_ANNOT_STRIKEOUT = 12;

const int FPDF_ANNOT_STAMP = 13;

const int FPDF_ANNOT_CARET = 14;

const int FPDF_ANNOT_INK = 15;

const int FPDF_ANNOT_POPUP = 16;

const int FPDF_ANNOT_FILEATTACHMENT = 17;

const int FPDF_ANNOT_SOUND = 18;

const int FPDF_ANNOT_MOVIE = 19;

const int FPDF_ANNOT_WIDGET = 20;

const int FPDF_ANNOT_SCREEN = 21;

const int FPDF_ANNOT_PRINTERMARK = 22;

const int FPDF_ANNOT_TRAPNET = 23;

const int FPDF_ANNOT_WATERMARK = 24;

const int FPDF_ANNOT_THREED = 25;

const int FPDF_ANNOT_RICHMEDIA = 26;

const int FPDF_ANNOT_XFAWIDGET = 27;

const int FPDF_ANNOT_REDACT = 28;

const int FPDF_ANNOT_FLAG_NONE = 0;

const int FPDF_ANNOT_FLAG_INVISIBLE = 1;

const int FPDF_ANNOT_FLAG_HIDDEN = 2;

const int FPDF_ANNOT_FLAG_PRINT = 4;

const int FPDF_ANNOT_FLAG_NOZOOM = 8;

const int FPDF_ANNOT_FLAG_NOROTATE = 16;

const int FPDF_ANNOT_FLAG_NOVIEW = 32;

const int FPDF_ANNOT_FLAG_READONLY = 64;

const int FPDF_ANNOT_FLAG_LOCKED = 128;

const int FPDF_ANNOT_FLAG_TOGGLENOVIEW = 256;

const int FPDF_ANNOT_APPEARANCEMODE_NORMAL = 0;

const int FPDF_ANNOT_APPEARANCEMODE_ROLLOVER = 1;

const int FPDF_ANNOT_APPEARANCEMODE_DOWN = 2;

const int FPDF_ANNOT_APPEARANCEMODE_COUNT = 3;

const int FPDF_FORMFLAG_NONE = 0;

const int FPDF_FORMFLAG_READONLY = 1;

const int FPDF_FORMFLAG_REQUIRED = 2;

const int FPDF_FORMFLAG_NOEXPORT = 4;

const int FPDF_FORMFLAG_TEXT_MULTILINE = 4096;

const int FPDF_FORMFLAG_TEXT_PASSWORD = 8192;

const int FPDF_FORMFLAG_CHOICE_COMBO = 131072;

const int FPDF_FORMFLAG_CHOICE_EDIT = 262144;

const int FPDF_FORMFLAG_CHOICE_MULTI_SELECT = 2097152;

const int FPDF_ANNOT_AACTION_KEY_STROKE = 12;

const int FPDF_ANNOT_AACTION_FORMAT = 13;

const int FPDF_ANNOT_AACTION_VALIDATE = 14;

const int FPDF_ANNOT_AACTION_CALCULATE = 15;

const int FPDF_MATCHCASE = 1;

const int FPDF_MATCHWHOLEWORD = 2;

const int FPDF_CONSECUTIVE = 4;

const int PDFACTION_UNSUPPORTED = 0;

const int PDFACTION_GOTO = 1;

const int PDFACTION_REMOTEGOTO = 2;

const int PDFACTION_URI = 3;

const int PDFACTION_LAUNCH = 4;

const int PDFACTION_EMBEDDEDGOTO = 5;

const int PDFDEST_VIEW_UNKNOWN_MODE = 0;

const int PDFDEST_VIEW_XYZ = 1;

const int PDFDEST_VIEW_FIT = 2;

const int PDFDEST_VIEW_FITH = 3;

const int PDFDEST_VIEW_FITV = 4;

const int PDFDEST_VIEW_FITR = 5;

const int PDFDEST_VIEW_FITB = 6;

const int PDFDEST_VIEW_FITBH = 7;

const int PDFDEST_VIEW_FITBV = 8;

const int FPDF_COLORSPACE_UNKNOWN = 0;

const int FPDF_COLORSPACE_DEVICEGRAY = 1;

const int FPDF_COLORSPACE_DEVICERGB = 2;

const int FPDF_COLORSPACE_DEVICECMYK = 3;

const int FPDF_COLORSPACE_CALGRAY = 4;

const int FPDF_COLORSPACE_CALRGB = 5;

const int FPDF_COLORSPACE_LAB = 6;

const int FPDF_COLORSPACE_ICCBASED = 7;

const int FPDF_COLORSPACE_SEPARATION = 8;

const int FPDF_COLORSPACE_DEVICEN = 9;

const int FPDF_COLORSPACE_INDEXED = 10;

const int FPDF_COLORSPACE_PATTERN = 11;

const int FPDF_PAGEOBJ_UNKNOWN = 0;

const int FPDF_PAGEOBJ_TEXT = 1;

const int FPDF_PAGEOBJ_PATH = 2;

const int FPDF_PAGEOBJ_IMAGE = 3;

const int FPDF_PAGEOBJ_SHADING = 4;

const int FPDF_PAGEOBJ_FORM = 5;

const int FPDF_SEGMENT_UNKNOWN = -1;

const int FPDF_SEGMENT_LINETO = 0;

const int FPDF_SEGMENT_BEZIERTO = 1;

const int FPDF_SEGMENT_MOVETO = 2;

const int FPDF_FILLMODE_NONE = 0;

const int FPDF_FILLMODE_ALTERNATE = 1;

const int FPDF_FILLMODE_WINDING = 2;

const int FPDF_FONT_TYPE1 = 1;

const int FPDF_FONT_TRUETYPE = 2;

const int FPDF_LINECAP_BUTT = 0;

const int FPDF_LINECAP_ROUND = 1;

const int FPDF_LINECAP_PROJECTING_SQUARE = 2;

const int FPDF_LINEJOIN_MITER = 0;

const int FPDF_LINEJOIN_ROUND = 1;

const int FPDF_LINEJOIN_BEVEL = 2;

const int FPDF_PRINTMODE_EMF = 0;

const int FPDF_PRINTMODE_TEXTONLY = 1;

const int FPDF_PRINTMODE_POSTSCRIPT2 = 2;

const int FPDF_PRINTMODE_POSTSCRIPT3 = 3;

const int FPDF_PRINTMODE_POSTSCRIPT2_PASSTHROUGH = 4;

const int FPDF_PRINTMODE_POSTSCRIPT3_PASSTHROUGH = 5;

const int FPDF_PRINTMODE_EMF_IMAGE_MASKS = 6;

const int FPDF_PRINTMODE_POSTSCRIPT3_TYPE42 = 7;

const int FPDF_PRINTMODE_POSTSCRIPT3_TYPE42_PASSTHROUGH = 8;
