pdf4me
Version:
Provides expert functionality to convert, optimize, compress, produce, merge, split, ocr, enrich, archive, print documents and PDFs.
36 lines (35 loc) • 873 B
JavaScript
module.exports = {
createClient: apiClient => {
const api = apiClient
return {
pdfA: pdfAReq => {
return new Promise((resolve, reject) => {
api
.postJson('/PdfA/PdfA', pdfAReq)
.then(res => {
resolve(res)
})
.catch(error => {
reject(error)
})
})
},
createPdfA: (pdfCompliance, file, integrationConfig = {}) => {
return new Promise((resolve, reject) => {
api
.postFormData('/PdfA/CreatePdfA', {
pdfCompliance,
file,
integrationConfig: JSON.stringify(integrationConfig),
})
.then(res => {
resolve(res)
})
.catch(error => {
reject(error)
})
})
},
}
},
}