UNPKG

@adobe/pdfservices-node-sdk

Version:

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

60 lines 2.04 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.SplitPDFParams = void 0; const ValidationUtil_1 = require("../../../internal/util/ValidationUtil"); /** * Parameters for splitting a PDF using {@link SplitPDFJob}. */ class SplitPDFParams { /** * Constructs a new `SplitPDFParams` instance. * * @param params - The parameters for constructing a `SplitPDFParams` instance. One of `pageRanges`, `pageCount` * or `fileCount` is required. * @param [params.pageRanges] - The page ranges to be used for splitting pages. * @param [params.pageCount] - The maximum number of pages each of the output files can have. * @param [params.fileCount] - The number of documents to split the input PDF file into. */ constructor(params) { ValidationUtil_1.ValidationUtil.validateSplitPDFParams(params); this._pageRanges = params.pageRanges; this._pageCount = params.pageCount; this._fileCount = params.fileCount; } /** * Returns the page ranges to be used for splitting pages. * * @returns The page ranges. */ get pageRanges() { return this._pageRanges; } /** * Returns the maximum number of pages each of the output files can have. * * @returns The page count. */ get pageCount() { return this._pageCount; } /** * Returns the number of documents to split the input PDF file into. * * @returns The file count. */ get fileCount() { return this._fileCount; } } exports.SplitPDFParams = SplitPDFParams; //# sourceMappingURL=SplitPDFParams.js.map