signPdf method

Future<ApiResponse> signPdf(
  1. File file,
  2. SignPdfOptions options
)

Sign a PDF document

file PDF file to sign options Signing options

Implementation

Future<ApiResponse> signPdf(File file, SignPdfOptions options) async {
  return client.uploadFile(
    '/api/pdf/sign',
    'file',
    file,
    fields: {
      'elements': json.encode(
        options.elements.map((e) => e.toJson()).toList(),
      ),
      'pages': json.encode(options.pages.map((p) => p.toJson()).toList()),
      'performOcr': options.performOcr.toString(),
      'ocrLanguage': options.ocrLanguage,
    },
  );
}