UNPKG

pdf4me

Version:

Provides expert functionality to convert, optimize, compress, produce, merge, split, ocr, enrich, archive, print documents and PDFs.

40 lines (39 loc) 933 B
module.exports = { createClient: apiClient => { const api = apiClient return { validate: validateReq => { return new Promise((resolve, reject) => { api .postJson('/PdfA/Validate', validateReq) .then(res => { resolve(res) }) .catch(error => { reject(error) }) }) }, validateDocument: ( pdfCompliance, file, integrationConfig = {} ) => { return new Promise((resolve, reject) => { api .postFormData('/PdfA/ValidateDocument', { pdfCompliance, file, integrationConfig: JSON.stringify(integrationConfig), }) .then(res => { resolve(res) }) .catch(error => { reject(error) }) }) }, } }, }