UNPKG

@adobe/pdfservices-node-sdk

Version:

The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.

82 lines 3.12 kB
"use strict"; /* * Copyright 2024 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ExtractPDFParams = void 0; const ValidationUtil_1 = require("../../../internal/util/ValidationUtil"); /** * Parameters for extract PDF operation using {@link ExtractPDFJob}. */ class ExtractPDFParams { /** * Construct a new `ExtractPDFParams` instance. * * @param params - The parameters for constructing an instance of `ExtractPDFParams`. * @param [params.tableStructureType] - The {@link TableStructureType} for output type of table structure. * Default value is {@link TableStructureType#XLSX XLSX}. * @param [params.addCharInfo] - Whether to add character level bounding boxes to output json. * Default value is `false`. * @param [params.getStylingInfo] - Whether to add styling information to output JSON. Default value is `false`. * @param [params.elementsToExtractRenditions] - List of elements whose renditions should be generated. * @param [params.elementsToExtract] - List of elements that should be extracted as JSON. * Default value is {@link ExtractElementType#TEXT TEXT}. */ constructor(params) { ValidationUtil_1.ValidationUtil.validateExtractPDFParams(params); this._tableStructureType = params.tableStructureType; this._addCharInfo = params.addCharInfo; this._getStylingInfo = params.getStylingInfo; this._elementsToExtractRenditions = params.elementsToExtractRenditions; this._elementsToExtract = params.elementsToExtract; } /** * Returns the table structure type. * * @returns the table structure type. */ get tableStructureType() { return this._tableStructureType; } /** * Returns `true` if character information is to be added to the resulting JSON. * * @returns `true` if character information is to be added to the resulting JSON. */ get addCharInfo() { return this._addCharInfo; } /** * Returns `true` if styling information is to be added to the resulting JSON. * * @returns `true` if styling information is to be added to the resulting JSON. */ get getStylingInfo() { return this._getStylingInfo; } /** * Returns the elements to extract renditions. * * @returns the elements to extract renditions. */ get elementsToExtractRenditions() { return this._elementsToExtractRenditions; } /** * Returns the elements to extract. * * @returns the elements to extract. */ get elementsToExtract() { return this._elementsToExtract; } } exports.ExtractPDFParams = ExtractPDFParams; //# sourceMappingURL=ExtractPDFParams.js.map