UNPKG

@adobe/pdftools-extract-node-sdk

Version:

The Document Services PDF Tools Extract Node.js SDK provides APIs for extracting elements and renditions from PDF

32 lines (28 loc) 965 B
/* * Copyright 2019 Adobe * All Rights Reserved. * * NOTICE: Adobe permits you to use, modify, and distribute this file in * accordance with the terms of the Adobe license agreement accompanying * it. If you have received this file from a source other than Adobe, * then your use, modification, or distribution of it requires the prior * written permission of Adobe. */ class CpfContentAnalyzerRequests { constructor(engine,inputs,params,outputsInfo, outputsRendition){ this['cpf:engine'] = engine; let inputKey = 'documentIn'; if(Array.isArray(inputs)){ inputKey = 'documentsIn'; } this['cpf:inputs'] = {}; this['cpf:inputs'][inputKey] = inputs; this['cpf:inputs']['params'] = {}; this['cpf:inputs']['params']['cpf:inline'] = params; this['cpf:outputs'] = {'elementsInfo': outputsInfo, 'elementsRenditions': outputsRendition }; } setEngine(value){ this['cpf:engine'] = value; } } module.exports = CpfContentAnalyzerRequests;