﻿ /**
 *
 * Copyright (c) 2026 Aspose.PDF Cloud
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

import { AnnotationFlags } from "../models/annotationFlags";
import { AnnotationState } from "../models/annotationState";
import { AnnotationType } from "../models/annotationType";
import { AntialiasingProcessingType } from "../models/antialiasingProcessingType";
import { AsposeResponse } from "../models/asposeResponse";
import { AttachmentInfo } from "../models/attachmentInfo";
import { Border } from "../models/border";
import { BorderCornerStyle } from "../models/borderCornerStyle";
import { BorderEffect } from "../models/borderEffect";
import { BorderInfo } from "../models/borderInfo";
import { BorderStyle } from "../models/borderStyle";
import { BoxStyle } from "../models/boxStyle";
import { CapStyle } from "../models/capStyle";
import { CaptionPosition } from "../models/captionPosition";
import { CaretSymbol } from "../models/caretSymbol";
import { Cell } from "../models/cell";
import { CellRecognized } from "../models/cellRecognized";
import { Color } from "../models/color";
import { ColorDepth } from "../models/colorDepth";
import { ColumnAdjustment } from "../models/columnAdjustment";
import { CompressionType } from "../models/compressionType";
import { CryptoAlgorithm } from "../models/cryptoAlgorithm";
import { Dash } from "../models/dash";
import { DefaultPageConfig } from "../models/defaultPageConfig";
import { Direction } from "../models/direction";
import { DiscUsage } from "../models/discUsage";
import { DocFormat } from "../models/docFormat";
import { DocMDPAccessPermissionType } from "../models/docMDPAccessPermissionType";
import { DocRecognitionMode } from "../models/docRecognitionMode";
import { DocumentConfig } from "../models/documentConfig";
import { DocumentLayers } from "../models/documentLayers";
import { DocumentPrivilege } from "../models/documentPrivilege";
import { EpubRecognitionMode } from "../models/epubRecognitionMode";
import { ErrorDetails } from "../models/errorDetails";
import { FieldType } from "../models/fieldType";
import { FileIcon } from "../models/fileIcon";
import { FileVersions } from "../models/fileVersions";
import { FilesList } from "../models/filesList";
import { FilesUploadResult } from "../models/filesUploadResult";
import { FontEncodingRules } from "../models/fontEncodingRules";
import { FontSavingModes } from "../models/fontSavingModes";
import { FontStyles } from "../models/fontStyles";
import { FreeTextIntent } from "../models/freeTextIntent";
import { GraphInfo } from "../models/graphInfo";
import { HorizontalAlignment } from "../models/horizontalAlignment";
import { HtmlDocumentType } from "../models/htmlDocumentType";
import { HtmlMarkupGenerationModes } from "../models/htmlMarkupGenerationModes";
import { ImageCompressionVersion } from "../models/imageCompressionVersion";
import { ImageEncoding } from "../models/imageEncoding";
import { ImageFragment } from "../models/imageFragment";
import { ImageSrcType } from "../models/imageSrcType";
import { ImageTemplate } from "../models/imageTemplate";
import { ImageTemplatesRequest } from "../models/imageTemplatesRequest";
import { Justification } from "../models/justification";
import { LayerInfo } from "../models/layerInfo";
import { LettersPositioningMethods } from "../models/lettersPositioningMethods";
import { LineEnding } from "../models/lineEnding";
import { LineIntent } from "../models/lineIntent";
import { LineSpacing } from "../models/lineSpacing";
import { Link } from "../models/link";
import { LinkActionType } from "../models/linkActionType";
import { LinkElement } from "../models/linkElement";
import { LinkHighlightingMode } from "../models/linkHighlightingMode";
import { MarginInfo } from "../models/marginInfo";
import { MergeDocuments } from "../models/mergeDocuments";
import { ModelError } from "../models/modelError";
import { ObjectExist } from "../models/objectExist";
import { OptimizeOptions } from "../models/optimizeOptions";
import { Option } from "../models/option";
import { OrganizeDocumentData } from "../models/organizeDocumentData";
import { OrganizeDocumentRequest } from "../models/organizeDocumentRequest";
import { OutputFormat } from "../models/outputFormat";
import { PageLayout } from "../models/pageLayout";
import { PageMode } from "../models/pageMode";
import { PageRange } from "../models/pageRange";
import { PageWordCount } from "../models/pageWordCount";
import { Paragraph } from "../models/paragraph";
import { PartsEmbeddingModes } from "../models/partsEmbeddingModes";
import { PdfAType } from "../models/pdfAType";
import { PermissionsFlags } from "../models/permissionsFlags";
import { Point } from "../models/point";
import { PolyIntent } from "../models/polyIntent";
import { Position } from "../models/position";
import { RasterImagesSavingModes } from "../models/rasterImagesSavingModes";
import { Rectangle } from "../models/rectangle";
import { Rotation } from "../models/rotation";
import { Row } from "../models/row";
import { RowRecognized } from "../models/rowRecognized";
import { Segment } from "../models/segment";
import { ShapeType } from "../models/shapeType";
import { Signature } from "../models/signature";
import { SignatureCustomAppearance } from "../models/signatureCustomAppearance";
import { SignatureSubjectNameElements } from "../models/signatureSubjectNameElements";
import { SignatureType } from "../models/signatureType";
import { SoundEncoding } from "../models/soundEncoding";
import { SoundIcon } from "../models/soundIcon";
import { SplitRangePdfOptions } from "../models/splitRangePdfOptions";
import { SplitResult } from "../models/splitResult";
import { Stamp } from "../models/stamp";
import { StampIcon } from "../models/stampIcon";
import { StampType } from "../models/stampType";
import { StorageExist } from "../models/storageExist";
import { StorageFile } from "../models/storageFile";
import { TableBroken } from "../models/tableBroken";
import { TextHorizontalAlignment } from "../models/textHorizontalAlignment";
import { TextIcon } from "../models/textIcon";
import { TextLine } from "../models/textLine";
import { TextRect } from "../models/textRect";
import { TextRects } from "../models/textRects";
import { TextReplace } from "../models/textReplace";
import { TextReplaceListRequest } from "../models/textReplaceListRequest";
import { TextState } from "../models/textState";
import { TextStyle } from "../models/textStyle";
import { TimestampSettings } from "../models/timestampSettings";
import { VerticalAlignment } from "../models/verticalAlignment";
import { WordCount } from "../models/wordCount";
import { WrapMode } from "../models/wrapMode";
import { XmpMetadata } from "../models/xmpMetadata";
import { XmpMetadataProperty } from "../models/xmpMetadataProperty";
import { Annotation } from "../models/annotation";
import { AnnotationsInfo } from "../models/annotationsInfo";
import { AnnotationsInfoResponse } from "../models/annotationsInfoResponse";
import { Attachment } from "../models/attachment";
import { AttachmentResponse } from "../models/attachmentResponse";
import { Attachments } from "../models/attachments";
import { AttachmentsResponse } from "../models/attachmentsResponse";
import { Bookmark } from "../models/bookmark";
import { BookmarkResponse } from "../models/bookmarkResponse";
import { Bookmarks } from "../models/bookmarks";
import { BookmarksResponse } from "../models/bookmarksResponse";
import { CaretAnnotationResponse } from "../models/caretAnnotationResponse";
import { CaretAnnotations } from "../models/caretAnnotations";
import { CaretAnnotationsResponse } from "../models/caretAnnotationsResponse";
import { CheckBoxFieldResponse } from "../models/checkBoxFieldResponse";
import { CheckBoxFields } from "../models/checkBoxFields";
import { CheckBoxFieldsResponse } from "../models/checkBoxFieldsResponse";
import { CircleAnnotationResponse } from "../models/circleAnnotationResponse";
import { CircleAnnotations } from "../models/circleAnnotations";
import { CircleAnnotationsResponse } from "../models/circleAnnotationsResponse";
import { ComboBoxFieldResponse } from "../models/comboBoxFieldResponse";
import { ComboBoxFields } from "../models/comboBoxFields";
import { ComboBoxFieldsResponse } from "../models/comboBoxFieldsResponse";
import { DisplayProperties } from "../models/displayProperties";
import { DisplayPropertiesResponse } from "../models/displayPropertiesResponse";
import { Document } from "../models/document";
import { DocumentPageResponse } from "../models/documentPageResponse";
import { DocumentPagesResponse } from "../models/documentPagesResponse";
import { DocumentProperties } from "../models/documentProperties";
import { DocumentPropertiesResponse } from "../models/documentPropertiesResponse";
import { DocumentProperty } from "../models/documentProperty";
import { DocumentPropertyResponse } from "../models/documentPropertyResponse";
import { DocumentResponse } from "../models/documentResponse";
import { Field } from "../models/field";
import { FieldResponse } from "../models/fieldResponse";
import { Fields } from "../models/fields";
import { FieldsResponse } from "../models/fieldsResponse";
import { FileAttachmentAnnotationResponse } from "../models/fileAttachmentAnnotationResponse";
import { FileAttachmentAnnotations } from "../models/fileAttachmentAnnotations";
import { FileAttachmentAnnotationsResponse } from "../models/fileAttachmentAnnotationsResponse";
import { FileVersion } from "../models/fileVersion";
import { FormField } from "../models/formField";
import { FreeTextAnnotationResponse } from "../models/freeTextAnnotationResponse";
import { FreeTextAnnotations } from "../models/freeTextAnnotations";
import { FreeTextAnnotationsResponse } from "../models/freeTextAnnotationsResponse";
import { HighlightAnnotationResponse } from "../models/highlightAnnotationResponse";
import { HighlightAnnotations } from "../models/highlightAnnotations";
import { HighlightAnnotationsResponse } from "../models/highlightAnnotationsResponse";
import { Image } from "../models/image";
import { ImageResponse } from "../models/imageResponse";
import { Images } from "../models/images";
import { ImagesResponse } from "../models/imagesResponse";
import { InkAnnotationResponse } from "../models/inkAnnotationResponse";
import { InkAnnotations } from "../models/inkAnnotations";
import { InkAnnotationsResponse } from "../models/inkAnnotationsResponse";
import { LineAnnotationResponse } from "../models/lineAnnotationResponse";
import { LineAnnotations } from "../models/lineAnnotations";
import { LineAnnotationsResponse } from "../models/lineAnnotationsResponse";
import { LinkAnnotation } from "../models/linkAnnotation";
import { LinkAnnotationResponse } from "../models/linkAnnotationResponse";
import { LinkAnnotations } from "../models/linkAnnotations";
import { LinkAnnotationsResponse } from "../models/linkAnnotationsResponse";
import { ListBoxFieldResponse } from "../models/listBoxFieldResponse";
import { ListBoxFields } from "../models/listBoxFields";
import { ListBoxFieldsResponse } from "../models/listBoxFieldsResponse";
import { MovieAnnotationResponse } from "../models/movieAnnotationResponse";
import { MovieAnnotations } from "../models/movieAnnotations";
import { MovieAnnotationsResponse } from "../models/movieAnnotationsResponse";
import { Page } from "../models/page";
import { Pages } from "../models/pages";
import { PolyLineAnnotationResponse } from "../models/polyLineAnnotationResponse";
import { PolyLineAnnotations } from "../models/polyLineAnnotations";
import { PolyLineAnnotationsResponse } from "../models/polyLineAnnotationsResponse";
import { PolygonAnnotationResponse } from "../models/polygonAnnotationResponse";
import { PolygonAnnotations } from "../models/polygonAnnotations";
import { PolygonAnnotationsResponse } from "../models/polygonAnnotationsResponse";
import { PopupAnnotationResponse } from "../models/popupAnnotationResponse";
import { PopupAnnotations } from "../models/popupAnnotations";
import { PopupAnnotationsResponse } from "../models/popupAnnotationsResponse";
import { RadioButtonFieldResponse } from "../models/radioButtonFieldResponse";
import { RadioButtonFields } from "../models/radioButtonFields";
import { RadioButtonFieldsResponse } from "../models/radioButtonFieldsResponse";
import { RedactionAnnotationResponse } from "../models/redactionAnnotationResponse";
import { RedactionAnnotations } from "../models/redactionAnnotations";
import { RedactionAnnotationsResponse } from "../models/redactionAnnotationsResponse";
import { ScreenAnnotationResponse } from "../models/screenAnnotationResponse";
import { ScreenAnnotations } from "../models/screenAnnotations";
import { ScreenAnnotationsResponse } from "../models/screenAnnotationsResponse";
import { SignatureFieldResponse } from "../models/signatureFieldResponse";
import { SignatureFields } from "../models/signatureFields";
import { SignatureFieldsResponse } from "../models/signatureFieldsResponse";
import { SignatureVerifyResponse } from "../models/signatureVerifyResponse";
import { SoundAnnotationResponse } from "../models/soundAnnotationResponse";
import { SoundAnnotations } from "../models/soundAnnotations";
import { SoundAnnotationsResponse } from "../models/soundAnnotationsResponse";
import { SplitResultDocument } from "../models/splitResultDocument";
import { SplitResultResponse } from "../models/splitResultResponse";
import { SquareAnnotationResponse } from "../models/squareAnnotationResponse";
import { SquareAnnotations } from "../models/squareAnnotations";
import { SquareAnnotationsResponse } from "../models/squareAnnotationsResponse";
import { SquigglyAnnotationResponse } from "../models/squigglyAnnotationResponse";
import { SquigglyAnnotations } from "../models/squigglyAnnotations";
import { SquigglyAnnotationsResponse } from "../models/squigglyAnnotationsResponse";
import { StampAnnotationResponse } from "../models/stampAnnotationResponse";
import { StampAnnotations } from "../models/stampAnnotations";
import { StampAnnotationsResponse } from "../models/stampAnnotationsResponse";
import { StampBase } from "../models/stampBase";
import { StampInfo } from "../models/stampInfo";
import { StampsInfo } from "../models/stampsInfo";
import { StampsInfoResponse } from "../models/stampsInfoResponse";
import { StrikeOutAnnotationResponse } from "../models/strikeOutAnnotationResponse";
import { StrikeOutAnnotations } from "../models/strikeOutAnnotations";
import { StrikeOutAnnotationsResponse } from "../models/strikeOutAnnotationsResponse";
import { SvgImages } from "../models/svgImages";
import { Table } from "../models/table";
import { TableRecognized } from "../models/tableRecognized";
import { TableRecognizedResponse } from "../models/tableRecognizedResponse";
import { TablesRecognized } from "../models/tablesRecognized";
import { TablesRecognizedResponse } from "../models/tablesRecognizedResponse";
import { TextAnnotationResponse } from "../models/textAnnotationResponse";
import { TextAnnotations } from "../models/textAnnotations";
import { TextAnnotationsResponse } from "../models/textAnnotationsResponse";
import { TextBoxFieldResponse } from "../models/textBoxFieldResponse";
import { TextBoxFields } from "../models/textBoxFields";
import { TextBoxFieldsResponse } from "../models/textBoxFieldsResponse";
import { TextRectsResponse } from "../models/textRectsResponse";
import { TextReplaceResponse } from "../models/textReplaceResponse";
import { UnderlineAnnotationResponse } from "../models/underlineAnnotationResponse";
import { UnderlineAnnotations } from "../models/underlineAnnotations";
import { UnderlineAnnotationsResponse } from "../models/underlineAnnotationsResponse";
import { WordCountResponse } from "../models/wordCountResponse";
import { AnnotationInfo } from "../models/annotationInfo";
import { CheckBoxField } from "../models/checkBoxField";
import { ChoiceField } from "../models/choiceField";
import { ImageFooter } from "../models/imageFooter";
import { ImageHeader } from "../models/imageHeader";
import { ImageStamp } from "../models/imageStamp";
import { MarkupAnnotation } from "../models/markupAnnotation";
import { MovieAnnotation } from "../models/movieAnnotation";
import { PageNumberStamp } from "../models/pageNumberStamp";
import { PdfPageStamp } from "../models/pdfPageStamp";
import { PopupAnnotation } from "../models/popupAnnotation";
import { RadioButtonOptionField } from "../models/radioButtonOptionField";
import { RedactionAnnotation } from "../models/redactionAnnotation";
import { ScreenAnnotation } from "../models/screenAnnotation";
import { SignatureField } from "../models/signatureField";
import { TextBoxField } from "../models/textBoxField";
import { TextFooter } from "../models/textFooter";
import { TextHeader } from "../models/textHeader";
import { TextStamp } from "../models/textStamp";
import { CaretAnnotation } from "../models/caretAnnotation";
import { ComboBoxField } from "../models/comboBoxField";
import { CommonFigureAnnotation } from "../models/commonFigureAnnotation";
import { FileAttachmentAnnotation } from "../models/fileAttachmentAnnotation";
import { FreeTextAnnotation } from "../models/freeTextAnnotation";
import { HighlightAnnotation } from "../models/highlightAnnotation";
import { ImageStampPageSpecified } from "../models/imageStampPageSpecified";
import { InkAnnotation } from "../models/inkAnnotation";
import { LineAnnotation } from "../models/lineAnnotation";
import { ListBoxField } from "../models/listBoxField";
import { PolyAnnotation } from "../models/polyAnnotation";
import { PopupAnnotationWithParent } from "../models/popupAnnotationWithParent";
import { RadioButtonField } from "../models/radioButtonField";
import { SoundAnnotation } from "../models/soundAnnotation";
import { SquigglyAnnotation } from "../models/squigglyAnnotation";
import { StampAnnotation } from "../models/stampAnnotation";
import { StrikeOutAnnotation } from "../models/strikeOutAnnotation";
import { TextAnnotation } from "../models/textAnnotation";
import { TextStampPageSpecified } from "../models/textStampPageSpecified";
import { UnderlineAnnotation } from "../models/underlineAnnotation";
import { CircleAnnotation } from "../models/circleAnnotation";
import { PolyLineAnnotation } from "../models/polyLineAnnotation";
import { PolygonAnnotation } from "../models/polygonAnnotation";
import { SquareAnnotation } from "../models/squareAnnotation";

import { ObjectSerializer } from "../objectSerializer";
import { Configuration } from "../configuration";

import * as localVarRequest from 'request';
import * as http from 'http';
import { invokeApiMethod } from "../requestHelper";

let defaultBasePath = 'https://api.aspose.cloud/v3.0';




export class PdfApi {
    protected _basePath = defaultBasePath;
    protected defaultHeaders : any = {};
    protected _useQuerystring : boolean = false;

    /**
     * API configuration
     */
    public configuration: Configuration;
    
    /**
     * @param baseUrl SelfHost Base api Url.
     */
    constructor(baseUrl: string);

    /**
     * @param clientId Client Id.
     * @param clientSecret Client Secret.
     */
    constructor(clientId: string, clientSecret: string);

    constructor(...arr: string[]){
        if (arr.length === 1) {
            this.configuration = new Configuration(true, "", "", arr[0]);
        } else if (arr.length === 2) {
            this.configuration = new Configuration(false, arr[0], arr[1], defaultBasePath);
        } 
    }

    set useQuerystring(value: boolean) {
        this._useQuerystring = value;
    }

    set basePath(basePath: string) {
        this.configuration.baseUrl = basePath;
    }

    get basePath() {
        return this.configuration.baseUrl;
    }



    /**
     * 
     * @summary Copy file
     * @param srcPath Source file path e.g. &#39;/folder/file.ext&#39;
     * @param destPath Destination file path
     * @param srcStorageName Source storage name
     * @param destStorageName Destination storage name
     * @param versionId File version ID to copy
     */
    public async copyFile (srcPath: string, destPath: string, srcStorageName?: string, destStorageName?: string, versionId?: string) : Promise<{ response: http.IncomingMessage; body?: any;  }> {
        const localVarPath = this.basePath + '/pdf/storage/file/copy/{srcPath}'
            .replace('{' + 'srcPath' + '}', encodeURIComponent(String(srcPath)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling copyFile.');
        }

        // verify required parameter 'destPath' is not null or undefined
        if (destPath === null || destPath === undefined) {
            throw new Error('Required parameter destPath was null or undefined when calling copyFile.');
        }

        if (destPath !== undefined && null !== destPath) {
            localVarQueryParameters['destPath'] = ObjectSerializer.serialize(destPath, "string");
        }

        if (srcStorageName !== undefined && null !== srcStorageName) {
            localVarQueryParameters['srcStorageName'] = ObjectSerializer.serialize(srcStorageName, "string");
        }

        if (destStorageName !== undefined && null !== destStorageName) {
            localVarQueryParameters['destStorageName'] = ObjectSerializer.serialize(destStorageName, "string");
        }

        if (versionId !== undefined && null !== versionId) {
            localVarQueryParameters['versionId'] = ObjectSerializer.serialize(versionId, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Copy folder
     * @param srcPath Source folder path e.g. &#39;/src&#39;
     * @param destPath Destination folder path e.g. &#39;/dst&#39;
     * @param srcStorageName Source storage name
     * @param destStorageName Destination storage name
     */
    public async copyFolder (srcPath: string, destPath: string, srcStorageName?: string, destStorageName?: string) : Promise<{ response: http.IncomingMessage; body?: any;  }> {
        const localVarPath = this.basePath + '/pdf/storage/folder/copy/{srcPath}'
            .replace('{' + 'srcPath' + '}', encodeURIComponent(String(srcPath)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling copyFolder.');
        }

        // verify required parameter 'destPath' is not null or undefined
        if (destPath === null || destPath === undefined) {
            throw new Error('Required parameter destPath was null or undefined when calling copyFolder.');
        }

        if (destPath !== undefined && null !== destPath) {
            localVarQueryParameters['destPath'] = ObjectSerializer.serialize(destPath, "string");
        }

        if (srcStorageName !== undefined && null !== srcStorageName) {
            localVarQueryParameters['srcStorageName'] = ObjectSerializer.serialize(srcStorageName, "string");
        }

        if (destStorageName !== undefined && null !== destStorageName) {
            localVarQueryParameters['destStorageName'] = ObjectSerializer.serialize(destStorageName, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Create the folder
     * @param path Folder path to create e.g. &#39;folder_1/folder_2/&#39;
     * @param storageName Storage name
     */
    public async createFolder (path: string, storageName?: string) : Promise<{ response: http.IncomingMessage; body?: any;  }> {
        const localVarPath = this.basePath + '/pdf/storage/folder/{path}'
            .replace('{' + 'path' + '}', encodeURIComponent(String(path)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'path' is not null or undefined
        if (path === null || path === undefined) {
            throw new Error('Required parameter path was null or undefined when calling createFolder.');
        }

        if (storageName !== undefined && null !== storageName) {
            localVarQueryParameters['storageName'] = ObjectSerializer.serialize(storageName, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete document annotation by ID
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deleteAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling deleteAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete document bookmark by ID.
     * @param name The document name.
     * @param bookmarkPath The bookmark path.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async deleteBookmark (name: string, bookmarkPath: string, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/bookmarks/bookmark/{bookmarkPath}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'bookmarkPath' + '}', encodeURIComponent(String(bookmarkPath)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteBookmark.');
        }

        // verify required parameter 'bookmarkPath' is not null or undefined
        if (bookmarkPath === null || bookmarkPath === undefined) {
            throw new Error('Required parameter bookmarkPath was null or undefined when calling deleteBookmark.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete all annotations from the document
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deleteDocumentAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteDocumentAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete all document bookmarks.
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async deleteDocumentBookmarks (name: string, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/bookmarks/tree'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteDocumentBookmarks.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Remove document layer.
     * @param name The document name.
     * @param pageNumber Layer page.
     * @param layerId Layer Id.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param passBase64 The password (Base64).
     */
    public async deleteDocumentLayer (name: string, pageNumber: number, layerId: string, folder?: string, storage?: string, passBase64?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/layers'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteDocumentLayer.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling deleteDocumentLayer.');
        }

        // verify required parameter 'layerId' is not null or undefined
        if (layerId === null || layerId === undefined) {
            throw new Error('Required parameter layerId was null or undefined when calling deleteDocumentLayer.');
        }

        if (pageNumber !== undefined && null !== pageNumber) {
            localVarQueryParameters['pageNumber'] = ObjectSerializer.serialize(pageNumber, "number");
        }

        if (layerId !== undefined && null !== layerId) {
            localVarQueryParameters['layerId'] = ObjectSerializer.serialize(layerId, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (passBase64 !== undefined && null !== passBase64) {
            localVarQueryParameters['passBase64'] = ObjectSerializer.serialize(passBase64, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete all link annotations from the document
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deleteDocumentLinkAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/links'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteDocumentLinkAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete all stamps from the document
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async deleteDocumentStamps (name: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/stamps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteDocumentStamps.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete all tables from the document
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deleteDocumentTables (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/tables'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteDocumentTables.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete document field by name.
     * @param name The document name.
     * @param fieldName The field name/
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deleteField (name: string, fieldName: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling deleteField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete file
     * @param path File path e.g. &#39;/folder/file.ext&#39;
     * @param storageName Storage name
     * @param versionId File version ID to delete
     */
    public async deleteFile (path: string, storageName?: string, versionId?: string) : Promise<{ response: http.IncomingMessage; body?: any;  }> {
        const localVarPath = this.basePath + '/pdf/storage/file/{path}'
            .replace('{' + 'path' + '}', encodeURIComponent(String(path)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'path' is not null or undefined
        if (path === null || path === undefined) {
            throw new Error('Required parameter path was null or undefined when calling deleteFile.');
        }

        if (storageName !== undefined && null !== storageName) {
            localVarQueryParameters['storageName'] = ObjectSerializer.serialize(storageName, "string");
        }

        if (versionId !== undefined && null !== versionId) {
            localVarQueryParameters['versionId'] = ObjectSerializer.serialize(versionId, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete folder
     * @param path Folder path e.g. &#39;/folder&#39;
     * @param storageName Storage name
     * @param recursive Enable to delete folders, subfolders and files
     */
    public async deleteFolder (path: string, storageName?: string, recursive?: boolean) : Promise<{ response: http.IncomingMessage; body?: any;  }> {
        const localVarPath = this.basePath + '/pdf/storage/folder/{path}'
            .replace('{' + 'path' + '}', encodeURIComponent(String(path)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'path' is not null or undefined
        if (path === null || path === undefined) {
            throw new Error('Required parameter path was null or undefined when calling deleteFolder.');
        }

        if (storageName !== undefined && null !== storageName) {
            localVarQueryParameters['storageName'] = ObjectSerializer.serialize(storageName, "string");
        }

        if (recursive !== undefined && null !== recursive) {
            localVarQueryParameters['recursive'] = ObjectSerializer.serialize(recursive, "boolean");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete image from document page.
     * @param name The document name.
     * @param imageId Image ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deleteImage (name: string, imageId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteImage.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling deleteImage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete document page link annotation by ID
     * @param name The document name.
     * @param linkId The link ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deleteLinkAnnotation (name: string, linkId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/links/{linkId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'linkId' + '}', encodeURIComponent(String(linkId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteLinkAnnotation.');
        }

        // verify required parameter 'linkId' is not null or undefined
        if (linkId === null || linkId === undefined) {
            throw new Error('Required parameter linkId was null or undefined when calling deleteLinkAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete document page by its number.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deletePage (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deletePage.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling deletePage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete all annotations from the page
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deletePageAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deletePageAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling deletePageAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete all link annotations from the page
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deletePageLinkAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/links'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deletePageLinkAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling deletePageLinkAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete all stamps from the page
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async deletePageStamps (name: string, pageNumber: number, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/stamps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deletePageStamps.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling deletePageStamps.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete all tables from the page
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deletePageTables (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/tables'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deletePageTables.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling deletePageTables.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete custom document properties.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password The password (Base64).
     */
    public async deleteProperties (name: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/documentproperties'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteProperties.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete document property.
     * @param name The document name.
     * @param propertyName Property name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password The password (Base64).
     */
    public async deleteProperty (name: string, propertyName: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/documentproperties/{propertyName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'propertyName' + '}', encodeURIComponent(String(propertyName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteProperty.');
        }

        // verify required parameter 'propertyName' is not null or undefined
        if (propertyName === null || propertyName === undefined) {
            throw new Error('Required parameter propertyName was null or undefined when calling deleteProperty.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete document stamp by ID
     * @param name The document name.
     * @param stampId The stamp ID.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async deleteStamp (name: string, stampId: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/stamps/{stampId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'stampId' + '}', encodeURIComponent(String(stampId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteStamp.');
        }

        // verify required parameter 'stampId' is not null or undefined
        if (stampId === null || stampId === undefined) {
            throw new Error('Required parameter stampId was null or undefined when calling deleteStamp.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Delete document table by ID
     * @param name The document name.
     * @param tableId The table ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async deleteTable (name: string, tableId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/tables/{tableId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'tableId' + '}', encodeURIComponent(String(tableId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling deleteTable.');
        }

        // verify required parameter 'tableId' is not null or undefined
        if (tableId === null || tableId === undefined) {
            throw new Error('Required parameter tableId was null or undefined when calling deleteTable.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'DELETE',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Download file
     * @param path File path e.g. &#39;/folder/file.ext&#39;
     * @param storageName Storage name
     * @param versionId File version ID to download
     */
    public async downloadFile (path: string, storageName?: string, versionId?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/storage/file/{path}'
            .replace('{' + 'path' + '}', encodeURIComponent(String(path)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'path' is not null or undefined
        if (path === null || path === undefined) {
            throw new Error('Required parameter path was null or undefined when calling downloadFile.');
        }

        if (storageName !== undefined && null !== storageName) {
            localVarQueryParameters['storageName'] = ObjectSerializer.serialize(storageName, "string");
        }

        if (versionId !== undefined && null !== versionId) {
            localVarQueryParameters['versionId'] = ObjectSerializer.serialize(versionId, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert APS file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.xps)
     * @param storage The document storage.
     */
    public async getApsInStorageToPdf (srcPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/aps';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getApsInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document bookmark.
     * @param name The document name.
     * @param bookmarkPath The bookmark path.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getBookmark (name: string, bookmarkPath: string, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: BookmarkResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/bookmarks/bookmark/{bookmarkPath}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'bookmarkPath' + '}', encodeURIComponent(String(bookmarkPath)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getBookmark.');
        }

        // verify required parameter 'bookmarkPath' is not null or undefined
        if (bookmarkPath === null || bookmarkPath === undefined) {
            throw new Error('Required parameter bookmarkPath was null or undefined when calling getBookmark.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "BookmarkResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document bookmarks node list.
     * @param name The document name.
     * @param bookmarkPath The bookmark path.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getBookmarks (name: string, bookmarkPath: string, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: BookmarksResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/bookmarks/list/{bookmarkPath}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'bookmarkPath' + '}', encodeURIComponent(String(bookmarkPath)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getBookmarks.');
        }

        // verify required parameter 'bookmarkPath' is not null or undefined
        if (bookmarkPath === null || bookmarkPath === undefined) {
            throw new Error('Required parameter bookmarkPath was null or undefined when calling getBookmarks.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "BookmarksResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page caret annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getCaretAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CaretAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/caret/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getCaretAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getCaretAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CaretAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document checkbox field by name.
     * @param name The document name.
     * @param fieldName The field name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getCheckBoxField (name: string, fieldName: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CheckBoxFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/checkbox/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getCheckBoxField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling getCheckBoxField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CheckBoxFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page circle annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getCircleAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CircleAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/circle/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getCircleAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getCircleAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CircleAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document combobox field by name.
     * @param name The document name.
     * @param fieldName The field name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getComboBoxField (name: string, fieldName: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ComboBoxFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/combobox/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getComboBoxField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling getComboBoxField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ComboBoxFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Get disc usage
     * @param storageName Storage name
     */
    public async getDiscUsage (storageName?: string) : Promise<{ response: http.IncomingMessage; body: DiscUsage;  }> {
        const localVarPath = this.basePath + '/pdf/storage/disc';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        if (storageName !== undefined && null !== storageName) {
            localVarQueryParameters['storageName'] = ObjectSerializer.serialize(storageName, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DiscUsage");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read common document info.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async getDocument (name: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: DocumentResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocument.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AnnotationsInfoResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AnnotationsInfoResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document attachment info by its index.
     * @param name The document name.
     * @param attachmentIndex The attachment index.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentAttachmentByIndex (name: string, attachmentIndex: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AttachmentResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/attachments/{attachmentIndex}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'attachmentIndex' + '}', encodeURIComponent(String(attachmentIndex)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentAttachmentByIndex.');
        }

        // verify required parameter 'attachmentIndex' is not null or undefined
        if (attachmentIndex === null || attachmentIndex === undefined) {
            throw new Error('Required parameter attachmentIndex was null or undefined when calling getDocumentAttachmentByIndex.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AttachmentResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document attachments info.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentAttachments (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AttachmentsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/attachments'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentAttachments.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AttachmentsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document bookmarks tree.
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getDocumentBookmarks (name: string, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: BookmarksResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/bookmarks/tree'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentBookmarks.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "BookmarksResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document caret annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentCaretAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CaretAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/caret'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentCaretAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CaretAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document checkbox fields.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentCheckBoxFields (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CheckBoxFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/checkbox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentCheckBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CheckBoxFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document circle annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentCircleAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CircleAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/circle'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentCircleAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CircleAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document combobox fields.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentComboBoxFields (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ComboBoxFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/combobox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentComboBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ComboBoxFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document display properties.
     * @param name 
     * @param storage 
     * @param folder 
     */
    public async getDocumentDisplayProperties (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: DisplayPropertiesResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/displayproperties'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentDisplayProperties.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DisplayPropertiesResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document FileAttachment annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentFileAttachmentAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FileAttachmentAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/fileattachment'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentFileAttachmentAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FileAttachmentAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document free text annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentFreeTextAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FreeTextAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/freetext'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentFreeTextAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FreeTextAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document highlight annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentHighlightAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: HighlightAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/highlight'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentHighlightAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "HighlightAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document ink annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentInkAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: InkAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/ink'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentInkAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "InkAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Gets document layers.
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param passBase64 The password (Base64).
     */
    public async getDocumentLayers (name: string, folder?: string, storage?: string, passBase64?: string) : Promise<{ response: http.IncomingMessage; body: DocumentLayers;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/layers'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentLayers.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (passBase64 !== undefined && null !== passBase64) {
            localVarQueryParameters['passBase64'] = ObjectSerializer.serialize(passBase64, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentLayers");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document line annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentLineAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: LineAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/line'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentLineAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "LineAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document listbox fields.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentListBoxFields (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ListBoxFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/listbox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentListBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ListBoxFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document movie annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentMovieAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: MovieAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/movie'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentMovieAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "MovieAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document polyline annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentPolyLineAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PolyLineAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/polyline'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentPolyLineAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PolyLineAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document polygon annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentPolygonAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PolygonAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/polygon'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentPolygonAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PolygonAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document popup annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentPopupAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PopupAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/popup'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentPopupAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PopupAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document popup annotations by parent id.
     * @param name The document name.
     * @param annotationId The parent annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentPopupAnnotationsByParent (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PopupAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/{annotationId}/popup'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentPopupAnnotationsByParent.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getDocumentPopupAnnotationsByParent.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PopupAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document properties.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password The password (Base64).
     */
    public async getDocumentProperties (name: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: DocumentPropertiesResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/documentproperties'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentProperties.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentPropertiesResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document property by name.
     * @param name The document name.
     * @param propertyName Property name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password The password (Base64).
     */
    public async getDocumentProperty (name: string, propertyName: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: DocumentPropertyResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/documentproperties/{propertyName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'propertyName' + '}', encodeURIComponent(String(propertyName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentProperty.');
        }

        // verify required parameter 'propertyName' is not null or undefined
        if (propertyName === null || propertyName === undefined) {
            throw new Error('Required parameter propertyName was null or undefined when calling getDocumentProperty.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentPropertyResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document radiobutton fields.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentRadioButtonFields (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: RadioButtonFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/radiobutton'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentRadioButtonFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "RadioButtonFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document redaction annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentRedactionAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: RedactionAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/redaction'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentRedactionAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "RedactionAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document screen annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentScreenAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ScreenAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/screen'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentScreenAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ScreenAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document signature fields.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentSignatureFields (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SignatureFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/signature'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentSignatureFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SignatureFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document sound annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentSoundAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SoundAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/sound'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentSoundAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SoundAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document square annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentSquareAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SquareAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/square'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentSquareAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SquareAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document squiggly annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentSquigglyAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SquigglyAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/squiggly'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentSquigglyAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SquigglyAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document stamp annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentStampAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: StampAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/stamp'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentStampAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StampAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document stamps.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentStamps (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: StampsInfoResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/stamps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentStamps.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StampsInfoResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document StrikeOut annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentStrikeOutAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: StrikeOutAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/strikeout'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentStrikeOutAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StrikeOutAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document tables.
     * @param name 
     * @param storage 
     * @param folder 
     */
    public async getDocumentTables (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TablesRecognizedResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/tables'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentTables.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TablesRecognizedResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document text annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentTextAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentTextAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document text box fields.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentTextBoxFields (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextBoxFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/textbox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentTextBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextBoxFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document underline annotations.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDocumentUnderlineAnnotations (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: UnderlineAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/underline'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDocumentUnderlineAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "UnderlineAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Download document attachment content by its index.
     * @param name The document name.
     * @param attachmentIndex The attachment index.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getDownloadDocumentAttachmentByIndex (name: string, attachmentIndex: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/attachments/{attachmentIndex}/download'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'attachmentIndex' + '}', encodeURIComponent(String(attachmentIndex)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getDownloadDocumentAttachmentByIndex.');
        }

        // verify required parameter 'attachmentIndex' is not null or undefined
        if (attachmentIndex === null || attachmentIndex === undefined) {
            throw new Error('Required parameter attachmentIndex was null or undefined when calling getDownloadDocumentAttachmentByIndex.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert EPUB file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.epub)
     * @param storage The document storage.
     */
    public async getEpubInStorageToPdf (srcPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/epub';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getEpubInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Export fields from from PDF in storage to FDF file.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getExportFieldsFromPdfToFdfInStorage (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/export/fdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getExportFieldsFromPdfToFdfInStorage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Export fields from from PDF in storage to XFDF file.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getExportFieldsFromPdfToXfdfInStorage (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/export/xfdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getExportFieldsFromPdfToXfdfInStorage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Export fields from from PDF in storage to XML file.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getExportFieldsFromPdfToXmlInStorage (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/export/xml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getExportFieldsFromPdfToXmlInStorage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Get document field by name.
     * @param name The document name.
     * @param fieldName The field name (name should be encoded).
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getField (name: string, fieldName: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling getField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Get document fields.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getFields (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page FileAttachment annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getFileAttachmentAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FileAttachmentAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/fileattachment/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getFileAttachmentAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getFileAttachmentAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FileAttachmentAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page FileAttachment annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getFileAttachmentAnnotationData (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/fileattachment/{annotationId}/data'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getFileAttachmentAnnotationData.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getFileAttachmentAnnotationData.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Get file versions
     * @param path File path e.g. &#39;/file.ext&#39;
     * @param storageName Storage name
     */
    public async getFileVersions (path: string, storageName?: string) : Promise<{ response: http.IncomingMessage; body: FileVersions;  }> {
        const localVarPath = this.basePath + '/pdf/storage/version/{path}'
            .replace('{' + 'path' + '}', encodeURIComponent(String(path)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'path' is not null or undefined
        if (path === null || path === undefined) {
            throw new Error('Required parameter path was null or undefined when calling getFileVersions.');
        }

        if (storageName !== undefined && null !== storageName) {
            localVarQueryParameters['storageName'] = ObjectSerializer.serialize(storageName, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FileVersions");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Get all files and folders within a folder
     * @param path Folder path e.g. &#39;/folder&#39;
     * @param storageName Storage name
     */
    public async getFilesList (path: string, storageName?: string) : Promise<{ response: http.IncomingMessage; body: FilesList;  }> {
        const localVarPath = this.basePath + '/pdf/storage/folder/{path}'
            .replace('{' + 'path' + '}', encodeURIComponent(String(path)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'path' is not null or undefined
        if (path === null || path === undefined) {
            throw new Error('Required parameter path was null or undefined when calling getFilesList.');
        }

        if (storageName !== undefined && null !== storageName) {
            localVarQueryParameters['storageName'] = ObjectSerializer.serialize(storageName, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FilesList");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page free text annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getFreeTextAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FreeTextAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/freetext/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getFreeTextAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getFreeTextAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FreeTextAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page highlight annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getHighlightAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: HighlightAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/highlight/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getHighlightAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getHighlightAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "HighlightAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert HTML file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.zip)
     * @param htmlFileName Name of HTML file in ZIP.
     * @param height Page height
     * @param width Page width
     * @param isLandscape Is page landscaped
     * @param marginLeft Page margin left
     * @param marginBottom Page margin bottom
     * @param marginRight Page margin right
     * @param marginTop Page margin top
     * @param storage The document storage.
     */
    public async getHtmlInStorageToPdf (srcPath: string, htmlFileName?: string, height?: number, width?: number, isLandscape?: boolean, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/html';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getHtmlInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (htmlFileName !== undefined && null !== htmlFileName) {
            localVarQueryParameters['htmlFileName'] = ObjectSerializer.serialize(htmlFileName, "string");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (isLandscape !== undefined && null !== isLandscape) {
            localVarQueryParameters['isLandscape'] = ObjectSerializer.serialize(isLandscape, "boolean");
        }

        if (marginLeft !== undefined && null !== marginLeft) {
            localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
        }

        if (marginBottom !== undefined && null !== marginBottom) {
            localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
        }

        if (marginRight !== undefined && null !== marginRight) {
            localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
        }

        if (marginTop !== undefined && null !== marginTop) {
            localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document image by ID.
     * @param name The document name.
     * @param imageId Image ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getImage (name: string, imageId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ImageResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImage.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling getImage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ImageResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document image in GIF format
     * @param name The document name.
     * @param imageId Image ID.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getImageExtractAsGif (name: string, imageId: string, width?: number, height?: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}/extract/gif'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImageExtractAsGif.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling getImageExtractAsGif.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document image in JPEG format
     * @param name The document name.
     * @param imageId Image ID.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getImageExtractAsJpeg (name: string, imageId: string, width?: number, height?: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}/extract/jpeg'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImageExtractAsJpeg.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling getImageExtractAsJpeg.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document image in PNG format
     * @param name The document name.
     * @param imageId Image ID.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getImageExtractAsPng (name: string, imageId: string, width?: number, height?: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}/extract/png'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImageExtractAsPng.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling getImageExtractAsPng.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document image in TIFF format
     * @param name The document name.
     * @param imageId Image ID.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getImageExtractAsTiff (name: string, imageId: string, width?: number, height?: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}/extract/tiff'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImageExtractAsTiff.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling getImageExtractAsTiff.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document images.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getImages (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ImagesResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/images'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImages.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getImages.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ImagesResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract SVG images from document page.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param passBase64 The password (Base64).
     */
    public async getImagesExtractSvg (name: string, pageNumber: number, storage?: string, folder?: string, passBase64?: string) : Promise<{ response: http.IncomingMessage; body: SvgImages;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/images/extract/svg'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImagesExtractSvg.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getImagesExtractSvg.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (passBase64 !== undefined && null !== passBase64) {
            localVarQueryParameters['passBase64'] = ObjectSerializer.serialize(passBase64, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SvgImages");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update fields from FDF file in storage.
     * @param name The document name.
     * @param fdfFilePath The Fdf file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getImportFieldsFromFdfInStorage (name: string, fdfFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/import/fdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImportFieldsFromFdfInStorage.');
        }

        // verify required parameter 'fdfFilePath' is not null or undefined
        if (fdfFilePath === null || fdfFilePath === undefined) {
            throw new Error('Required parameter fdfFilePath was null or undefined when calling getImportFieldsFromFdfInStorage.');
        }

        if (fdfFilePath !== undefined && null !== fdfFilePath) {
            localVarQueryParameters['fdfFilePath'] = ObjectSerializer.serialize(fdfFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update fields from XFDF file in storage.
     * @param name The document name.
     * @param xfdfFilePath The XFDF file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getImportFieldsFromXfdfInStorage (name: string, xfdfFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/import/xfdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImportFieldsFromXfdfInStorage.');
        }

        // verify required parameter 'xfdfFilePath' is not null or undefined
        if (xfdfFilePath === null || xfdfFilePath === undefined) {
            throw new Error('Required parameter xfdfFilePath was null or undefined when calling getImportFieldsFromXfdfInStorage.');
        }

        if (xfdfFilePath !== undefined && null !== xfdfFilePath) {
            localVarQueryParameters['xfdfFilePath'] = ObjectSerializer.serialize(xfdfFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Import from XML file (located on storage) to PDF format and return resulting file in response. 
     * @param name The document name.
     * @param xmlFilePath Full source filename (ex. /folder1/folder2/template.xml)
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getImportFieldsFromXmlInStorage (name: string, xmlFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/import/xml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getImportFieldsFromXmlInStorage.');
        }

        // verify required parameter 'xmlFilePath' is not null or undefined
        if (xmlFilePath === null || xmlFilePath === undefined) {
            throw new Error('Required parameter xmlFilePath was null or undefined when calling getImportFieldsFromXmlInStorage.');
        }

        if (xmlFilePath !== undefined && null !== xmlFilePath) {
            localVarQueryParameters['xmlFilePath'] = ObjectSerializer.serialize(xmlFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page ink annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getInkAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: InkAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/ink/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getInkAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getInkAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "InkAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page line annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getLineAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: LineAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/line/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getLineAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getLineAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "LineAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document link annotation by ID.
     * @param name The document name.
     * @param linkId The link ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getLinkAnnotation (name: string, linkId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: LinkAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/links/{linkId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'linkId' + '}', encodeURIComponent(String(linkId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getLinkAnnotation.');
        }

        // verify required parameter 'linkId' is not null or undefined
        if (linkId === null || linkId === undefined) {
            throw new Error('Required parameter linkId was null or undefined when calling getLinkAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "LinkAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document listbox field by name.
     * @param name The document name.
     * @param fieldName The field name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getListBoxField (name: string, fieldName: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ListBoxFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/listbox/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getListBoxField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling getListBoxField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ListBoxFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert MD file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.md)
     * @param storage The document storage.
     */
    public async getMarkdownInStorageToPdf (srcPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/markdown';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getMarkdownInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert MHT file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.mht)
     * @param height Page height
     * @param width Page width
     * @param marginLeft Page margin left
     * @param marginBottom Page margin bottom
     * @param marginRight Page margin right
     * @param marginTop Page margin top
     * @param storage The document storage.
     */
    public async getMhtInStorageToPdf (srcPath: string, height?: number, width?: number, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/mht';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getMhtInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (marginLeft !== undefined && null !== marginLeft) {
            localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
        }

        if (marginBottom !== undefined && null !== marginBottom) {
            localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
        }

        if (marginRight !== undefined && null !== marginRight) {
            localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
        }

        if (marginTop !== undefined && null !== marginTop) {
            localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page movie annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getMovieAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: MovieAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/movie/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getMovieAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getMovieAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "MovieAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page info.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPage (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: DocumentPageResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPage.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentPageResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AnnotationsInfoResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AnnotationsInfoResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page caret annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageCaretAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CaretAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/caret'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageCaretAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageCaretAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CaretAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page checkbox fields.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageCheckBoxFields (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CheckBoxFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/page/{pageNumber}/fields/checkbox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageCheckBoxFields.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageCheckBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CheckBoxFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page circle annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageCircleAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CircleAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/circle'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageCircleAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageCircleAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CircleAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page combobox fields.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageComboBoxFields (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ComboBoxFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/page/{pageNumber}/fields/combobox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageComboBoxFields.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageComboBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ComboBoxFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to Bmp image and return resulting file in response.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPageConvertToBmp (name: string, pageNumber: number, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/bmp'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageConvertToBmp.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageConvertToBmp.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to Emf image and return resulting file in response.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPageConvertToEmf (name: string, pageNumber: number, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/emf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageConvertToEmf.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageConvertToEmf.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to Gif image and return resulting file in response.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPageConvertToGif (name: string, pageNumber: number, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/gif'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageConvertToGif.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageConvertToGif.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to Jpeg image and return resulting file in response.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPageConvertToJpeg (name: string, pageNumber: number, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/jpeg'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageConvertToJpeg.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageConvertToJpeg.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to Png image and return resulting file in response.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPageConvertToPng (name: string, pageNumber: number, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/png'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageConvertToPng.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageConvertToPng.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to Tiff image  and return resulting file in response.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPageConvertToTiff (name: string, pageNumber: number, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/tiff'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageConvertToTiff.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageConvertToTiff.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page FileAttachment annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageFileAttachmentAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FileAttachmentAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/fileattachment'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageFileAttachmentAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageFileAttachmentAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FileAttachmentAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page free text annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageFreeTextAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FreeTextAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/freetext'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageFreeTextAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageFreeTextAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FreeTextAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page highlight annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageHighlightAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: HighlightAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/highlight'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageHighlightAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageHighlightAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "HighlightAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page ink annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageInkAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: InkAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/ink'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageInkAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageInkAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "InkAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page line annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageLineAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: LineAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/line'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageLineAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageLineAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "LineAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page link annotation by ID.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param linkId The link ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageLinkAnnotation (name: string, pageNumber: number, linkId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: LinkAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/links/{linkId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'))
            .replace('{' + 'linkId' + '}', encodeURIComponent(String(linkId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageLinkAnnotation.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageLinkAnnotation.');
        }

        // verify required parameter 'linkId' is not null or undefined
        if (linkId === null || linkId === undefined) {
            throw new Error('Required parameter linkId was null or undefined when calling getPageLinkAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "LinkAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page link annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageLinkAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: LinkAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/links'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageLinkAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageLinkAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "LinkAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page listbox fields.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageListBoxFields (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ListBoxFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/page/{pageNumber}/fields/listbox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageListBoxFields.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageListBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ListBoxFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page movie annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageMovieAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: MovieAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/movie'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageMovieAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageMovieAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "MovieAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page polyline annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPagePolyLineAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PolyLineAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/polyline'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPagePolyLineAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPagePolyLineAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PolyLineAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page polygon annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPagePolygonAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PolygonAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/polygon'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPagePolygonAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPagePolygonAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PolygonAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page popup annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPagePopupAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PopupAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/popup'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPagePopupAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPagePopupAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PopupAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page radiobutton fields.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageRadioButtonFields (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: RadioButtonFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/page/{pageNumber}/fields/radiobutton'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageRadioButtonFields.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageRadioButtonFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "RadioButtonFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page redaction annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageRedactionAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: RedactionAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/redaction'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageRedactionAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageRedactionAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "RedactionAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page screen annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageScreenAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ScreenAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/screen'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageScreenAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageScreenAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ScreenAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page signature fields.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageSignatureFields (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SignatureFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/page/{pageNumber}/fields/signature'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageSignatureFields.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageSignatureFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SignatureFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page sound annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageSoundAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SoundAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/sound'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageSoundAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageSoundAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SoundAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page square annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageSquareAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SquareAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/square'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageSquareAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageSquareAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SquareAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page squiggly annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageSquigglyAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SquigglyAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/squiggly'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageSquigglyAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageSquigglyAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SquigglyAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page stamp annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageStampAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: StampAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/stamp'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageStampAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageStampAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StampAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read page document stamps.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async getPageStamps (name: string, pageNumber: number, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: StampsInfoResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/stamps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageStamps.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageStamps.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StampsInfoResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page StrikeOut annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageStrikeOutAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: StrikeOutAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/strikeout'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageStrikeOutAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageStrikeOutAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StrikeOutAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page tables.
     * @param name 
     * @param pageNumber 
     * @param storage 
     * @param folder 
     */
    public async getPageTables (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TablesRecognizedResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/tables'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageTables.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageTables.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TablesRecognizedResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read page text items.
     * @param name The document name.
     * @param pageNumber Number of page (starting from 1).
     * @param LLX X-coordinate of lower - left corner.
     * @param LLY Y - coordinate of lower-left corner.
     * @param URX X - coordinate of upper-right corner.
     * @param URY Y - coordinate of upper-right corner.
     * @param format List of formats for search.
     * @param regex Formats are specified as a regular expression.
     * @param splitRects Split result fragments (default is true).
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getPageText (name: string, pageNumber: number, LLX: number, LLY: number, URX: number, URY: number, format?: Array<string>, regex?: string, splitRects?: boolean, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: TextRectsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageText.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageText.');
        }

        // verify required parameter 'LLX' is not null or undefined
        if (LLX === null || LLX === undefined) {
            throw new Error('Required parameter LLX was null or undefined when calling getPageText.');
        }

        // verify required parameter 'LLY' is not null or undefined
        if (LLY === null || LLY === undefined) {
            throw new Error('Required parameter LLY was null or undefined when calling getPageText.');
        }

        // verify required parameter 'URX' is not null or undefined
        if (URX === null || URX === undefined) {
            throw new Error('Required parameter URX was null or undefined when calling getPageText.');
        }

        // verify required parameter 'URY' is not null or undefined
        if (URY === null || URY === undefined) {
            throw new Error('Required parameter URY was null or undefined when calling getPageText.');
        }

        if (format !== undefined && null !== format) {
            localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "Array<string>");
        }

        if (regex !== undefined && null !== regex) {
            localVarQueryParameters['regex'] = ObjectSerializer.serialize(regex, "string");
        }

        if (splitRects !== undefined && null !== splitRects) {
            localVarQueryParameters['splitRects'] = ObjectSerializer.serialize(splitRects, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (LLX !== undefined && null !== LLX) {
            localVarQueryParameters['LLX'] = ObjectSerializer.serialize(LLX, "number");
        }

        if (LLY !== undefined && null !== LLY) {
            localVarQueryParameters['LLY'] = ObjectSerializer.serialize(LLY, "number");
        }

        if (URX !== undefined && null !== URX) {
            localVarQueryParameters['URX'] = ObjectSerializer.serialize(URX, "number");
        }

        if (URY !== undefined && null !== URY) {
            localVarQueryParameters['URY'] = ObjectSerializer.serialize(URY, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextRectsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page text annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageTextAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageTextAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageTextAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page text box fields.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageTextBoxFields (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextBoxFieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/page/{pageNumber}/fields/textbox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageTextBoxFields.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageTextBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextBoxFieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page underline annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPageUnderlineAnnotations (name: string, pageNumber: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: UnderlineAnnotationsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/underline'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPageUnderlineAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling getPageUnderlineAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "UnderlineAnnotationsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document pages info.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPages (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: DocumentPagesResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPages.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentPagesResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert PCL file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.pcl)
     * @param storage The document storage.
     */
    public async getPclInStorageToPdf (srcPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/pcl';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getPclInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert PDFA file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.pdf)
     * @param dontOptimize If set, document resources will not be optimized.
     * @param storage The document storage.
     */
    public async getPdfAInStorageToPdf (srcPath: string, dontOptimize?: boolean, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/pdfa';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getPdfAInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (dontOptimize !== undefined && null !== dontOptimize) {
            localVarQueryParameters['dontOptimize'] = ObjectSerializer.serialize(dontOptimize, "boolean");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to APS format and returns resulting file in response content
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getPdfInStorageToAps (name: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/aps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToAps.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to DOC format and returns resulting file in response content.
     * @param name The document name.
     * @param addReturnToLineEnd Add return to line end.
     * @param format Allows to specify .doc or .docx file format.
     * @param imageResolutionX Image resolution X.
     * @param imageResolutionY Image resolution Y.
     * @param maxDistanceBetweenTextLines Max distance between text lines.
     * @param mode Allows to control how a PDF document is converted into a word processing document.
     * @param recognizeBullets Recognize bullets.
     * @param relativeHorizontalProximity Relative horizontal proximity.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPdfInStorageToDoc (name: string, addReturnToLineEnd?: boolean, format?: string, imageResolutionX?: number, imageResolutionY?: number, maxDistanceBetweenTextLines?: number, mode?: string, recognizeBullets?: boolean, relativeHorizontalProximity?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/doc'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToDoc.');
        }

        if (addReturnToLineEnd !== undefined && null !== addReturnToLineEnd) {
            localVarQueryParameters['addReturnToLineEnd'] = ObjectSerializer.serialize(addReturnToLineEnd, "boolean");
        }

        if (format !== undefined && null !== format) {
            localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "string");
        }

        if (imageResolutionX !== undefined && null !== imageResolutionX) {
            localVarQueryParameters['imageResolutionX'] = ObjectSerializer.serialize(imageResolutionX, "number");
        }

        if (imageResolutionY !== undefined && null !== imageResolutionY) {
            localVarQueryParameters['imageResolutionY'] = ObjectSerializer.serialize(imageResolutionY, "number");
        }

        if (maxDistanceBetweenTextLines !== undefined && null !== maxDistanceBetweenTextLines) {
            localVarQueryParameters['maxDistanceBetweenTextLines'] = ObjectSerializer.serialize(maxDistanceBetweenTextLines, "number");
        }

        if (mode !== undefined && null !== mode) {
            localVarQueryParameters['mode'] = ObjectSerializer.serialize(mode, "string");
        }

        if (recognizeBullets !== undefined && null !== recognizeBullets) {
            localVarQueryParameters['recognizeBullets'] = ObjectSerializer.serialize(recognizeBullets, "boolean");
        }

        if (relativeHorizontalProximity !== undefined && null !== relativeHorizontalProximity) {
            localVarQueryParameters['relativeHorizontalProximity'] = ObjectSerializer.serialize(relativeHorizontalProximity, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to EPUB format and returns resulting file in response content
     * @param name The document name.
     * @param contentRecognitionMode Property tunes conversion for this or that desirable method of recognition of content.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getPdfInStorageToEpub (name: string, contentRecognitionMode?: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/epub'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToEpub.');
        }

        if (contentRecognitionMode !== undefined && null !== contentRecognitionMode) {
            localVarQueryParameters['contentRecognitionMode'] = ObjectSerializer.serialize(contentRecognitionMode, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to Html format and returns resulting file in response content
     * @param name The document name.
     * @param additionalMarginWidthInPoints Defines width of margin that will be forcibly left around that output HTML-areas.
     * @param compressSvgGraphicsIfAny The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving.
     * @param convertMarkedContentToLayers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with \&quot;data-pdflayer\&quot; attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content.
     * @param defaultFontName Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used.
     * @param documentType Result document type.
     * @param fixedLayout The value indicating whether that HTML is created as fixed layout.
     * @param imageResolution Resolution for image rendering.
     * @param minimalLineWidth This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers.
     * @param preventGlyphsGrouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true.
     * @param splitCssIntoPages When multipage-mode selected(i.e &#39;SplitIntoPages&#39; is &#39;true&#39;), then this attribute defines whether should be created separate CSS-file for each result HTML page.
     * @param splitIntoPages The flag that indicates whether each page of source document will be converted into it&#39;s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages.
     * @param useZOrder If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects.
     * @param antialiasingProcessing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML.
     * @param cssClassNamesPrefix When PDFtoHTML converter generates result CSSs, CSS class names (something like \&quot;.stl_01 {}\&quot; ... \&quot;.stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix.
     * @param explicitListOfSavedPages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1...[NumberOfPagesInConvertedDocument]) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF.
     * @param fontEncodingStrategy Defines encoding special rule to tune PDF decoding for current document.
     * @param fontSavingMode Defines font saving mode that will be used during saving of PDF to desirable format.
     * @param htmlMarkupGenerationMode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments.
     * @param lettersPositioningMethod The mode of positioning of letters in words in result HTML.
     * @param pagesFlowTypeDependsOnViewersScreenSize If attribute &#39;SplitOnPages&#x3D;false&#39;, than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer.
     * @param partsEmbeddingMode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities.
     * @param rasterImagesSavingMode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML.
     * @param removeEmptyAreasOnTopAndBottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any).
     * @param saveShadowedTextsAsTransparentTexts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard).
     * @param saveTransparentTexts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML.
     * @param specialFolderForAllImages The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file.
     * @param specialFolderForSvgImages The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file.
     * @param trySaveTextUnderliningAndStrikeoutingInCss PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param flowLayoutParagraphFullWidth This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false.
     */
    public async getPdfInStorageToHtml (name: string, additionalMarginWidthInPoints?: number, compressSvgGraphicsIfAny?: boolean, convertMarkedContentToLayers?: boolean, defaultFontName?: string, documentType?: string, fixedLayout?: boolean, imageResolution?: number, minimalLineWidth?: number, preventGlyphsGrouping?: boolean, splitCssIntoPages?: boolean, splitIntoPages?: boolean, useZOrder?: boolean, antialiasingProcessing?: string, cssClassNamesPrefix?: string, explicitListOfSavedPages?: Array<number>, fontEncodingStrategy?: string, fontSavingMode?: string, htmlMarkupGenerationMode?: string, lettersPositioningMethod?: string, pagesFlowTypeDependsOnViewersScreenSize?: boolean, partsEmbeddingMode?: string, rasterImagesSavingMode?: string, removeEmptyAreasOnTopAndBottom?: boolean, saveShadowedTextsAsTransparentTexts?: boolean, saveTransparentTexts?: boolean, specialFolderForAllImages?: string, specialFolderForSvgImages?: string, trySaveTextUnderliningAndStrikeoutingInCss?: boolean, folder?: string, storage?: string, flowLayoutParagraphFullWidth?: boolean) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/html'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToHtml.');
        }

        if (additionalMarginWidthInPoints !== undefined && null !== additionalMarginWidthInPoints) {
            localVarQueryParameters['additionalMarginWidthInPoints'] = ObjectSerializer.serialize(additionalMarginWidthInPoints, "number");
        }

        if (compressSvgGraphicsIfAny !== undefined && null !== compressSvgGraphicsIfAny) {
            localVarQueryParameters['compressSvgGraphicsIfAny'] = ObjectSerializer.serialize(compressSvgGraphicsIfAny, "boolean");
        }

        if (convertMarkedContentToLayers !== undefined && null !== convertMarkedContentToLayers) {
            localVarQueryParameters['convertMarkedContentToLayers'] = ObjectSerializer.serialize(convertMarkedContentToLayers, "boolean");
        }

        if (defaultFontName !== undefined && null !== defaultFontName) {
            localVarQueryParameters['defaultFontName'] = ObjectSerializer.serialize(defaultFontName, "string");
        }

        if (documentType !== undefined && null !== documentType) {
            localVarQueryParameters['documentType'] = ObjectSerializer.serialize(documentType, "string");
        }

        if (fixedLayout !== undefined && null !== fixedLayout) {
            localVarQueryParameters['fixedLayout'] = ObjectSerializer.serialize(fixedLayout, "boolean");
        }

        if (imageResolution !== undefined && null !== imageResolution) {
            localVarQueryParameters['imageResolution'] = ObjectSerializer.serialize(imageResolution, "number");
        }

        if (minimalLineWidth !== undefined && null !== minimalLineWidth) {
            localVarQueryParameters['minimalLineWidth'] = ObjectSerializer.serialize(minimalLineWidth, "number");
        }

        if (preventGlyphsGrouping !== undefined && null !== preventGlyphsGrouping) {
            localVarQueryParameters['preventGlyphsGrouping'] = ObjectSerializer.serialize(preventGlyphsGrouping, "boolean");
        }

        if (splitCssIntoPages !== undefined && null !== splitCssIntoPages) {
            localVarQueryParameters['splitCssIntoPages'] = ObjectSerializer.serialize(splitCssIntoPages, "boolean");
        }

        if (splitIntoPages !== undefined && null !== splitIntoPages) {
            localVarQueryParameters['splitIntoPages'] = ObjectSerializer.serialize(splitIntoPages, "boolean");
        }

        if (useZOrder !== undefined && null !== useZOrder) {
            localVarQueryParameters['useZOrder'] = ObjectSerializer.serialize(useZOrder, "boolean");
        }

        if (antialiasingProcessing !== undefined && null !== antialiasingProcessing) {
            localVarQueryParameters['antialiasingProcessing'] = ObjectSerializer.serialize(antialiasingProcessing, "string");
        }

        if (cssClassNamesPrefix !== undefined && null !== cssClassNamesPrefix) {
            localVarQueryParameters['cssClassNamesPrefix'] = ObjectSerializer.serialize(cssClassNamesPrefix, "string");
        }

        if (explicitListOfSavedPages !== undefined && null !== explicitListOfSavedPages) {
            localVarQueryParameters['explicitListOfSavedPages'] = ObjectSerializer.serialize(explicitListOfSavedPages, "Array<number>");
        }

        if (fontEncodingStrategy !== undefined && null !== fontEncodingStrategy) {
            localVarQueryParameters['fontEncodingStrategy'] = ObjectSerializer.serialize(fontEncodingStrategy, "string");
        }

        if (fontSavingMode !== undefined && null !== fontSavingMode) {
            localVarQueryParameters['fontSavingMode'] = ObjectSerializer.serialize(fontSavingMode, "string");
        }

        if (htmlMarkupGenerationMode !== undefined && null !== htmlMarkupGenerationMode) {
            localVarQueryParameters['htmlMarkupGenerationMode'] = ObjectSerializer.serialize(htmlMarkupGenerationMode, "string");
        }

        if (lettersPositioningMethod !== undefined && null !== lettersPositioningMethod) {
            localVarQueryParameters['lettersPositioningMethod'] = ObjectSerializer.serialize(lettersPositioningMethod, "string");
        }

        if (pagesFlowTypeDependsOnViewersScreenSize !== undefined && null !== pagesFlowTypeDependsOnViewersScreenSize) {
            localVarQueryParameters['pagesFlowTypeDependsOnViewersScreenSize'] = ObjectSerializer.serialize(pagesFlowTypeDependsOnViewersScreenSize, "boolean");
        }

        if (partsEmbeddingMode !== undefined && null !== partsEmbeddingMode) {
            localVarQueryParameters['partsEmbeddingMode'] = ObjectSerializer.serialize(partsEmbeddingMode, "string");
        }

        if (rasterImagesSavingMode !== undefined && null !== rasterImagesSavingMode) {
            localVarQueryParameters['rasterImagesSavingMode'] = ObjectSerializer.serialize(rasterImagesSavingMode, "string");
        }

        if (removeEmptyAreasOnTopAndBottom !== undefined && null !== removeEmptyAreasOnTopAndBottom) {
            localVarQueryParameters['removeEmptyAreasOnTopAndBottom'] = ObjectSerializer.serialize(removeEmptyAreasOnTopAndBottom, "boolean");
        }

        if (saveShadowedTextsAsTransparentTexts !== undefined && null !== saveShadowedTextsAsTransparentTexts) {
            localVarQueryParameters['saveShadowedTextsAsTransparentTexts'] = ObjectSerializer.serialize(saveShadowedTextsAsTransparentTexts, "boolean");
        }

        if (saveTransparentTexts !== undefined && null !== saveTransparentTexts) {
            localVarQueryParameters['saveTransparentTexts'] = ObjectSerializer.serialize(saveTransparentTexts, "boolean");
        }

        if (specialFolderForAllImages !== undefined && null !== specialFolderForAllImages) {
            localVarQueryParameters['specialFolderForAllImages'] = ObjectSerializer.serialize(specialFolderForAllImages, "string");
        }

        if (specialFolderForSvgImages !== undefined && null !== specialFolderForSvgImages) {
            localVarQueryParameters['specialFolderForSvgImages'] = ObjectSerializer.serialize(specialFolderForSvgImages, "string");
        }

        if (trySaveTextUnderliningAndStrikeoutingInCss !== undefined && null !== trySaveTextUnderliningAndStrikeoutingInCss) {
            localVarQueryParameters['trySaveTextUnderliningAndStrikeoutingInCss'] = ObjectSerializer.serialize(trySaveTextUnderliningAndStrikeoutingInCss, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (flowLayoutParagraphFullWidth !== undefined && null !== flowLayoutParagraphFullWidth) {
            localVarQueryParameters['flowLayoutParagraphFullWidth'] = ObjectSerializer.serialize(flowLayoutParagraphFullWidth, "boolean");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to MOBIXML format and returns resulting ZIP archive file in response content.
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getPdfInStorageToMobiXml (name: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/mobixml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToMobiXml.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to PdfA format and returns resulting file in response content
     * @param name The document name.
     * @param type Type of PdfA format.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPdfInStorageToPdfA (name: string, type: string, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/pdfa'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToPdfA.');
        }

        // verify required parameter 'type' is not null or undefined
        if (type === null || type === undefined) {
            throw new Error('Required parameter type was null or undefined when calling getPdfInStorageToPdfA.');
        }

        if (type !== undefined && null !== type) {
            localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to PPTX format and returns resulting file in response content
     * @param name The document name.
     * @param separateImages Separate images.
     * @param slidesAsImages Slides as images.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password Base64 encoded password.
     */
    public async getPdfInStorageToPptx (name: string, separateImages?: boolean, slidesAsImages?: boolean, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/pptx'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToPptx.');
        }

        if (separateImages !== undefined && null !== separateImages) {
            localVarQueryParameters['separateImages'] = ObjectSerializer.serialize(separateImages, "boolean");
        }

        if (slidesAsImages !== undefined && null !== slidesAsImages) {
            localVarQueryParameters['slidesAsImages'] = ObjectSerializer.serialize(slidesAsImages, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to SVG format and returns resulting file in response content
     * @param name The document name.
     * @param compressOutputToZipArchive Specifies whether output will be created as one zip-archive.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPdfInStorageToSvg (name: string, compressOutputToZipArchive?: boolean, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/svg'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToSvg.');
        }

        if (compressOutputToZipArchive !== undefined && null !== compressOutputToZipArchive) {
            localVarQueryParameters['compressOutputToZipArchive'] = ObjectSerializer.serialize(compressOutputToZipArchive, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to TeX format and returns resulting file in response content
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getPdfInStorageToTeX (name: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/tex'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToTeX.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to Text format and returns resulting file in response content
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getPdfInStorageToText (name: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToText.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to TIFF format and returns resulting file in response content
     * @param name The document name.
     * @param brightness Image brightness.
     * @param compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None.
     * @param colorDepth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp.
     * @param leftMargin Left image margin.
     * @param rightMargin Right image margin.
     * @param topMargin Top image margin.
     * @param bottomMargin Bottom image margin.
     * @param orientation Image orientation. Possible values are: None, Landscape, Portait.
     * @param skipBlankPages Skip blank pages flag.
     * @param width Image width.
     * @param height Image height.
     * @param xResolution Horizontal resolution.
     * @param yResolution Vertical resolution.
     * @param pageIndex Start page to export.
     * @param pageCount Number of pages to export.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getPdfInStorageToTiff (name: string, brightness?: number, compression?: string, colorDepth?: string, leftMargin?: number, rightMargin?: number, topMargin?: number, bottomMargin?: number, orientation?: string, skipBlankPages?: boolean, width?: number, height?: number, xResolution?: number, yResolution?: number, pageIndex?: number, pageCount?: number, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/tiff'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToTiff.');
        }

        if (brightness !== undefined && null !== brightness) {
            localVarQueryParameters['brightness'] = ObjectSerializer.serialize(brightness, "number");
        }

        if (compression !== undefined && null !== compression) {
            localVarQueryParameters['compression'] = ObjectSerializer.serialize(compression, "string");
        }

        if (colorDepth !== undefined && null !== colorDepth) {
            localVarQueryParameters['colorDepth'] = ObjectSerializer.serialize(colorDepth, "string");
        }

        if (leftMargin !== undefined && null !== leftMargin) {
            localVarQueryParameters['leftMargin'] = ObjectSerializer.serialize(leftMargin, "number");
        }

        if (rightMargin !== undefined && null !== rightMargin) {
            localVarQueryParameters['rightMargin'] = ObjectSerializer.serialize(rightMargin, "number");
        }

        if (topMargin !== undefined && null !== topMargin) {
            localVarQueryParameters['topMargin'] = ObjectSerializer.serialize(topMargin, "number");
        }

        if (bottomMargin !== undefined && null !== bottomMargin) {
            localVarQueryParameters['bottomMargin'] = ObjectSerializer.serialize(bottomMargin, "number");
        }

        if (orientation !== undefined && null !== orientation) {
            localVarQueryParameters['orientation'] = ObjectSerializer.serialize(orientation, "string");
        }

        if (skipBlankPages !== undefined && null !== skipBlankPages) {
            localVarQueryParameters['skipBlankPages'] = ObjectSerializer.serialize(skipBlankPages, "boolean");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (xResolution !== undefined && null !== xResolution) {
            localVarQueryParameters['xResolution'] = ObjectSerializer.serialize(xResolution, "number");
        }

        if (yResolution !== undefined && null !== yResolution) {
            localVarQueryParameters['yResolution'] = ObjectSerializer.serialize(yResolution, "number");
        }

        if (pageIndex !== undefined && null !== pageIndex) {
            localVarQueryParameters['pageIndex'] = ObjectSerializer.serialize(pageIndex, "number");
        }

        if (pageCount !== undefined && null !== pageCount) {
            localVarQueryParameters['pageCount'] = ObjectSerializer.serialize(pageCount, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to XLS format and returns resulting file in response content
     * @param name The document name.
     * @param insertBlankColumnAtFirst Insert blank column at first
     * @param minimizeTheNumberOfWorksheets Minimize the number of worksheets
     * @param scaleFactor Scale factor (Obsolete)
     * @param uniformWorksheets Uniform worksheets
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPdfInStorageToXls (name: string, insertBlankColumnAtFirst?: boolean, minimizeTheNumberOfWorksheets?: boolean, scaleFactor?: number, uniformWorksheets?: boolean, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xls'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToXls.');
        }

        if (insertBlankColumnAtFirst !== undefined && null !== insertBlankColumnAtFirst) {
            localVarQueryParameters['insertBlankColumnAtFirst'] = ObjectSerializer.serialize(insertBlankColumnAtFirst, "boolean");
        }

        if (minimizeTheNumberOfWorksheets !== undefined && null !== minimizeTheNumberOfWorksheets) {
            localVarQueryParameters['minimizeTheNumberOfWorksheets'] = ObjectSerializer.serialize(minimizeTheNumberOfWorksheets, "boolean");
        }

        if (scaleFactor !== undefined && null !== scaleFactor) {
            localVarQueryParameters['scaleFactor'] = ObjectSerializer.serialize(scaleFactor, "number");
        }

        if (uniformWorksheets !== undefined && null !== uniformWorksheets) {
            localVarQueryParameters['uniformWorksheets'] = ObjectSerializer.serialize(uniformWorksheets, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to XLSX format and returns resulting file in response content
     * @param name The document name.
     * @param insertBlankColumnAtFirst Insert blank column at first
     * @param minimizeTheNumberOfWorksheets Minimize the number of worksheets
     * @param scaleFactor Scale factor (Obsolete)
     * @param uniformWorksheets Uniform worksheets
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async getPdfInStorageToXlsx (name: string, insertBlankColumnAtFirst?: boolean, minimizeTheNumberOfWorksheets?: boolean, scaleFactor?: number, uniformWorksheets?: boolean, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xlsx'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToXlsx.');
        }

        if (insertBlankColumnAtFirst !== undefined && null !== insertBlankColumnAtFirst) {
            localVarQueryParameters['insertBlankColumnAtFirst'] = ObjectSerializer.serialize(insertBlankColumnAtFirst, "boolean");
        }

        if (minimizeTheNumberOfWorksheets !== undefined && null !== minimizeTheNumberOfWorksheets) {
            localVarQueryParameters['minimizeTheNumberOfWorksheets'] = ObjectSerializer.serialize(minimizeTheNumberOfWorksheets, "boolean");
        }

        if (scaleFactor !== undefined && null !== scaleFactor) {
            localVarQueryParameters['scaleFactor'] = ObjectSerializer.serialize(scaleFactor, "number");
        }

        if (uniformWorksheets !== undefined && null !== uniformWorksheets) {
            localVarQueryParameters['uniformWorksheets'] = ObjectSerializer.serialize(uniformWorksheets, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to XML format and returns resulting file in response content
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getPdfInStorageToXml (name: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToXml.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to XPS format and returns resulting file in response content
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getPdfInStorageToXps (name: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToXps.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page polyline annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPolyLineAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PolyLineAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/polyline/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPolyLineAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getPolyLineAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PolyLineAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page polygon annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPolygonAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PolygonAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/polygon/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPolygonAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getPolygonAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PolygonAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page popup annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getPopupAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PopupAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/popup/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getPopupAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getPopupAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PopupAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert PS file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.ps)
     * @param storage The document storage.
     */
    public async getPsInStorageToPdf (srcPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/ps';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getPsInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document RadioButton field by name.
     * @param name The document name.
     * @param fieldName The field name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getRadioButtonField (name: string, fieldName: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: RadioButtonFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/radiobutton/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getRadioButtonField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling getRadioButtonField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "RadioButtonFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page redaction annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getRedactionAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: RedactionAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/redaction/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getRedactionAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getRedactionAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "RedactionAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page screen annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getScreenAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ScreenAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/screen/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getScreenAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getScreenAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ScreenAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page screen annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getScreenAnnotationData (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/screen/{annotationId}/data'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getScreenAnnotationData.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getScreenAnnotationData.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document signature field by name.
     * @param name The document name.
     * @param fieldName The field name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getSignatureField (name: string, fieldName: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SignatureFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/signature/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getSignatureField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling getSignatureField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SignatureFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page sound annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getSoundAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SoundAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/sound/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getSoundAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getSoundAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SoundAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page sound annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getSoundAnnotationData (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/sound/{annotationId}/data'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getSoundAnnotationData.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getSoundAnnotationData.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page square annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getSquareAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SquareAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/square/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getSquareAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getSquareAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SquareAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page squiggly annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getSquigglyAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SquigglyAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/squiggly/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getSquigglyAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getSquigglyAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SquigglyAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page stamp annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getStampAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: StampAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/stamp/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getStampAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getStampAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StampAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page stamp annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getStampAnnotationData (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/stamp/{annotationId}/data'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getStampAnnotationData.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getStampAnnotationData.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page StrikeOut annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getStrikeOutAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: StrikeOutAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/strikeout/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getStrikeOutAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getStrikeOutAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StrikeOutAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert SVG file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.svg)
     * @param adjustPageSize Adjust page size
     * @param height Page height
     * @param width Page width
     * @param isLandscape Is page landscaped
     * @param marginLeft Page margin left
     * @param marginBottom Page margin bottom
     * @param marginRight Page margin right
     * @param marginTop Page margin top
     * @param storage The document storage.
     */
    public async getSvgInStorageToPdf (srcPath: string, adjustPageSize?: boolean, height?: number, width?: number, isLandscape?: boolean, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/svg';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getSvgInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (adjustPageSize !== undefined && null !== adjustPageSize) {
            localVarQueryParameters['adjustPageSize'] = ObjectSerializer.serialize(adjustPageSize, "boolean");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (isLandscape !== undefined && null !== isLandscape) {
            localVarQueryParameters['isLandscape'] = ObjectSerializer.serialize(isLandscape, "boolean");
        }

        if (marginLeft !== undefined && null !== marginLeft) {
            localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
        }

        if (marginBottom !== undefined && null !== marginBottom) {
            localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
        }

        if (marginRight !== undefined && null !== marginRight) {
            localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
        }

        if (marginTop !== undefined && null !== marginTop) {
            localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page table by ID.
     * @param name The document name.
     * @param tableId The table ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getTable (name: string, tableId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TableRecognizedResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/tables/{tableId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'tableId' + '}', encodeURIComponent(String(tableId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getTable.');
        }

        // verify required parameter 'tableId' is not null or undefined
        if (tableId === null || tableId === undefined) {
            throw new Error('Required parameter tableId was null or undefined when calling getTable.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TableRecognizedResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert TeX file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.tex)
     * @param storage The document storage.
     */
    public async getTeXInStorageToPdf (srcPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/tex';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getTeXInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document text.
     * @param name The document name.
     * @param LLX X-coordinate of lower - left corner.
     * @param LLY Y - coordinate of lower-left corner.
     * @param URX X - coordinate of upper-right corner.
     * @param URY Y - coordinate of upper-right corner.
     * @param format List of formats for search.
     * @param regex Formats are specified as a regular expression.
     * @param splitRects Split result fragments (default is true).
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getText (name: string, LLX: number, LLY: number, URX: number, URY: number, format?: Array<string>, regex?: string, splitRects?: boolean, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: TextRectsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getText.');
        }

        // verify required parameter 'LLX' is not null or undefined
        if (LLX === null || LLX === undefined) {
            throw new Error('Required parameter LLX was null or undefined when calling getText.');
        }

        // verify required parameter 'LLY' is not null or undefined
        if (LLY === null || LLY === undefined) {
            throw new Error('Required parameter LLY was null or undefined when calling getText.');
        }

        // verify required parameter 'URX' is not null or undefined
        if (URX === null || URX === undefined) {
            throw new Error('Required parameter URX was null or undefined when calling getText.');
        }

        // verify required parameter 'URY' is not null or undefined
        if (URY === null || URY === undefined) {
            throw new Error('Required parameter URY was null or undefined when calling getText.');
        }

        if (format !== undefined && null !== format) {
            localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "Array<string>");
        }

        if (regex !== undefined && null !== regex) {
            localVarQueryParameters['regex'] = ObjectSerializer.serialize(regex, "string");
        }

        if (splitRects !== undefined && null !== splitRects) {
            localVarQueryParameters['splitRects'] = ObjectSerializer.serialize(splitRects, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (LLX !== undefined && null !== LLX) {
            localVarQueryParameters['LLX'] = ObjectSerializer.serialize(LLX, "number");
        }

        if (LLY !== undefined && null !== LLY) {
            localVarQueryParameters['LLY'] = ObjectSerializer.serialize(LLY, "number");
        }

        if (URX !== undefined && null !== URX) {
            localVarQueryParameters['URX'] = ObjectSerializer.serialize(URX, "number");
        }

        if (URY !== undefined && null !== URY) {
            localVarQueryParameters['URY'] = ObjectSerializer.serialize(URY, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextRectsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page text annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getTextAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/text/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getTextAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getTextAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document text box field by name.
     * @param name The document name.
     * @param fieldName The field name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getTextBoxField (name: string, fieldName: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextBoxFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/textbox/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getTextBoxField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling getTextBoxField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextBoxFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Read document page underline annotation by ID.
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getUnderlineAnnotation (name: string, annotationId: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: UnderlineAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/underline/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getUnderlineAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling getUnderlineAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "UnderlineAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Verify signature document.
     * @param name The document name.
     * @param signName Sign name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getVerifySignature (name: string, signName: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SignatureVerifyResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/verifySignature'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getVerifySignature.');
        }

        // verify required parameter 'signName' is not null or undefined
        if (signName === null || signName === undefined) {
            throw new Error('Required parameter signName was null or undefined when calling getVerifySignature.');
        }

        if (signName !== undefined && null !== signName) {
            localVarQueryParameters['signName'] = ObjectSerializer.serialize(signName, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SignatureVerifyResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert web page to PDF format and return resulting file in response. 
     * @param url Source url
     * @param height Page height
     * @param width Page width
     * @param isLandscape Is page landscaped
     * @param marginLeft Page margin left
     * @param marginBottom Page margin bottom
     * @param marginRight Page margin right
     * @param marginTop Page margin top
     * @param storage The document storage.
     */
    public async getWebInStorageToPdf (url: string, height?: number, width?: number, isLandscape?: boolean, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/web';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'url' is not null or undefined
        if (url === null || url === undefined) {
            throw new Error('Required parameter url was null or undefined when calling getWebInStorageToPdf.');
        }

        if (url !== undefined && null !== url) {
            localVarQueryParameters['url'] = ObjectSerializer.serialize(url, "string");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (isLandscape !== undefined && null !== isLandscape) {
            localVarQueryParameters['isLandscape'] = ObjectSerializer.serialize(isLandscape, "boolean");
        }

        if (marginLeft !== undefined && null !== marginLeft) {
            localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
        }

        if (marginBottom !== undefined && null !== marginBottom) {
            localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
        }

        if (marginRight !== undefined && null !== marginRight) {
            localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
        }

        if (marginTop !== undefined && null !== marginTop) {
            localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Get number of words per document page.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async getWordsPerPage (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: WordCountResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/wordCount'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getWordsPerPage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "WordCountResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and returns resulting file response content
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async getXfaPdfInStorageToAcroForm (name: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xfatoacroform'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getXfaPdfInStorageToAcroForm.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert XML file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.xml)
     * @param xslFilePath Full XSL source filename (ex. /folder1/folder2/template.xsl)
     * @param storage The document storage.
     */
    public async getXmlInStorageToPdf (srcPath: string, xslFilePath?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/xml';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getXmlInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (xslFilePath !== undefined && null !== xslFilePath) {
            localVarQueryParameters['xslFilePath'] = ObjectSerializer.serialize(xslFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Gets document XMP Metadata as JSON.
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param passBase64 The password (Base64).
     */
    public async getXmpMetadataJson (name: string, folder?: string, storage?: string, passBase64?: string) : Promise<{ response: http.IncomingMessage; body: XmpMetadata;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/xmpmetadata/json'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getXmpMetadataJson.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (passBase64 !== undefined && null !== passBase64) {
            localVarQueryParameters['passBase64'] = ObjectSerializer.serialize(passBase64, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "XmpMetadata");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Gets document XMP Metadata as XML file.
     * @param name The document name.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param passBase64 The password (Base64).
     */
    public async getXmpMetadataXml (name: string, folder?: string, storage?: string, passBase64?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/xmpmetadata/xml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling getXmpMetadataXml.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (passBase64 !== undefined && null !== passBase64) {
            localVarQueryParameters['passBase64'] = ObjectSerializer.serialize(passBase64, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert XPS file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.xps)
     * @param storage The document storage.
     */
    public async getXpsInStorageToPdf (srcPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/xps';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getXpsInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert XslFo file (located on storage) to PDF format and return resulting file in response. 
     * @param srcPath Full source filename (ex. /folder1/folder2/template.xslfo)
     * @param storage The document storage.
     */
    public async getXslFoInStorageToPdf (srcPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/xslfo';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling getXslFoInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Move file
     * @param srcPath Source file path e.g. &#39;/src.ext&#39;
     * @param destPath Destination file path e.g. &#39;/dest.ext&#39;
     * @param srcStorageName Source storage name
     * @param destStorageName Destination storage name
     * @param versionId File version ID to move
     */
    public async moveFile (srcPath: string, destPath: string, srcStorageName?: string, destStorageName?: string, versionId?: string) : Promise<{ response: http.IncomingMessage; body?: any;  }> {
        const localVarPath = this.basePath + '/pdf/storage/file/move/{srcPath}'
            .replace('{' + 'srcPath' + '}', encodeURIComponent(String(srcPath)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling moveFile.');
        }

        // verify required parameter 'destPath' is not null or undefined
        if (destPath === null || destPath === undefined) {
            throw new Error('Required parameter destPath was null or undefined when calling moveFile.');
        }

        if (destPath !== undefined && null !== destPath) {
            localVarQueryParameters['destPath'] = ObjectSerializer.serialize(destPath, "string");
        }

        if (srcStorageName !== undefined && null !== srcStorageName) {
            localVarQueryParameters['srcStorageName'] = ObjectSerializer.serialize(srcStorageName, "string");
        }

        if (destStorageName !== undefined && null !== destStorageName) {
            localVarQueryParameters['destStorageName'] = ObjectSerializer.serialize(destStorageName, "string");
        }

        if (versionId !== undefined && null !== versionId) {
            localVarQueryParameters['versionId'] = ObjectSerializer.serialize(versionId, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Move folder
     * @param srcPath Folder path to move e.g. &#39;/folder&#39;
     * @param destPath Destination folder path to move to e.g &#39;/dst&#39;
     * @param srcStorageName Source storage name
     * @param destStorageName Destination storage name
     */
    public async moveFolder (srcPath: string, destPath: string, srcStorageName?: string, destStorageName?: string) : Promise<{ response: http.IncomingMessage; body?: any;  }> {
        const localVarPath = this.basePath + '/pdf/storage/folder/move/{srcPath}'
            .replace('{' + 'srcPath' + '}', encodeURIComponent(String(srcPath)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling moveFolder.');
        }

        // verify required parameter 'destPath' is not null or undefined
        if (destPath === null || destPath === undefined) {
            throw new Error('Required parameter destPath was null or undefined when calling moveFolder.');
        }

        if (destPath !== undefined && null !== destPath) {
            localVarQueryParameters['destPath'] = ObjectSerializer.serialize(destPath, "string");
        }

        if (srcStorageName !== undefined && null !== srcStorageName) {
            localVarQueryParameters['srcStorageName'] = ObjectSerializer.serialize(srcStorageName, "string");
        }

        if (destStorageName !== undefined && null !== destStorageName) {
            localVarQueryParameters['destStorageName'] = ObjectSerializer.serialize(destStorageName, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Check if file or folder exists
     * @param path File or folder path e.g. &#39;/file.ext&#39; or &#39;/folder&#39;
     * @param storageName Storage name
     * @param versionId File version ID
     */
    public async objectExists (path: string, storageName?: string, versionId?: string) : Promise<{ response: http.IncomingMessage; body: ObjectExist;  }> {
        const localVarPath = this.basePath + '/pdf/storage/exist/{path}'
            .replace('{' + 'path' + '}', encodeURIComponent(String(path)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'path' is not null or undefined
        if (path === null || path === undefined) {
            throw new Error('Required parameter path was null or undefined when calling objectExists.');
        }

        if (storageName !== undefined && null !== storageName) {
            localVarQueryParameters['storageName'] = ObjectSerializer.serialize(storageName, "string");
        }

        if (versionId !== undefined && null !== versionId) {
            localVarQueryParameters['versionId'] = ObjectSerializer.serialize(versionId, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ObjectExist");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Adds a file attachment to the PDF document.
     * @param name The document name.
     * @param attachmentInfo AttachmentInfoAttachmentInfo instance.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postAddDocumentAttachment (name: string, attachmentInfo: AttachmentInfo, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AttachmentsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/attachments'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postAddDocumentAttachment.');
        }

        // verify required parameter 'attachmentInfo' is not null or undefined
        if (attachmentInfo === null || attachmentInfo === undefined) {
            throw new Error('Required parameter attachmentInfo was null or undefined when calling postAddDocumentAttachment.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(attachmentInfo, "AttachmentInfo")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AttachmentsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Append document to existing one.
     * @param name The original document name.
     * @param appendFile Append file server path.
     * @param startPage Appending start page.
     * @param endPage Appending end page.
     * @param storage The documents storage.
     * @param folder The original document folder.
     */
    public async postAppendDocument (name: string, appendFile: string, startPage?: number, endPage?: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: DocumentResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/appendDocument'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postAppendDocument.');
        }

        // verify required parameter 'appendFile' is not null or undefined
        if (appendFile === null || appendFile === undefined) {
            throw new Error('Required parameter appendFile was null or undefined when calling postAppendDocument.');
        }

        if (appendFile !== undefined && null !== appendFile) {
            localVarQueryParameters['appendFile'] = ObjectSerializer.serialize(appendFile, "string");
        }

        if (startPage !== undefined && null !== startPage) {
            localVarQueryParameters['startPage'] = ObjectSerializer.serialize(startPage, "number");
        }

        if (endPage !== undefined && null !== endPage) {
            localVarQueryParameters['endPage'] = ObjectSerializer.serialize(endPage, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document bookmarks.
     * @param name The document name.
     * @param bookmarkPath The parent bookmark path. Specify an empty string when adding a bookmark to the root.
     * @param bookmarks The array of bookmark.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async postBookmark (name: string, bookmarkPath: string, bookmarks: Array<Bookmark>, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: BookmarksResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/bookmarks/bookmark/{bookmarkPath}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'bookmarkPath' + '}', encodeURIComponent(String(bookmarkPath)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postBookmark.');
        }

        // verify required parameter 'bookmarkPath' is not null or undefined
        if (bookmarkPath === null || bookmarkPath === undefined) {
            throw new Error('Required parameter bookmarkPath was null or undefined when calling postBookmark.');
        }

        // verify required parameter 'bookmarks' is not null or undefined
        if (bookmarks === null || bookmarks === undefined) {
            throw new Error('Required parameter bookmarks was null or undefined when calling postBookmark.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(bookmarks, "Array<Bookmark>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "BookmarksResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Change document password in storage.
     * @param name Document name.
     * @param ownerPassword Owner password (encrypted Base64).
     * @param newUserPassword New user password (encrypted Base64).
     * @param newOwnerPassword New owner password (encrypted Base64).
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postChangePasswordDocumentInStorage (name: string, ownerPassword: string, newUserPassword: string, newOwnerPassword: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/changepassword'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postChangePasswordDocumentInStorage.');
        }

        // verify required parameter 'ownerPassword' is not null or undefined
        if (ownerPassword === null || ownerPassword === undefined) {
            throw new Error('Required parameter ownerPassword was null or undefined when calling postChangePasswordDocumentInStorage.');
        }

        // verify required parameter 'newUserPassword' is not null or undefined
        if (newUserPassword === null || newUserPassword === undefined) {
            throw new Error('Required parameter newUserPassword was null or undefined when calling postChangePasswordDocumentInStorage.');
        }

        // verify required parameter 'newOwnerPassword' is not null or undefined
        if (newOwnerPassword === null || newOwnerPassword === undefined) {
            throw new Error('Required parameter newOwnerPassword was null or undefined when calling postChangePasswordDocumentInStorage.');
        }

        if (ownerPassword !== undefined && null !== ownerPassword) {
            localVarQueryParameters['ownerPassword'] = ObjectSerializer.serialize(ownerPassword, "string");
        }

        if (newUserPassword !== undefined && null !== newUserPassword) {
            localVarQueryParameters['newUserPassword'] = ObjectSerializer.serialize(newUserPassword, "string");
        }

        if (newOwnerPassword !== undefined && null !== newOwnerPassword) {
            localVarQueryParameters['newOwnerPassword'] = ObjectSerializer.serialize(newOwnerPassword, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document checkbox fields.
     * @param name The document name.
     * @param fields The array of field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postCheckBoxFields (name: string, fields: Array<CheckBoxField>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/checkbox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postCheckBoxFields.');
        }

        // verify required parameter 'fields' is not null or undefined
        if (fields === null || fields === undefined) {
            throw new Error('Required parameter fields was null or undefined when calling postCheckBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(fields, "Array<CheckBoxField>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document combobox fields.
     * @param name The document name.
     * @param fields The array of field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postComboBoxFields (name: string, fields: Array<ComboBoxField>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/combobox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postComboBoxFields.');
        }

        // verify required parameter 'fields' is not null or undefined
        if (fields === null || fields === undefined) {
            throw new Error('Required parameter fields was null or undefined when calling postComboBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(fields, "Array<ComboBoxField>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Compare two PDF documents.
     * @param path1 Path to first PDF document.
     * @param path2 Path to second PDF document.
     * @param outPath Full filename of the resulting document.
     * @param storage The documents storage.
     */
    public async postComparePdf (path1: string, path2: string, outPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/compare';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'path1' is not null or undefined
        if (path1 === null || path1 === undefined) {
            throw new Error('Required parameter path1 was null or undefined when calling postComparePdf.');
        }

        // verify required parameter 'path2' is not null or undefined
        if (path2 === null || path2 === undefined) {
            throw new Error('Required parameter path2 was null or undefined when calling postComparePdf.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling postComparePdf.');
        }

        if (path1 !== undefined && null !== path1) {
            localVarQueryParameters['path1'] = ObjectSerializer.serialize(path1, "string");
        }

        if (path2 !== undefined && null !== path2) {
            localVarQueryParameters['path2'] = ObjectSerializer.serialize(path2, "string");
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Create empty document.
     * @param name The new document name.
     * @param documentConfig The document config for new document.
     * @param storage The document storage.
     * @param folder The new document folder.
     */
    public async postCreateDocument (name: string, documentConfig: DocumentConfig, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: DocumentResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postCreateDocument.');
        }

        // verify required parameter 'documentConfig' is not null or undefined
        if (documentConfig === null || documentConfig === undefined) {
            throw new Error('Required parameter documentConfig was null or undefined when calling postCreateDocument.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(documentConfig, "DocumentConfig")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Create field.
     * @param name The document name.
     * @param page Document page number.
     * @param field Field with the field data.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postCreateField (name: string, page: number, field: Field, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postCreateField.');
        }

        // verify required parameter 'page' is not null or undefined
        if (page === null || page === undefined) {
            throw new Error('Required parameter page was null or undefined when calling postCreateField.');
        }

        // verify required parameter 'field' is not null or undefined
        if (field === null || field === undefined) {
            throw new Error('Required parameter field was null or undefined when calling postCreateField.');
        }

        if (page !== undefined && null !== page) {
            localVarQueryParameters['page'] = ObjectSerializer.serialize(page, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(field, "Field")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Decrypt document in storage.
     * @param name Document name.
     * @param password The password (encrypted Base64).
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postDecryptDocumentInStorage (name: string, password: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/decrypt'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDecryptDocumentInStorage.');
        }

        // verify required parameter 'password' is not null or undefined
        if (password === null || password === undefined) {
            throw new Error('Required parameter password was null or undefined when calling postDecryptDocumentInStorage.');
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document image footer.
     * @param name The document name.
     * @param imageFooter The image footer.
     * @param startPageNumber The start page number.
     * @param endPageNumber The end page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postDocumentImageFooter (name: string, imageFooter: ImageFooter, startPageNumber?: number, endPageNumber?: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/footer/image'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentImageFooter.');
        }

        // verify required parameter 'imageFooter' is not null or undefined
        if (imageFooter === null || imageFooter === undefined) {
            throw new Error('Required parameter imageFooter was null or undefined when calling postDocumentImageFooter.');
        }

        if (startPageNumber !== undefined && null !== startPageNumber) {
            localVarQueryParameters['startPageNumber'] = ObjectSerializer.serialize(startPageNumber, "number");
        }

        if (endPageNumber !== undefined && null !== endPageNumber) {
            localVarQueryParameters['endPageNumber'] = ObjectSerializer.serialize(endPageNumber, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(imageFooter, "ImageFooter")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document image header.
     * @param name The document name.
     * @param imageHeader The image header.
     * @param startPageNumber The start page number.
     * @param endPageNumber The end page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postDocumentImageHeader (name: string, imageHeader: ImageHeader, startPageNumber?: number, endPageNumber?: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/header/image'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentImageHeader.');
        }

        // verify required parameter 'imageHeader' is not null or undefined
        if (imageHeader === null || imageHeader === undefined) {
            throw new Error('Required parameter imageHeader was null or undefined when calling postDocumentImageHeader.');
        }

        if (startPageNumber !== undefined && null !== startPageNumber) {
            localVarQueryParameters['startPageNumber'] = ObjectSerializer.serialize(startPageNumber, "number");
        }

        if (endPageNumber !== undefined && null !== endPageNumber) {
            localVarQueryParameters['endPageNumber'] = ObjectSerializer.serialize(endPageNumber, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(imageHeader, "ImageHeader")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document pages image stamps.
     * @param name The document name.
     * @param stamps The array of stamp.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postDocumentImageStamps (name: string, stamps: Array<ImageStamp>, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/stamps/image'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentImageStamps.');
        }

        // verify required parameter 'stamps' is not null or undefined
        if (stamps === null || stamps === undefined) {
            throw new Error('Required parameter stamps was null or undefined when calling postDocumentImageStamps.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(stamps, "Array<ImageStamp>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document image stamps to specified pages.
     * @param name The document name.
     * @param stamps The array of stamps.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postDocumentImageStampsPageSpecified (name: string, stamps: Array<ImageStampPageSpecified>, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/stamps/image/pagespecified'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentImageStampsPageSpecified.');
        }

        // verify required parameter 'stamps' is not null or undefined
        if (stamps === null || stamps === undefined) {
            throw new Error('Required parameter stamps was null or undefined when calling postDocumentImageStampsPageSpecified.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(stamps, "Array<ImageStampPageSpecified>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page number stamps.
     * @param name The document name.
     * @param stamp The stamp.
     * @param startPageNumber The start page number.
     * @param endPageNumber The end page number.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postDocumentPageNumberStamps (name: string, stamp: PageNumberStamp, startPageNumber?: number, endPageNumber?: number, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/stamps/pagenumber'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentPageNumberStamps.');
        }

        // verify required parameter 'stamp' is not null or undefined
        if (stamp === null || stamp === undefined) {
            throw new Error('Required parameter stamp was null or undefined when calling postDocumentPageNumberStamps.');
        }

        if (startPageNumber !== undefined && null !== startPageNumber) {
            localVarQueryParameters['startPageNumber'] = ObjectSerializer.serialize(startPageNumber, "number");
        }

        if (endPageNumber !== undefined && null !== endPageNumber) {
            localVarQueryParameters['endPageNumber'] = ObjectSerializer.serialize(endPageNumber, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(stamp, "PageNumberStamp")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Crop PDF document pages.
     * @param name The document name.
     * @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
     * @param rect Rectangle of document area.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postDocumentPagesCrop (name: string, pages: string, rect: Rectangle, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/crop'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentPagesCrop.');
        }

        // verify required parameter 'pages' is not null or undefined
        if (pages === null || pages === undefined) {
            throw new Error('Required parameter pages was null or undefined when calling postDocumentPagesCrop.');
        }

        // verify required parameter 'rect' is not null or undefined
        if (rect === null || rect === undefined) {
            throw new Error('Required parameter rect was null or undefined when calling postDocumentPagesCrop.');
        }

        if (pages !== undefined && null !== pages) {
            localVarQueryParameters['pages'] = ObjectSerializer.serialize(pages, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(rect, "Rectangle")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Rsize PDF document.
     * @param name The document name.
     * @param height Page Height
     * @param width Page width
     * @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postDocumentPagesResize (name: string, height: number, width: number, pages: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/resize'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentPagesResize.');
        }

        // verify required parameter 'height' is not null or undefined
        if (height === null || height === undefined) {
            throw new Error('Required parameter height was null or undefined when calling postDocumentPagesResize.');
        }

        // verify required parameter 'width' is not null or undefined
        if (width === null || width === undefined) {
            throw new Error('Required parameter width was null or undefined when calling postDocumentPagesResize.');
        }

        // verify required parameter 'pages' is not null or undefined
        if (pages === null || pages === undefined) {
            throw new Error('Required parameter pages was null or undefined when calling postDocumentPagesResize.');
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (pages !== undefined && null !== pages) {
            localVarQueryParameters['pages'] = ObjectSerializer.serialize(pages, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Rotate PDF document.
     * @param name The document name.
     * @param rotationAngle Rotation Angle (CKW). Can be 90, 180, 270.
     * @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postDocumentPagesRotate (name: string, rotationAngle: string, pages: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/rotate'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentPagesRotate.');
        }

        // verify required parameter 'rotationAngle' is not null or undefined
        if (rotationAngle === null || rotationAngle === undefined) {
            throw new Error('Required parameter rotationAngle was null or undefined when calling postDocumentPagesRotate.');
        }

        // verify required parameter 'pages' is not null or undefined
        if (pages === null || pages === undefined) {
            throw new Error('Required parameter pages was null or undefined when calling postDocumentPagesRotate.');
        }

        if (rotationAngle !== undefined && null !== rotationAngle) {
            localVarQueryParameters['rotationAngle'] = ObjectSerializer.serialize(rotationAngle, "string");
        }

        if (pages !== undefined && null !== pages) {
            localVarQueryParameters['pages'] = ObjectSerializer.serialize(pages, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document text footer.
     * @param name The document name.
     * @param textFooter The text footer.
     * @param startPageNumber The start page number.
     * @param endPageNumber The end page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postDocumentTextFooter (name: string, textFooter: TextFooter, startPageNumber?: number, endPageNumber?: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/footer/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentTextFooter.');
        }

        // verify required parameter 'textFooter' is not null or undefined
        if (textFooter === null || textFooter === undefined) {
            throw new Error('Required parameter textFooter was null or undefined when calling postDocumentTextFooter.');
        }

        if (startPageNumber !== undefined && null !== startPageNumber) {
            localVarQueryParameters['startPageNumber'] = ObjectSerializer.serialize(startPageNumber, "number");
        }

        if (endPageNumber !== undefined && null !== endPageNumber) {
            localVarQueryParameters['endPageNumber'] = ObjectSerializer.serialize(endPageNumber, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(textFooter, "TextFooter")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document text header.
     * @param name The document name.
     * @param textHeader The text header.
     * @param startPageNumber The start page number.
     * @param endPageNumber The end page number.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postDocumentTextHeader (name: string, textHeader: TextHeader, startPageNumber?: number, endPageNumber?: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/header/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentTextHeader.');
        }

        // verify required parameter 'textHeader' is not null or undefined
        if (textHeader === null || textHeader === undefined) {
            throw new Error('Required parameter textHeader was null or undefined when calling postDocumentTextHeader.');
        }

        if (startPageNumber !== undefined && null !== startPageNumber) {
            localVarQueryParameters['startPageNumber'] = ObjectSerializer.serialize(startPageNumber, "number");
        }

        if (endPageNumber !== undefined && null !== endPageNumber) {
            localVarQueryParameters['endPageNumber'] = ObjectSerializer.serialize(endPageNumber, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(textHeader, "TextHeader")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Document's replace text method.
     * @param name 
     * @param textReplace 
     * @param storage 
     * @param folder 
     */
    public async postDocumentTextReplace (name: string, textReplace: TextReplaceListRequest, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextReplaceResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/text/replace'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentTextReplace.');
        }

        // verify required parameter 'textReplace' is not null or undefined
        if (textReplace === null || textReplace === undefined) {
            throw new Error('Required parameter textReplace was null or undefined when calling postDocumentTextReplace.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(textReplace, "TextReplaceListRequest")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextReplaceResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document pages text stamps.
     * @param name The document name.
     * @param stamps The array of stamp.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postDocumentTextStamps (name: string, stamps: Array<TextStamp>, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/stamps/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentTextStamps.');
        }

        // verify required parameter 'stamps' is not null or undefined
        if (stamps === null || stamps === undefined) {
            throw new Error('Required parameter stamps was null or undefined when calling postDocumentTextStamps.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(stamps, "Array<TextStamp>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document text stamps to specified pages.
     * @param name The document name.
     * @param stamps The array of stamps.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postDocumentTextStampsPageSpecified (name: string, stamps: Array<TextStampPageSpecified>, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/stamps/text/pagespecified'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postDocumentTextStampsPageSpecified.');
        }

        // verify required parameter 'stamps' is not null or undefined
        if (stamps === null || stamps === undefined) {
            throw new Error('Required parameter stamps was null or undefined when calling postDocumentTextStampsPageSpecified.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(stamps, "Array<TextStampPageSpecified>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Encrypt document in storage.
     * @param name Document name.
     * @param userPassword User password (encrypted Base64).
     * @param ownerPassword Owner password (encrypted Base64).
     * @param cryptoAlgorithm Cryptographic algorithm, see CryptoAlgorithm for details.
     * @param permissionsFlags Array of document permissions, see PermissionsFlags for details.
     * @param usePdf20 Support for revision 6 (Extension 8).
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postEncryptDocumentInStorage (name: string, userPassword: string, ownerPassword: string, cryptoAlgorithm: string, permissionsFlags?: Array<PermissionsFlags>, usePdf20?: boolean, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/encrypt'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postEncryptDocumentInStorage.');
        }

        // verify required parameter 'userPassword' is not null or undefined
        if (userPassword === null || userPassword === undefined) {
            throw new Error('Required parameter userPassword was null or undefined when calling postEncryptDocumentInStorage.');
        }

        // verify required parameter 'ownerPassword' is not null or undefined
        if (ownerPassword === null || ownerPassword === undefined) {
            throw new Error('Required parameter ownerPassword was null or undefined when calling postEncryptDocumentInStorage.');
        }

        // verify required parameter 'cryptoAlgorithm' is not null or undefined
        if (cryptoAlgorithm === null || cryptoAlgorithm === undefined) {
            throw new Error('Required parameter cryptoAlgorithm was null or undefined when calling postEncryptDocumentInStorage.');
        }

        if (userPassword !== undefined && null !== userPassword) {
            localVarQueryParameters['userPassword'] = ObjectSerializer.serialize(userPassword, "string");
        }

        if (ownerPassword !== undefined && null !== ownerPassword) {
            localVarQueryParameters['ownerPassword'] = ObjectSerializer.serialize(ownerPassword, "string");
        }

        if (cryptoAlgorithm !== undefined && null !== cryptoAlgorithm) {
            localVarQueryParameters['cryptoAlgorithm'] = ObjectSerializer.serialize(cryptoAlgorithm, "string");
        }

        if (permissionsFlags !== undefined && null !== permissionsFlags) {
            localVarQueryParameters['permissionsFlags'] = ObjectSerializer.serialize(permissionsFlags, "Array<PermissionsFlags>");
        }

        if (usePdf20 !== undefined && null !== usePdf20) {
            localVarQueryParameters['usePdf20'] = ObjectSerializer.serialize(usePdf20, "boolean");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Flatten the document.
     * @param name The document name.
     * @param updateAppearances If set, all field appearances will be regenerated before flattening. This option may help if field is incorrectly flattened. This option may decrease performance..
     * @param callEvents If set, formatting and other JavaScript events will be called.
     * @param hideButtons If set, buttons will be removed from flattened document.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postFlattenDocument (name: string, updateAppearances?: boolean, callEvents?: boolean, hideButtons?: boolean, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/flatten'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postFlattenDocument.');
        }

        if (updateAppearances !== undefined && null !== updateAppearances) {
            localVarQueryParameters['updateAppearances'] = ObjectSerializer.serialize(updateAppearances, "boolean");
        }

        if (callEvents !== undefined && null !== callEvents) {
            localVarQueryParameters['callEvents'] = ObjectSerializer.serialize(callEvents, "boolean");
        }

        if (hideButtons !== undefined && null !== hideButtons) {
            localVarQueryParameters['hideButtons'] = ObjectSerializer.serialize(hideButtons, "boolean");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert HTML file (zip archive in request content) to PDF format and return resulting file in response. 
     * @param htmlFileName Name of HTML file in ZIP.
     * @param height Page height
     * @param width Page width
     * @param isLandscape Is page landscaped
     * @param marginLeft Page margin left
     * @param marginBottom Page margin bottom
     * @param marginRight Page margin right
     * @param marginTop Page margin top
     */
    public async postHtmlToPdf (htmlFileName?: string, height?: number, width?: number, isLandscape?: boolean, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/create/html';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        if (htmlFileName !== undefined && null !== htmlFileName) {
            localVarQueryParameters['htmlFileName'] = ObjectSerializer.serialize(htmlFileName, "string");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (isLandscape !== undefined && null !== isLandscape) {
            localVarQueryParameters['isLandscape'] = ObjectSerializer.serialize(isLandscape, "boolean");
        }

        if (marginLeft !== undefined && null !== marginLeft) {
            localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
        }

        if (marginBottom !== undefined && null !== marginBottom) {
            localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
        }

        if (marginRight !== undefined && null !== marginRight) {
            localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
        }

        if (marginTop !== undefined && null !== marginTop) {
            localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update fields from FDF file in request.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param fdfData Fdf file.
     */
    public async postImportFieldsFromFdf (name: string, storage?: string, folder?: string, fdfData?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/import/fdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postImportFieldsFromFdf.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (fdfData !== undefined) {
            localVarFormParams['fdfData'] = fdfData;
            fileData = fdfData;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update fields from XFDF file in request.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param xfdfData Xfdf file.
     */
    public async postImportFieldsFromXfdf (name: string, storage?: string, folder?: string, xfdfData?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/import/xfdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postImportFieldsFromXfdf.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (xfdfData !== undefined) {
            localVarFormParams['xfdfData'] = xfdfData;
            fileData = xfdfData;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update fields from XML file in request.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param xmlData Xml file.
     */
    public async postImportFieldsFromXml (name: string, storage?: string, folder?: string, xmlData?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/import/xml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postImportFieldsFromXml.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (xmlData !== undefined) {
            localVarFormParams['xmlData'] = xmlData;
            fileData = xmlData;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Insert image to document page.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param llx Coordinate lower left X.
     * @param lly Coordinate lower left Y.
     * @param urx Coordinate upper right X.
     * @param ury Coordinate upper right Y.
     * @param imageFilePath Path to image file if specified. Request content is used otherwise.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param image Image file.
     */
    public async postInsertImage (name: string, pageNumber: number, llx: number, lly: number, urx: number, ury: number, imageFilePath?: string, storage?: string, folder?: string, image?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/images'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postInsertImage.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postInsertImage.');
        }

        // verify required parameter 'llx' is not null or undefined
        if (llx === null || llx === undefined) {
            throw new Error('Required parameter llx was null or undefined when calling postInsertImage.');
        }

        // verify required parameter 'lly' is not null or undefined
        if (lly === null || lly === undefined) {
            throw new Error('Required parameter lly was null or undefined when calling postInsertImage.');
        }

        // verify required parameter 'urx' is not null or undefined
        if (urx === null || urx === undefined) {
            throw new Error('Required parameter urx was null or undefined when calling postInsertImage.');
        }

        // verify required parameter 'ury' is not null or undefined
        if (ury === null || ury === undefined) {
            throw new Error('Required parameter ury was null or undefined when calling postInsertImage.');
        }

        if (llx !== undefined && null !== llx) {
            localVarQueryParameters['llx'] = ObjectSerializer.serialize(llx, "number");
        }

        if (lly !== undefined && null !== lly) {
            localVarQueryParameters['lly'] = ObjectSerializer.serialize(lly, "number");
        }

        if (urx !== undefined && null !== urx) {
            localVarQueryParameters['urx'] = ObjectSerializer.serialize(urx, "number");
        }

        if (ury !== undefined && null !== ury) {
            localVarQueryParameters['ury'] = ObjectSerializer.serialize(ury, "number");
        }

        if (imageFilePath !== undefined && null !== imageFilePath) {
            localVarQueryParameters['imageFilePath'] = ObjectSerializer.serialize(imageFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (image !== undefined) {
            localVarFormParams['image'] = image;
            fileData = image;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document listbox fields.
     * @param name The document name.
     * @param fields The array of field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postListBoxFields (name: string, fields: Array<ListBoxField>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/listbox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postListBoxFields.');
        }

        // verify required parameter 'fields' is not null or undefined
        if (fields === null || fields === undefined) {
            throw new Error('Required parameter fields was null or undefined when calling postListBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(fields, "Array<ListBoxField>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Move page to new position.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param newIndex The new page position/index.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postMovePage (name: string, pageNumber: number, newIndex: number, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/movePage'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postMovePage.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postMovePage.');
        }

        // verify required parameter 'newIndex' is not null or undefined
        if (newIndex === null || newIndex === undefined) {
            throw new Error('Required parameter newIndex was null or undefined when calling postMovePage.');
        }

        if (newIndex !== undefined && null !== newIndex) {
            localVarQueryParameters['newIndex'] = ObjectSerializer.serialize(newIndex, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Optimize document.
     * @param name The document name.
     * @param options The optimization options.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postOptimizeDocument (name: string, options: OptimizeOptions, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/optimize'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postOptimizeDocument.');
        }

        // verify required parameter 'options' is not null or undefined
        if (options === null || options === undefined) {
            throw new Error('Required parameter options was null or undefined when calling postOptimizeDocument.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(options, "OptimizeOptions")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Merge selected pages of a document.
     * @param name The original document name.
     * @param pages 1-based page numbers of the source document that make up the resulting document.
     * @param outPath Full filename of the resulting document.
     * @param storage The documents storage.
     * @param folder The source document folder.
     */
    public async postOrganizeDocument (name: string, pages: string, outPath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/organize'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postOrganizeDocument.');
        }

        // verify required parameter 'pages' is not null or undefined
        if (pages === null || pages === undefined) {
            throw new Error('Required parameter pages was null or undefined when calling postOrganizeDocument.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling postOrganizeDocument.');
        }

        if (pages !== undefined && null !== pages) {
            localVarQueryParameters['pages'] = ObjectSerializer.serialize(pages, "string");
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Merge selected pages of different documents.
     * @param organizeDocuments Array of OrganizeDocumentData to make up the resulting document.
     * @param outPath Full filename of the resulting document.
     * @param storage The documents storage.
     */
    public async postOrganizeDocuments (organizeDocuments: OrganizeDocumentRequest, outPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/organize';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'organizeDocuments' is not null or undefined
        if (organizeDocuments === null || organizeDocuments === undefined) {
            throw new Error('Required parameter organizeDocuments was null or undefined when calling postOrganizeDocuments.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling postOrganizeDocuments.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(organizeDocuments, "OrganizeDocumentRequest")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page caret annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageCaretAnnotations (name: string, pageNumber: number, annotations: Array<CaretAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/caret'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageCaretAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageCaretAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageCaretAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<CaretAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Certify document page.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param sign Signature object containing signature data.
     * @param docMdpAccessPermissionType The access permissions granted for this document.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageCertify (name: string, pageNumber: number, sign: Signature, docMdpAccessPermissionType: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/certify'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageCertify.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageCertify.');
        }

        // verify required parameter 'sign' is not null or undefined
        if (sign === null || sign === undefined) {
            throw new Error('Required parameter sign was null or undefined when calling postPageCertify.');
        }

        // verify required parameter 'docMdpAccessPermissionType' is not null or undefined
        if (docMdpAccessPermissionType === null || docMdpAccessPermissionType === undefined) {
            throw new Error('Required parameter docMdpAccessPermissionType was null or undefined when calling postPageCertify.');
        }

        if (docMdpAccessPermissionType !== undefined && null !== docMdpAccessPermissionType) {
            localVarQueryParameters['docMdpAccessPermissionType'] = ObjectSerializer.serialize(docMdpAccessPermissionType, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(sign, "Signature")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page circle annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageCircleAnnotations (name: string, pageNumber: number, annotations: Array<CircleAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/circle'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageCircleAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageCircleAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageCircleAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<CircleAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page FileAttachment annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageFileAttachmentAnnotations (name: string, pageNumber: number, annotations: Array<FileAttachmentAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/fileattachment'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageFileAttachmentAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageFileAttachmentAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageFileAttachmentAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<FileAttachmentAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page free text annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageFreeTextAnnotations (name: string, pageNumber: number, annotations: Array<FreeTextAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/freetext'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageFreeTextAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageFreeTextAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageFreeTextAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<FreeTextAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page highlight annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageHighlightAnnotations (name: string, pageNumber: number, annotations: Array<HighlightAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/highlight'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageHighlightAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageHighlightAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageHighlightAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<HighlightAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page image stamps.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param stamps The array of stamp.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postPageImageStamps (name: string, pageNumber: number, stamps: Array<ImageStamp>, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/stamps/image'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageImageStamps.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageImageStamps.');
        }

        // verify required parameter 'stamps' is not null or undefined
        if (stamps === null || stamps === undefined) {
            throw new Error('Required parameter stamps was null or undefined when calling postPageImageStamps.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(stamps, "Array<ImageStamp>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page ink annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageInkAnnotations (name: string, pageNumber: number, annotations: Array<InkAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/ink'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageInkAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageInkAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageInkAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<InkAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page line annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageLineAnnotations (name: string, pageNumber: number, annotations: Array<LineAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/line'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageLineAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageLineAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageLineAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<LineAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page link annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param links Array of link annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageLinkAnnotations (name: string, pageNumber: number, links: Array<LinkAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/links'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageLinkAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageLinkAnnotations.');
        }

        // verify required parameter 'links' is not null or undefined
        if (links === null || links === undefined) {
            throw new Error('Required parameter links was null or undefined when calling postPageLinkAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(links, "Array<LinkAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page movie annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageMovieAnnotations (name: string, pageNumber: number, annotations: Array<MovieAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/movie'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageMovieAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageMovieAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageMovieAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<MovieAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document pdf page stamps.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param stamps The array of stamp.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postPagePdfPageStamps (name: string, pageNumber: number, stamps: Array<PdfPageStamp>, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/stamps/pdfpage'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPagePdfPageStamps.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPagePdfPageStamps.');
        }

        // verify required parameter 'stamps' is not null or undefined
        if (stamps === null || stamps === undefined) {
            throw new Error('Required parameter stamps was null or undefined when calling postPagePdfPageStamps.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(stamps, "Array<PdfPageStamp>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page polyline annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPagePolyLineAnnotations (name: string, pageNumber: number, annotations: Array<PolyLineAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/polyline'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPagePolyLineAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPagePolyLineAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPagePolyLineAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<PolyLineAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page polygon annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPagePolygonAnnotations (name: string, pageNumber: number, annotations: Array<PolygonAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/polygon'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPagePolygonAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPagePolygonAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPagePolygonAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<PolygonAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page redaction annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param apply Apply redaction immediately after adding.
     */
    public async postPageRedactionAnnotations (name: string, pageNumber: number, annotations: Array<RedactionAnnotation>, storage?: string, folder?: string, apply?: boolean) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/redaction'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageRedactionAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageRedactionAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageRedactionAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (apply !== undefined && null !== apply) {
            localVarQueryParameters['apply'] = ObjectSerializer.serialize(apply, "boolean");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<RedactionAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page screen annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageScreenAnnotations (name: string, pageNumber: number, annotations: Array<ScreenAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/screen'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageScreenAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageScreenAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageScreenAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<ScreenAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page sound annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageSoundAnnotations (name: string, pageNumber: number, annotations: Array<SoundAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/sound'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageSoundAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageSoundAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageSoundAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<SoundAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page square annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageSquareAnnotations (name: string, pageNumber: number, annotations: Array<SquareAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/square'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageSquareAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageSquareAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageSquareAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<SquareAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page squiggly annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageSquigglyAnnotations (name: string, pageNumber: number, annotations: Array<SquigglyAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/squiggly'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageSquigglyAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageSquigglyAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageSquigglyAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<SquigglyAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page stamp annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageStampAnnotations (name: string, pageNumber: number, annotations: Array<StampAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/stamp'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageStampAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageStampAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageStampAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<StampAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page StrikeOut annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageStrikeOutAnnotations (name: string, pageNumber: number, annotations: Array<StrikeOutAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/strikeout'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageStrikeOutAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageStrikeOutAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageStrikeOutAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<StrikeOutAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page tables.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param tables The array of table.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageTables (name: string, pageNumber: number, tables: Array<Table>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/tables'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageTables.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageTables.');
        }

        // verify required parameter 'tables' is not null or undefined
        if (tables === null || tables === undefined) {
            throw new Error('Required parameter tables was null or undefined when calling postPageTables.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(tables, "Array<Table>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page text annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageTextAnnotations (name: string, pageNumber: number, annotations: Array<TextAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageTextAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageTextAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageTextAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<TextAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Page's replace text method.
     * @param name 
     * @param pageNumber 
     * @param textReplaceListRequest 
     * @param storage 
     * @param folder 
     */
    public async postPageTextReplace (name: string, pageNumber: number, textReplaceListRequest: TextReplaceListRequest, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextReplaceResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/text/replace'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageTextReplace.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageTextReplace.');
        }

        // verify required parameter 'textReplaceListRequest' is not null or undefined
        if (textReplaceListRequest === null || textReplaceListRequest === undefined) {
            throw new Error('Required parameter textReplaceListRequest was null or undefined when calling postPageTextReplace.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(textReplaceListRequest, "TextReplaceListRequest")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextReplaceResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page text stamps.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param stamps The array of stamp.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postPageTextStamps (name: string, pageNumber: number, stamps: Array<TextStamp>, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/stamps/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageTextStamps.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageTextStamps.');
        }

        // verify required parameter 'stamps' is not null or undefined
        if (stamps === null || stamps === undefined) {
            throw new Error('Required parameter stamps was null or undefined when calling postPageTextStamps.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(stamps, "Array<TextStamp>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document page underline annotations.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param annotations The array of annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPageUnderlineAnnotations (name: string, pageNumber: number, annotations: Array<UnderlineAnnotation>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/annotations/underline'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPageUnderlineAnnotations.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postPageUnderlineAnnotations.');
        }

        // verify required parameter 'annotations' is not null or undefined
        if (annotations === null || annotations === undefined) {
            throw new Error('Required parameter annotations was null or undefined when calling postPageUnderlineAnnotations.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotations, "Array<UnderlineAnnotation>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
     * @param insertBlankColumnAtFirst Insert blank column at first
     * @param minimizeTheNumberOfWorksheets Minimize the number of worksheets
     * @param uniformWorksheets Uniform worksheets
     * @param password The password (Base64).
     * @param file A file to be converted.
     */
    public async postPdfToXlsx (insertBlankColumnAtFirst?: boolean, minimizeTheNumberOfWorksheets?: boolean, uniformWorksheets?: boolean, password?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: Buffer;  }> {
        const localVarPath = this.basePath + '/pdf/convert/xlsx';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        if (insertBlankColumnAtFirst !== undefined && null !== insertBlankColumnAtFirst) {
            localVarQueryParameters['insertBlankColumnAtFirst'] = ObjectSerializer.serialize(insertBlankColumnAtFirst, "boolean");
        }

        if (minimizeTheNumberOfWorksheets !== undefined && null !== minimizeTheNumberOfWorksheets) {
            localVarQueryParameters['minimizeTheNumberOfWorksheets'] = ObjectSerializer.serialize(minimizeTheNumberOfWorksheets, "boolean");
        }

        if (uniformWorksheets !== undefined && null !== uniformWorksheets) {
            localVarQueryParameters['uniformWorksheets'] = ObjectSerializer.serialize(uniformWorksheets, "boolean");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            encoding: null,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "Buffer");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document popup annotations.
     * @param name The document name.
     * @param annotationId The parent annotation ID.
     * @param annotation The annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postPopupAnnotation (name: string, annotationId: string, annotation: PopupAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/{annotationId}/popup'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postPopupAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling postPopupAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling postPopupAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "PopupAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document RadioButton fields.
     * @param name The document name.
     * @param fields The array of field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postRadioButtonFields (name: string, fields: Array<RadioButtonField>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/radiobutton'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postRadioButtonFields.');
        }

        // verify required parameter 'fields' is not null or undefined
        if (fields === null || fields === undefined) {
            throw new Error('Required parameter fields was null or undefined when calling postRadioButtonFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(fields, "Array<RadioButtonField>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Sign document.
     * @param name The document name.
     * @param sign Signature object containing signature data.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postSignDocument (name: string, sign: Signature, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/sign'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postSignDocument.');
        }

        // verify required parameter 'sign' is not null or undefined
        if (sign === null || sign === undefined) {
            throw new Error('Required parameter sign was null or undefined when calling postSignDocument.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(sign, "Signature")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Sign page.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param sign Signature object containing signature data.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postSignPage (name: string, pageNumber: number, sign: Signature, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/sign'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postSignPage.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling postSignPage.');
        }

        // verify required parameter 'sign' is not null or undefined
        if (sign === null || sign === undefined) {
            throw new Error('Required parameter sign was null or undefined when calling postSignPage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(sign, "Signature")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document signature field.
     * @param name The document name.
     * @param field The field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postSignatureField (name: string, field: SignatureField, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/signature'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postSignatureField.');
        }

        // verify required parameter 'field' is not null or undefined
        if (field === null || field === undefined) {
            throw new Error('Required parameter field was null or undefined when calling postSignatureField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(field, "SignatureField")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Split document to parts.
     * @param name Document name.
     * @param format Resulting documents format.
     * @param from Start page if defined.
     * @param to End page if defined.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postSplitDocument (name: string, format?: string, from?: number, to?: number, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: SplitResultResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/split'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postSplitDocument.');
        }

        if (format !== undefined && null !== format) {
            localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "string");
        }

        if (from !== undefined && null !== from) {
            localVarQueryParameters['from'] = ObjectSerializer.serialize(from, "number");
        }

        if (to !== undefined && null !== to) {
            localVarQueryParameters['to'] = ObjectSerializer.serialize(to, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SplitResultResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Split document into ranges.
     * @param name The document name.
     * @param options The splitting options.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password Base64 encoded password.
     */
    public async postSplitRangePdfDocument (name: string, options: SplitRangePdfOptions, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: SplitResultResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/splitrangepdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postSplitRangePdfDocument.');
        }

        // verify required parameter 'options' is not null or undefined
        if (options === null || options === undefined) {
            throw new Error('Required parameter options was null or undefined when calling postSplitRangePdfDocument.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(options, "SplitRangePdfOptions")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SplitResultResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add document text box fields.
     * @param name The document name.
     * @param fields The array of field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async postTextBoxFields (name: string, fields: Array<TextBoxField>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/textbox'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postTextBoxFields.');
        }

        // verify required parameter 'fields' is not null or undefined
        if (fields === null || fields === undefined) {
            throw new Error('Required parameter fields was null or undefined when calling postTextBoxFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(fields, "Array<TextBoxField>")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add or remove XMP Metadata properties.
     * @param name The document name.
     * @param metadata XmpMetadata instance.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param passBase64 The password (Base64).
     */
    public async postXmpMetadata (name: string, metadata: XmpMetadata, folder?: string, storage?: string, passBase64?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/xmpmetadata'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling postXmpMetadata.');
        }

        // verify required parameter 'metadata' is not null or undefined
        if (metadata === null || metadata === undefined) {
            throw new Error('Required parameter metadata was null or undefined when calling postXmpMetadata.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (passBase64 !== undefined && null !== passBase64) {
            localVarQueryParameters['passBase64'] = ObjectSerializer.serialize(passBase64, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'POST',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(metadata, "XmpMetadata")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add new page to end of the document.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putAddNewPage (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: DocumentPagesResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putAddNewPage.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentPagesResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add text to PDF document page.
     * @param name The document name.
     * @param pageNumber Number of page (starting from 1).
     * @param paragraph Paragraph data.
     * @param folder Document folder.
     * @param storage The document storage.
     */
    public async putAddText (name: string, pageNumber: number, paragraph: Paragraph, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/text'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putAddText.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putAddText.');
        }

        // verify required parameter 'paragraph' is not null or undefined
        if (paragraph === null || paragraph === undefined) {
            throw new Error('Required parameter paragraph was null or undefined when calling putAddText.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(paragraph, "Paragraph")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Flattens the annotations of the specified types
     * @param name The document name.
     * @param startPage The start page number.
     * @param endPage The end page number.
     * @param annotationTypes Array of annotation types.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putAnnotationsFlatten (name: string, startPage?: number, endPage?: number, annotationTypes?: Array<AnnotationType>, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/flatten'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putAnnotationsFlatten.');
        }

        if (startPage !== undefined && null !== startPage) {
            localVarQueryParameters['startPage'] = ObjectSerializer.serialize(startPage, "number");
        }

        if (endPage !== undefined && null !== endPage) {
            localVarQueryParameters['endPage'] = ObjectSerializer.serialize(endPage, "number");
        }

        if (annotationTypes !== undefined && null !== annotationTypes) {
            localVarQueryParameters['annotationTypes'] = ObjectSerializer.serialize(annotationTypes, "Array<AnnotationType>");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert APS file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.xps)
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putApsInStorageToPdf (name: string, srcPath: string, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/aps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putApsInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putApsInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update document bookmark.
     * @param name The document name.
     * @param bookmarkPath The bookmark path.
     * @param bookmark The bookmark.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putBookmark (name: string, bookmarkPath: string, bookmark: Bookmark, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: BookmarkResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/bookmarks/bookmark/{bookmarkPath}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'bookmarkPath' + '}', encodeURIComponent(String(bookmarkPath)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putBookmark.');
        }

        // verify required parameter 'bookmarkPath' is not null or undefined
        if (bookmarkPath === null || bookmarkPath === undefined) {
            throw new Error('Required parameter bookmarkPath was null or undefined when calling putBookmark.');
        }

        // verify required parameter 'bookmark' is not null or undefined
        if (bookmark === null || bookmark === undefined) {
            throw new Error('Required parameter bookmark was null or undefined when calling putBookmark.');
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(bookmark, "Bookmark")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "BookmarkResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document caret annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putCaretAnnotation (name: string, annotationId: string, annotation: CaretAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CaretAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/caret/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putCaretAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putCaretAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putCaretAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "CaretAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CaretAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Change document password from content.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.doc)
     * @param ownerPassword Owner password (encrypted Base64).
     * @param newUserPassword New user password (encrypted Base64).
     * @param newOwnerPassword New owner password (encrypted Base64).
     * @param storage The document storage.
     * @param file A file to be changed password.
     */
    public async putChangePasswordDocument (outPath: string, ownerPassword: string, newUserPassword: string, newOwnerPassword: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/changepassword';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putChangePasswordDocument.');
        }

        // verify required parameter 'ownerPassword' is not null or undefined
        if (ownerPassword === null || ownerPassword === undefined) {
            throw new Error('Required parameter ownerPassword was null or undefined when calling putChangePasswordDocument.');
        }

        // verify required parameter 'newUserPassword' is not null or undefined
        if (newUserPassword === null || newUserPassword === undefined) {
            throw new Error('Required parameter newUserPassword was null or undefined when calling putChangePasswordDocument.');
        }

        // verify required parameter 'newOwnerPassword' is not null or undefined
        if (newOwnerPassword === null || newOwnerPassword === undefined) {
            throw new Error('Required parameter newOwnerPassword was null or undefined when calling putChangePasswordDocument.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (ownerPassword !== undefined && null !== ownerPassword) {
            localVarQueryParameters['ownerPassword'] = ObjectSerializer.serialize(ownerPassword, "string");
        }

        if (newUserPassword !== undefined && null !== newUserPassword) {
            localVarQueryParameters['newUserPassword'] = ObjectSerializer.serialize(newUserPassword, "string");
        }

        if (newOwnerPassword !== undefined && null !== newOwnerPassword) {
            localVarQueryParameters['newOwnerPassword'] = ObjectSerializer.serialize(newOwnerPassword, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document checkbox field
     * @param name The document name.
     * @param fieldName The field name.
     * @param field The field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putCheckBoxField (name: string, fieldName: string, field: CheckBoxField, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CheckBoxFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/checkbox/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putCheckBoxField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling putCheckBoxField.');
        }

        // verify required parameter 'field' is not null or undefined
        if (field === null || field === undefined) {
            throw new Error('Required parameter field was null or undefined when calling putCheckBoxField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(field, "CheckBoxField")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CheckBoxFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document circle annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putCircleAnnotation (name: string, annotationId: string, annotation: CircleAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: CircleAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/circle/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putCircleAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putCircleAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putCircleAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "CircleAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "CircleAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document combobox field
     * @param name The document name.
     * @param fieldName The field name.
     * @param field The field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putComboBoxField (name: string, fieldName: string, field: ComboBoxField, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ComboBoxFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/combobox/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putComboBoxField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling putComboBoxField.');
        }

        // verify required parameter 'field' is not null or undefined
        if (field === null || field === undefined) {
            throw new Error('Required parameter field was null or undefined when calling putComboBoxField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(field, "ComboBoxField")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ComboBoxFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Create empty document.
     * @param name The new document name.
     * @param storage The document storage.
     * @param folder The new document folder.
     */
    public async putCreateDocument (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: DocumentResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putCreateDocument.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Create a separate PDF from a PDF Layer and upload resulting file to storage.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param outPath The out path of result image.
     * @param layerId Layer Id.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param passBase64 The password (Base64).
     */
    public async putCreatePdfFromLayer (name: string, pageNumber: number, outPath: string, layerId: string, folder?: string, storage?: string, passBase64?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/layers'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putCreatePdfFromLayer.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putCreatePdfFromLayer.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putCreatePdfFromLayer.');
        }

        // verify required parameter 'layerId' is not null or undefined
        if (layerId === null || layerId === undefined) {
            throw new Error('Required parameter layerId was null or undefined when calling putCreatePdfFromLayer.');
        }

        if (pageNumber !== undefined && null !== pageNumber) {
            localVarQueryParameters['pageNumber'] = ObjectSerializer.serialize(pageNumber, "number");
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (layerId !== undefined && null !== layerId) {
            localVarQueryParameters['layerId'] = ObjectSerializer.serialize(layerId, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (passBase64 !== undefined && null !== passBase64) {
            localVarQueryParameters['passBase64'] = ObjectSerializer.serialize(passBase64, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Decrypt document from content.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.doc)
     * @param password The password (encrypted Base64).
     * @param storage The document storage.
     * @param file A file to be decrypted.
     */
    public async putDecryptDocument (outPath: string, password: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/decrypt';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putDecryptDocument.');
        }

        // verify required parameter 'password' is not null or undefined
        if (password === null || password === undefined) {
            throw new Error('Required parameter password was null or undefined when calling putDecryptDocument.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update document display properties.
     * @param name The document name.
     * @param displayProperties The display properties.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putDocumentDisplayProperties (name: string, displayProperties: DisplayProperties, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: DisplayPropertiesResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/displayproperties'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putDocumentDisplayProperties.');
        }

        // verify required parameter 'displayProperties' is not null or undefined
        if (displayProperties === null || displayProperties === undefined) {
            throw new Error('Required parameter displayProperties was null or undefined when calling putDocumentDisplayProperties.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(displayProperties, "DisplayProperties")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DisplayPropertiesResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Encrypt document from content.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.doc)
     * @param userPassword User password (encrypted Base64).
     * @param ownerPassword Owner password (encrypted Base64).
     * @param cryptoAlgorithm Cryptographic algorithm, see CryptoAlgorithm for details.
     * @param permissionsFlags Array of document permissions, see PermissionsFlags for details.
     * @param usePdf20 Support for revision 6 (Extension 8).
     * @param storage The document storage.
     * @param file A file to be encrypted.
     */
    public async putEncryptDocument (outPath: string, userPassword: string, ownerPassword: string, cryptoAlgorithm: string, permissionsFlags?: Array<PermissionsFlags>, usePdf20?: boolean, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/encrypt';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putEncryptDocument.');
        }

        // verify required parameter 'userPassword' is not null or undefined
        if (userPassword === null || userPassword === undefined) {
            throw new Error('Required parameter userPassword was null or undefined when calling putEncryptDocument.');
        }

        // verify required parameter 'ownerPassword' is not null or undefined
        if (ownerPassword === null || ownerPassword === undefined) {
            throw new Error('Required parameter ownerPassword was null or undefined when calling putEncryptDocument.');
        }

        // verify required parameter 'cryptoAlgorithm' is not null or undefined
        if (cryptoAlgorithm === null || cryptoAlgorithm === undefined) {
            throw new Error('Required parameter cryptoAlgorithm was null or undefined when calling putEncryptDocument.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (userPassword !== undefined && null !== userPassword) {
            localVarQueryParameters['userPassword'] = ObjectSerializer.serialize(userPassword, "string");
        }

        if (ownerPassword !== undefined && null !== ownerPassword) {
            localVarQueryParameters['ownerPassword'] = ObjectSerializer.serialize(ownerPassword, "string");
        }

        if (cryptoAlgorithm !== undefined && null !== cryptoAlgorithm) {
            localVarQueryParameters['cryptoAlgorithm'] = ObjectSerializer.serialize(cryptoAlgorithm, "string");
        }

        if (permissionsFlags !== undefined && null !== permissionsFlags) {
            localVarQueryParameters['permissionsFlags'] = ObjectSerializer.serialize(permissionsFlags, "Array<PermissionsFlags>");
        }

        if (usePdf20 !== undefined && null !== usePdf20) {
            localVarQueryParameters['usePdf20'] = ObjectSerializer.serialize(usePdf20, "boolean");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert EPUB file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.epub)
     * @param storage The document storage.
     * @param dstFolder The destination document folder.
     */
    public async putEpubInStorageToPdf (name: string, srcPath: string, storage?: string, dstFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/epub'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putEpubInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putEpubInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Export fields from from PDF in storage to FDF file in storage.
     * @param name The document name.
     * @param fdfOutputFilePath The output Fdf file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putExportFieldsFromPdfToFdfInStorage (name: string, fdfOutputFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/export/fdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putExportFieldsFromPdfToFdfInStorage.');
        }

        // verify required parameter 'fdfOutputFilePath' is not null or undefined
        if (fdfOutputFilePath === null || fdfOutputFilePath === undefined) {
            throw new Error('Required parameter fdfOutputFilePath was null or undefined when calling putExportFieldsFromPdfToFdfInStorage.');
        }

        if (fdfOutputFilePath !== undefined && null !== fdfOutputFilePath) {
            localVarQueryParameters['fdfOutputFilePath'] = ObjectSerializer.serialize(fdfOutputFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Export fields from from PDF in storage to XFDF file in storage.
     * @param name The document name.
     * @param xfdfOutputFilePath The output xfdf file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putExportFieldsFromPdfToXfdfInStorage (name: string, xfdfOutputFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/export/xfdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putExportFieldsFromPdfToXfdfInStorage.');
        }

        // verify required parameter 'xfdfOutputFilePath' is not null or undefined
        if (xfdfOutputFilePath === null || xfdfOutputFilePath === undefined) {
            throw new Error('Required parameter xfdfOutputFilePath was null or undefined when calling putExportFieldsFromPdfToXfdfInStorage.');
        }

        if (xfdfOutputFilePath !== undefined && null !== xfdfOutputFilePath) {
            localVarQueryParameters['xfdfOutputFilePath'] = ObjectSerializer.serialize(xfdfOutputFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Export fields from from PDF in storage to XML file in storage.
     * @param name The document name.
     * @param xmlOutputFilePath The output xml file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putExportFieldsFromPdfToXmlInStorage (name: string, xmlOutputFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/export/xml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putExportFieldsFromPdfToXmlInStorage.');
        }

        // verify required parameter 'xmlOutputFilePath' is not null or undefined
        if (xmlOutputFilePath === null || xmlOutputFilePath === undefined) {
            throw new Error('Required parameter xmlOutputFilePath was null or undefined when calling putExportFieldsFromPdfToXmlInStorage.');
        }

        if (xmlOutputFilePath !== undefined && null !== xmlOutputFilePath) {
            localVarQueryParameters['xmlOutputFilePath'] = ObjectSerializer.serialize(xmlOutputFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Flatten form fields in document.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putFieldsFlatten (name: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/flatten'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putFieldsFlatten.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document FileAttachment annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putFileAttachmentAnnotation (name: string, annotationId: string, annotation: FileAttachmentAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FileAttachmentAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/fileattachment/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putFileAttachmentAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putFileAttachmentAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putFileAttachmentAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "FileAttachmentAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FileAttachmentAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document FileAttachment annotation content to storage
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param outFolder The output folder.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putFileAttachmentAnnotationDataExtract (name: string, annotationId: string, outFolder?: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/fileattachment/{annotationId}/data/extract'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putFileAttachmentAnnotationDataExtract.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putFileAttachmentAnnotationDataExtract.');
        }

        if (outFolder !== undefined && null !== outFolder) {
            localVarQueryParameters['outFolder'] = ObjectSerializer.serialize(outFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document free text annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putFreeTextAnnotation (name: string, annotationId: string, annotation: FreeTextAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FreeTextAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/freetext/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putFreeTextAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putFreeTextAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putFreeTextAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "FreeTextAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FreeTextAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document highlight annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putHighlightAnnotation (name: string, annotationId: string, annotation: HighlightAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: HighlightAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/highlight/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putHighlightAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putHighlightAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putHighlightAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "HighlightAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "HighlightAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert HTML file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.zip)
     * @param htmlFileName Name of HTML file in ZIP.
     * @param height Page height
     * @param width Page width
     * @param isLandscape Is page landscaped
     * @param marginLeft Page margin left
     * @param marginBottom Page margin bottom
     * @param marginRight Page margin right
     * @param marginTop Page margin top
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putHtmlInStorageToPdf (name: string, srcPath: string, htmlFileName?: string, height?: number, width?: number, isLandscape?: boolean, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/html'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putHtmlInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putHtmlInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (htmlFileName !== undefined && null !== htmlFileName) {
            localVarQueryParameters['htmlFileName'] = ObjectSerializer.serialize(htmlFileName, "string");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (isLandscape !== undefined && null !== isLandscape) {
            localVarQueryParameters['isLandscape'] = ObjectSerializer.serialize(isLandscape, "boolean");
        }

        if (marginLeft !== undefined && null !== marginLeft) {
            localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
        }

        if (marginBottom !== undefined && null !== marginBottom) {
            localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
        }

        if (marginRight !== undefined && null !== marginRight) {
            localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
        }

        if (marginTop !== undefined && null !== marginTop) {
            localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document image in GIF format to folder
     * @param name The document name.
     * @param imageId Image ID.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param destFolder The document folder.
     */
    public async putImageExtractAsGif (name: string, imageId: string, width?: number, height?: number, storage?: string, folder?: string, destFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}/extract/gif'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImageExtractAsGif.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling putImageExtractAsGif.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (destFolder !== undefined && null !== destFolder) {
            localVarQueryParameters['destFolder'] = ObjectSerializer.serialize(destFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document image in JPEG format to folder
     * @param name The document name.
     * @param imageId Image ID.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param destFolder The document folder.
     */
    public async putImageExtractAsJpeg (name: string, imageId: string, width?: number, height?: number, storage?: string, folder?: string, destFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}/extract/jpeg'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImageExtractAsJpeg.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling putImageExtractAsJpeg.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (destFolder !== undefined && null !== destFolder) {
            localVarQueryParameters['destFolder'] = ObjectSerializer.serialize(destFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document image in PNG format to folder
     * @param name The document name.
     * @param imageId Image ID.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param destFolder The document folder.
     */
    public async putImageExtractAsPng (name: string, imageId: string, width?: number, height?: number, storage?: string, folder?: string, destFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}/extract/png'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImageExtractAsPng.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling putImageExtractAsPng.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (destFolder !== undefined && null !== destFolder) {
            localVarQueryParameters['destFolder'] = ObjectSerializer.serialize(destFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document image in TIFF format to folder
     * @param name The document name.
     * @param imageId Image ID.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param destFolder The document folder.
     */
    public async putImageExtractAsTiff (name: string, imageId: string, width?: number, height?: number, storage?: string, folder?: string, destFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}/extract/tiff'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImageExtractAsTiff.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling putImageExtractAsTiff.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (destFolder !== undefined && null !== destFolder) {
            localVarQueryParameters['destFolder'] = ObjectSerializer.serialize(destFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert image file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param imageTemplates ImageTemplatesRequestImage templates
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putImageInStorageToPdf (name: string, imageTemplates: ImageTemplatesRequest, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/images'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImageInStorageToPdf.');
        }

        // verify required parameter 'imageTemplates' is not null or undefined
        if (imageTemplates === null || imageTemplates === undefined) {
            throw new Error('Required parameter imageTemplates was null or undefined when calling putImageInStorageToPdf.');
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(imageTemplates, "ImageTemplatesRequest")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document images in GIF format to folder.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param destFolder The document folder.
     */
    public async putImagesExtractAsGif (name: string, pageNumber: number, width?: number, height?: number, storage?: string, folder?: string, destFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/images/extract/gif'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImagesExtractAsGif.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putImagesExtractAsGif.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (destFolder !== undefined && null !== destFolder) {
            localVarQueryParameters['destFolder'] = ObjectSerializer.serialize(destFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document images in JPEG format to folder.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param destFolder The document folder.
     */
    public async putImagesExtractAsJpeg (name: string, pageNumber: number, width?: number, height?: number, storage?: string, folder?: string, destFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/images/extract/jpeg'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImagesExtractAsJpeg.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putImagesExtractAsJpeg.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (destFolder !== undefined && null !== destFolder) {
            localVarQueryParameters['destFolder'] = ObjectSerializer.serialize(destFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document images in PNG format to folder.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param destFolder The document folder.
     */
    public async putImagesExtractAsPng (name: string, pageNumber: number, width?: number, height?: number, storage?: string, folder?: string, destFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/images/extract/png'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImagesExtractAsPng.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putImagesExtractAsPng.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (destFolder !== undefined && null !== destFolder) {
            localVarQueryParameters['destFolder'] = ObjectSerializer.serialize(destFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document images in TIFF format to folder.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param destFolder The document folder.
     */
    public async putImagesExtractAsTiff (name: string, pageNumber: number, width?: number, height?: number, storage?: string, folder?: string, destFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/images/extract/tiff'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImagesExtractAsTiff.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putImagesExtractAsTiff.');
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (destFolder !== undefined && null !== destFolder) {
            localVarQueryParameters['destFolder'] = ObjectSerializer.serialize(destFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update fields from FDF file in storage.
     * @param name The document name.
     * @param fdfFilePath The Fdf file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putImportFieldsFromFdfInStorage (name: string, fdfFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/import/fdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImportFieldsFromFdfInStorage.');
        }

        // verify required parameter 'fdfFilePath' is not null or undefined
        if (fdfFilePath === null || fdfFilePath === undefined) {
            throw new Error('Required parameter fdfFilePath was null or undefined when calling putImportFieldsFromFdfInStorage.');
        }

        if (fdfFilePath !== undefined && null !== fdfFilePath) {
            localVarQueryParameters['fdfFilePath'] = ObjectSerializer.serialize(fdfFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update fields from XFDF file in storage.
     * @param name The document name.
     * @param xfdfFilePath The XFDF file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putImportFieldsFromXfdfInStorage (name: string, xfdfFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/import/xfdf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImportFieldsFromXfdfInStorage.');
        }

        // verify required parameter 'xfdfFilePath' is not null or undefined
        if (xfdfFilePath === null || xfdfFilePath === undefined) {
            throw new Error('Required parameter xfdfFilePath was null or undefined when calling putImportFieldsFromXfdfInStorage.');
        }

        if (xfdfFilePath !== undefined && null !== xfdfFilePath) {
            localVarQueryParameters['xfdfFilePath'] = ObjectSerializer.serialize(xfdfFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update fields from XML file in storage.
     * @param name The document name.
     * @param xmlFilePath Full source filename (ex. /folder1/folder2/template.xml)
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putImportFieldsFromXmlInStorage (name: string, xmlFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/import/xml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putImportFieldsFromXmlInStorage.');
        }

        // verify required parameter 'xmlFilePath' is not null or undefined
        if (xmlFilePath === null || xmlFilePath === undefined) {
            throw new Error('Required parameter xmlFilePath was null or undefined when calling putImportFieldsFromXmlInStorage.');
        }

        if (xmlFilePath !== undefined && null !== xmlFilePath) {
            localVarQueryParameters['xmlFilePath'] = ObjectSerializer.serialize(xmlFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document ink annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putInkAnnotation (name: string, annotationId: string, annotation: InkAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: InkAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/ink/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putInkAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putInkAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putInkAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "InkAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "InkAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document line annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putLineAnnotation (name: string, annotationId: string, annotation: LineAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: LineAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/line/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putLineAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putLineAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putLineAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "LineAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "LineAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document page link annotations
     * @param name The document name.
     * @param linkId The link ID.
     * @param link Link annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putLinkAnnotation (name: string, linkId: string, link: LinkAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: LinkAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/links/{linkId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'linkId' + '}', encodeURIComponent(String(linkId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putLinkAnnotation.');
        }

        // verify required parameter 'linkId' is not null or undefined
        if (linkId === null || linkId === undefined) {
            throw new Error('Required parameter linkId was null or undefined when calling putLinkAnnotation.');
        }

        // verify required parameter 'link' is not null or undefined
        if (link === null || link === undefined) {
            throw new Error('Required parameter link was null or undefined when calling putLinkAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(link, "LinkAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "LinkAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document listbox field
     * @param name The document name.
     * @param fieldName The field name.
     * @param field The field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putListBoxField (name: string, fieldName: string, field: ListBoxField, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ListBoxFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/listbox/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putListBoxField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling putListBoxField.');
        }

        // verify required parameter 'field' is not null or undefined
        if (field === null || field === undefined) {
            throw new Error('Required parameter field was null or undefined when calling putListBoxField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(field, "ListBoxField")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ListBoxFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert MD file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.md)
     * @param storage The document storage.
     * @param dstFolder The destination document folder.
     */
    public async putMarkdownInStorageToPdf (name: string, srcPath: string, storage?: string, dstFolder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/markdown'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putMarkdownInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putMarkdownInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Merge a list of documents.
     * @param name Resulting document name.
     * @param mergeDocuments MergeDocuments with a list of documents.
     * @param storage Resulting document storage.
     * @param folder Resulting document folder.
     */
    public async putMergeDocuments (name: string, mergeDocuments: MergeDocuments, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: DocumentResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/merge'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putMergeDocuments.');
        }

        // verify required parameter 'mergeDocuments' is not null or undefined
        if (mergeDocuments === null || mergeDocuments === undefined) {
            throw new Error('Required parameter mergeDocuments was null or undefined when calling putMergeDocuments.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(mergeDocuments, "MergeDocuments")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert MHT file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.mht)
     * @param height Page height
     * @param width Page width
     * @param marginLeft Page margin left
     * @param marginBottom Page margin bottom
     * @param marginRight Page margin right
     * @param marginTop Page margin top
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putMhtInStorageToPdf (name: string, srcPath: string, height?: number, width?: number, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/mht'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putMhtInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putMhtInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (marginLeft !== undefined && null !== marginLeft) {
            localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
        }

        if (marginBottom !== undefined && null !== marginBottom) {
            localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
        }

        if (marginRight !== undefined && null !== marginRight) {
            localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
        }

        if (marginTop !== undefined && null !== marginTop) {
            localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document movie annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putMovieAnnotation (name: string, annotationId: string, annotation: MovieAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: MovieAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/movie/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putMovieAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putMovieAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putMovieAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "MovieAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "MovieAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add page stamp.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param stamp Stamp with data.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putPageAddStamp (name: string, pageNumber: number, stamp: Stamp, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/stamp'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPageAddStamp.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putPageAddStamp.');
        }

        // verify required parameter 'stamp' is not null or undefined
        if (stamp === null || stamp === undefined) {
            throw new Error('Required parameter stamp was null or undefined when calling putPageAddStamp.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(stamp, "Stamp")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to bmp image and upload resulting file to storage.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param outPath The out path of result image.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPageConvertToBmp (name: string, pageNumber: number, outPath: string, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/bmp'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPageConvertToBmp.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putPageConvertToBmp.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPageConvertToBmp.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to emf image and upload resulting file to storage.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param outPath The out path of result image.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPageConvertToEmf (name: string, pageNumber: number, outPath: string, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/emf'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPageConvertToEmf.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putPageConvertToEmf.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPageConvertToEmf.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to gif image and upload resulting file to storage.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param outPath The out path of result image.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPageConvertToGif (name: string, pageNumber: number, outPath: string, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/gif'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPageConvertToGif.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putPageConvertToGif.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPageConvertToGif.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to Jpeg image and upload resulting file to storage.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param outPath The out path of result image.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPageConvertToJpeg (name: string, pageNumber: number, outPath: string, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/jpeg'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPageConvertToJpeg.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putPageConvertToJpeg.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPageConvertToJpeg.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to png image and upload resulting file to storage.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param outPath The out path of result image.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPageConvertToPng (name: string, pageNumber: number, outPath: string, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/png'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPageConvertToPng.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putPageConvertToPng.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPageConvertToPng.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert document page to Tiff image and upload resulting file to storage.
     * @param name The document name.
     * @param pageNumber The page number.
     * @param outPath The out path of result image.
     * @param width The converted image width.
     * @param height The converted image height.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPageConvertToTiff (name: string, pageNumber: number, outPath: string, width?: number, height?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/pages/{pageNumber}/convert/tiff'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'pageNumber' + '}', encodeURIComponent(String(pageNumber)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPageConvertToTiff.');
        }

        // verify required parameter 'pageNumber' is not null or undefined
        if (pageNumber === null || pageNumber === undefined) {
            throw new Error('Required parameter pageNumber was null or undefined when calling putPageConvertToTiff.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPageConvertToTiff.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert PCL file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.pcl)
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putPclInStorageToPdf (name: string, srcPath: string, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/pcl'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPclInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putPclInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert PDFA file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.pdf)
     * @param dstFolder The destination document folder.
     * @param dontOptimize If set, document resources will not be optimized.
     * @param storage The document storage.
     */
    public async putPdfAInStorageToPdf (name: string, srcPath: string, dstFolder?: string, dontOptimize?: boolean, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/pdfa'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfAInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putPdfAInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (dontOptimize !== undefined && null !== dontOptimize) {
            localVarQueryParameters['dontOptimize'] = ObjectSerializer.serialize(dontOptimize, "boolean");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to APS format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.aps)
     * @param storage The document storage.
     * @param file A file to be converted.
     */
    public async putPdfInRequestToAps (outPath: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/aps';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToAps.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to DOC format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.doc)
     * @param addReturnToLineEnd Add return to line end.
     * @param format Allows to specify .doc or .docx file format.
     * @param imageResolutionX Image resolution X.
     * @param imageResolutionY Image resolution Y.
     * @param maxDistanceBetweenTextLines Max distance between text lines.
     * @param mode Allows to control how a PDF document is converted into a word processing document.
     * @param recognizeBullets Recognize bullets.
     * @param relativeHorizontalProximity Relative horizontal proximity.
     * @param storage The document storage.
     * @param file A file to be converted.
     * @param password The password (Base64).
     */
    public async putPdfInRequestToDoc (outPath: string, addReturnToLineEnd?: boolean, format?: string, imageResolutionX?: number, imageResolutionY?: number, maxDistanceBetweenTextLines?: number, mode?: string, recognizeBullets?: boolean, relativeHorizontalProximity?: number, storage?: string, file?: Buffer, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/doc';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToDoc.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (addReturnToLineEnd !== undefined && null !== addReturnToLineEnd) {
            localVarQueryParameters['addReturnToLineEnd'] = ObjectSerializer.serialize(addReturnToLineEnd, "boolean");
        }

        if (format !== undefined && null !== format) {
            localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "string");
        }

        if (imageResolutionX !== undefined && null !== imageResolutionX) {
            localVarQueryParameters['imageResolutionX'] = ObjectSerializer.serialize(imageResolutionX, "number");
        }

        if (imageResolutionY !== undefined && null !== imageResolutionY) {
            localVarQueryParameters['imageResolutionY'] = ObjectSerializer.serialize(imageResolutionY, "number");
        }

        if (maxDistanceBetweenTextLines !== undefined && null !== maxDistanceBetweenTextLines) {
            localVarQueryParameters['maxDistanceBetweenTextLines'] = ObjectSerializer.serialize(maxDistanceBetweenTextLines, "number");
        }

        if (mode !== undefined && null !== mode) {
            localVarQueryParameters['mode'] = ObjectSerializer.serialize(mode, "string");
        }

        if (recognizeBullets !== undefined && null !== recognizeBullets) {
            localVarQueryParameters['recognizeBullets'] = ObjectSerializer.serialize(recognizeBullets, "boolean");
        }

        if (relativeHorizontalProximity !== undefined && null !== relativeHorizontalProximity) {
            localVarQueryParameters['relativeHorizontalProximity'] = ObjectSerializer.serialize(relativeHorizontalProximity, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to EPUB format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.epub)
     * @param contentRecognitionMode Property tunes conversion for this or that desirable method of recognition of content.
     * @param storage The document storage.
     * @param file A file to be converted.
     */
    public async putPdfInRequestToEpub (outPath: string, contentRecognitionMode?: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/epub';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToEpub.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (contentRecognitionMode !== undefined && null !== contentRecognitionMode) {
            localVarQueryParameters['contentRecognitionMode'] = ObjectSerializer.serialize(contentRecognitionMode, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to Html format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.html)
     * @param additionalMarginWidthInPoints Defines width of margin that will be forcibly left around that output HTML-areas.
     * @param compressSvgGraphicsIfAny The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving.
     * @param convertMarkedContentToLayers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with \&quot;data-pdflayer\&quot; attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content.
     * @param defaultFontName Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used.
     * @param documentType Result document type.
     * @param fixedLayout The value indicating whether that HTML is created as fixed layout.
     * @param imageResolution Resolution for image rendering.
     * @param minimalLineWidth This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers.
     * @param preventGlyphsGrouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true.
     * @param splitCssIntoPages When multipage-mode selected(i.e &#39;SplitIntoPages&#39; is &#39;true&#39;), then this attribute defines whether should be created separate CSS-file for each result HTML page.
     * @param splitIntoPages The flag that indicates whether each page of source document will be converted into it&#39;s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages.
     * @param useZOrder If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects.
     * @param antialiasingProcessing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML.
     * @param cssClassNamesPrefix When PDFtoHTML converter generates result CSSs, CSS class names (something like \&quot;.stl_01 {}\&quot; ... \&quot;.stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix.
     * @param explicitListOfSavedPages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1...[NumberOfPagesInConvertedDocument]) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF.
     * @param fontEncodingStrategy Defines encoding special rule to tune PDF decoding for current document.
     * @param fontSavingMode Defines font saving mode that will be used during saving of PDF to desirable format.
     * @param htmlMarkupGenerationMode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments.
     * @param lettersPositioningMethod The mode of positioning of letters in words in result HTML.
     * @param pagesFlowTypeDependsOnViewersScreenSize If attribute &#39;SplitOnPages&#x3D;false&#39;, than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer.
     * @param partsEmbeddingMode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities.
     * @param rasterImagesSavingMode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML.
     * @param removeEmptyAreasOnTopAndBottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any).
     * @param saveShadowedTextsAsTransparentTexts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard).
     * @param saveTransparentTexts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML.
     * @param specialFolderForAllImages The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file.
     * @param specialFolderForSvgImages The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file.
     * @param trySaveTextUnderliningAndStrikeoutingInCss PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically.
     * @param storage The document storage.
     * @param flowLayoutParagraphFullWidth This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false.
     * @param outputFormat This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is \&quot;Zip\&quot; or missed (default). In case of the \&quot;Folder\&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file.
     * @param file A file to be converted.
     */
    public async putPdfInRequestToHtml (outPath: string, additionalMarginWidthInPoints?: number, compressSvgGraphicsIfAny?: boolean, convertMarkedContentToLayers?: boolean, defaultFontName?: string, documentType?: string, fixedLayout?: boolean, imageResolution?: number, minimalLineWidth?: number, preventGlyphsGrouping?: boolean, splitCssIntoPages?: boolean, splitIntoPages?: boolean, useZOrder?: boolean, antialiasingProcessing?: string, cssClassNamesPrefix?: string, explicitListOfSavedPages?: Array<number>, fontEncodingStrategy?: string, fontSavingMode?: string, htmlMarkupGenerationMode?: string, lettersPositioningMethod?: string, pagesFlowTypeDependsOnViewersScreenSize?: boolean, partsEmbeddingMode?: string, rasterImagesSavingMode?: string, removeEmptyAreasOnTopAndBottom?: boolean, saveShadowedTextsAsTransparentTexts?: boolean, saveTransparentTexts?: boolean, specialFolderForAllImages?: string, specialFolderForSvgImages?: string, trySaveTextUnderliningAndStrikeoutingInCss?: boolean, storage?: string, flowLayoutParagraphFullWidth?: boolean, outputFormat?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/html';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToHtml.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (additionalMarginWidthInPoints !== undefined && null !== additionalMarginWidthInPoints) {
            localVarQueryParameters['additionalMarginWidthInPoints'] = ObjectSerializer.serialize(additionalMarginWidthInPoints, "number");
        }

        if (compressSvgGraphicsIfAny !== undefined && null !== compressSvgGraphicsIfAny) {
            localVarQueryParameters['compressSvgGraphicsIfAny'] = ObjectSerializer.serialize(compressSvgGraphicsIfAny, "boolean");
        }

        if (convertMarkedContentToLayers !== undefined && null !== convertMarkedContentToLayers) {
            localVarQueryParameters['convertMarkedContentToLayers'] = ObjectSerializer.serialize(convertMarkedContentToLayers, "boolean");
        }

        if (defaultFontName !== undefined && null !== defaultFontName) {
            localVarQueryParameters['defaultFontName'] = ObjectSerializer.serialize(defaultFontName, "string");
        }

        if (documentType !== undefined && null !== documentType) {
            localVarQueryParameters['documentType'] = ObjectSerializer.serialize(documentType, "string");
        }

        if (fixedLayout !== undefined && null !== fixedLayout) {
            localVarQueryParameters['fixedLayout'] = ObjectSerializer.serialize(fixedLayout, "boolean");
        }

        if (imageResolution !== undefined && null !== imageResolution) {
            localVarQueryParameters['imageResolution'] = ObjectSerializer.serialize(imageResolution, "number");
        }

        if (minimalLineWidth !== undefined && null !== minimalLineWidth) {
            localVarQueryParameters['minimalLineWidth'] = ObjectSerializer.serialize(minimalLineWidth, "number");
        }

        if (preventGlyphsGrouping !== undefined && null !== preventGlyphsGrouping) {
            localVarQueryParameters['preventGlyphsGrouping'] = ObjectSerializer.serialize(preventGlyphsGrouping, "boolean");
        }

        if (splitCssIntoPages !== undefined && null !== splitCssIntoPages) {
            localVarQueryParameters['splitCssIntoPages'] = ObjectSerializer.serialize(splitCssIntoPages, "boolean");
        }

        if (splitIntoPages !== undefined && null !== splitIntoPages) {
            localVarQueryParameters['splitIntoPages'] = ObjectSerializer.serialize(splitIntoPages, "boolean");
        }

        if (useZOrder !== undefined && null !== useZOrder) {
            localVarQueryParameters['useZOrder'] = ObjectSerializer.serialize(useZOrder, "boolean");
        }

        if (antialiasingProcessing !== undefined && null !== antialiasingProcessing) {
            localVarQueryParameters['antialiasingProcessing'] = ObjectSerializer.serialize(antialiasingProcessing, "string");
        }

        if (cssClassNamesPrefix !== undefined && null !== cssClassNamesPrefix) {
            localVarQueryParameters['cssClassNamesPrefix'] = ObjectSerializer.serialize(cssClassNamesPrefix, "string");
        }

        if (explicitListOfSavedPages !== undefined && null !== explicitListOfSavedPages) {
            localVarQueryParameters['explicitListOfSavedPages'] = ObjectSerializer.serialize(explicitListOfSavedPages, "Array<number>");
        }

        if (fontEncodingStrategy !== undefined && null !== fontEncodingStrategy) {
            localVarQueryParameters['fontEncodingStrategy'] = ObjectSerializer.serialize(fontEncodingStrategy, "string");
        }

        if (fontSavingMode !== undefined && null !== fontSavingMode) {
            localVarQueryParameters['fontSavingMode'] = ObjectSerializer.serialize(fontSavingMode, "string");
        }

        if (htmlMarkupGenerationMode !== undefined && null !== htmlMarkupGenerationMode) {
            localVarQueryParameters['htmlMarkupGenerationMode'] = ObjectSerializer.serialize(htmlMarkupGenerationMode, "string");
        }

        if (lettersPositioningMethod !== undefined && null !== lettersPositioningMethod) {
            localVarQueryParameters['lettersPositioningMethod'] = ObjectSerializer.serialize(lettersPositioningMethod, "string");
        }

        if (pagesFlowTypeDependsOnViewersScreenSize !== undefined && null !== pagesFlowTypeDependsOnViewersScreenSize) {
            localVarQueryParameters['pagesFlowTypeDependsOnViewersScreenSize'] = ObjectSerializer.serialize(pagesFlowTypeDependsOnViewersScreenSize, "boolean");
        }

        if (partsEmbeddingMode !== undefined && null !== partsEmbeddingMode) {
            localVarQueryParameters['partsEmbeddingMode'] = ObjectSerializer.serialize(partsEmbeddingMode, "string");
        }

        if (rasterImagesSavingMode !== undefined && null !== rasterImagesSavingMode) {
            localVarQueryParameters['rasterImagesSavingMode'] = ObjectSerializer.serialize(rasterImagesSavingMode, "string");
        }

        if (removeEmptyAreasOnTopAndBottom !== undefined && null !== removeEmptyAreasOnTopAndBottom) {
            localVarQueryParameters['removeEmptyAreasOnTopAndBottom'] = ObjectSerializer.serialize(removeEmptyAreasOnTopAndBottom, "boolean");
        }

        if (saveShadowedTextsAsTransparentTexts !== undefined && null !== saveShadowedTextsAsTransparentTexts) {
            localVarQueryParameters['saveShadowedTextsAsTransparentTexts'] = ObjectSerializer.serialize(saveShadowedTextsAsTransparentTexts, "boolean");
        }

        if (saveTransparentTexts !== undefined && null !== saveTransparentTexts) {
            localVarQueryParameters['saveTransparentTexts'] = ObjectSerializer.serialize(saveTransparentTexts, "boolean");
        }

        if (specialFolderForAllImages !== undefined && null !== specialFolderForAllImages) {
            localVarQueryParameters['specialFolderForAllImages'] = ObjectSerializer.serialize(specialFolderForAllImages, "string");
        }

        if (specialFolderForSvgImages !== undefined && null !== specialFolderForSvgImages) {
            localVarQueryParameters['specialFolderForSvgImages'] = ObjectSerializer.serialize(specialFolderForSvgImages, "string");
        }

        if (trySaveTextUnderliningAndStrikeoutingInCss !== undefined && null !== trySaveTextUnderliningAndStrikeoutingInCss) {
            localVarQueryParameters['trySaveTextUnderliningAndStrikeoutingInCss'] = ObjectSerializer.serialize(trySaveTextUnderliningAndStrikeoutingInCss, "boolean");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (flowLayoutParagraphFullWidth !== undefined && null !== flowLayoutParagraphFullWidth) {
            localVarQueryParameters['flowLayoutParagraphFullWidth'] = ObjectSerializer.serialize(flowLayoutParagraphFullWidth, "boolean");
        }

        if (outputFormat !== undefined && null !== outputFormat) {
            localVarQueryParameters['outputFormat'] = ObjectSerializer.serialize(outputFormat, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to MOBIXML format and uploads resulting ZIP archive file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.mobixml)
     * @param storage The document storage.
     * @param file A file to be converted.
     */
    public async putPdfInRequestToMobiXml (outPath: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/mobixml';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToMobiXml.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to PdfA format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.pdf)
     * @param type Type of PdfA format.
     * @param storage The document storage.
     * @param password The password (Base64).
     * @param file A file to be converted.
     */
    public async putPdfInRequestToPdfA (outPath: string, type: string, storage?: string, password?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/pdfa';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToPdfA.');
        }

        // verify required parameter 'type' is not null or undefined
        if (type === null || type === undefined) {
            throw new Error('Required parameter type was null or undefined when calling putPdfInRequestToPdfA.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (type !== undefined && null !== type) {
            localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to PPTX format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.pptx)
     * @param separateImages Separate images.
     * @param slidesAsImages Slides as images.
     * @param storage The document storage.
     * @param password Base64 encoded password.
     * @param file A file to be converted.
     */
    public async putPdfInRequestToPptx (outPath: string, separateImages?: boolean, slidesAsImages?: boolean, storage?: string, password?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/pptx';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToPptx.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (separateImages !== undefined && null !== separateImages) {
            localVarQueryParameters['separateImages'] = ObjectSerializer.serialize(separateImages, "boolean");
        }

        if (slidesAsImages !== undefined && null !== slidesAsImages) {
            localVarQueryParameters['slidesAsImages'] = ObjectSerializer.serialize(slidesAsImages, "boolean");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to SVG format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.svg)
     * @param storage The document storage.
     * @param password The password (Base64).
     * @param file A file to be converted.
     */
    public async putPdfInRequestToSvg (outPath: string, storage?: string, password?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/svg';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToSvg.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to TeX format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.tex)
     * @param storage The document storage.
     * @param file A file to be converted.
     */
    public async putPdfInRequestToTeX (outPath: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/tex';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToTeX.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to TIFF format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.tiff)
     * @param brightness Image brightness.
     * @param compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None.
     * @param colorDepth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp.
     * @param leftMargin Left image margin.
     * @param rightMargin Right image margin.
     * @param topMargin Top image margin.
     * @param bottomMargin Bottom image margin.
     * @param orientation Image orientation. Possible values are: None, Landscape, Portait.
     * @param skipBlankPages Skip blank pages flag.
     * @param width Image width.
     * @param height Image height.
     * @param xResolution Horizontal resolution.
     * @param yResolution Vertical resolution.
     * @param pageIndex Start page to export.
     * @param pageCount Number of pages to export.
     * @param storage The document storage.
     * @param file A file to be converted.
     */
    public async putPdfInRequestToTiff (outPath: string, brightness?: number, compression?: string, colorDepth?: string, leftMargin?: number, rightMargin?: number, topMargin?: number, bottomMargin?: number, orientation?: string, skipBlankPages?: boolean, width?: number, height?: number, xResolution?: number, yResolution?: number, pageIndex?: number, pageCount?: number, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/tiff';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToTiff.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (brightness !== undefined && null !== brightness) {
            localVarQueryParameters['brightness'] = ObjectSerializer.serialize(brightness, "number");
        }

        if (compression !== undefined && null !== compression) {
            localVarQueryParameters['compression'] = ObjectSerializer.serialize(compression, "string");
        }

        if (colorDepth !== undefined && null !== colorDepth) {
            localVarQueryParameters['colorDepth'] = ObjectSerializer.serialize(colorDepth, "string");
        }

        if (leftMargin !== undefined && null !== leftMargin) {
            localVarQueryParameters['leftMargin'] = ObjectSerializer.serialize(leftMargin, "number");
        }

        if (rightMargin !== undefined && null !== rightMargin) {
            localVarQueryParameters['rightMargin'] = ObjectSerializer.serialize(rightMargin, "number");
        }

        if (topMargin !== undefined && null !== topMargin) {
            localVarQueryParameters['topMargin'] = ObjectSerializer.serialize(topMargin, "number");
        }

        if (bottomMargin !== undefined && null !== bottomMargin) {
            localVarQueryParameters['bottomMargin'] = ObjectSerializer.serialize(bottomMargin, "number");
        }

        if (orientation !== undefined && null !== orientation) {
            localVarQueryParameters['orientation'] = ObjectSerializer.serialize(orientation, "string");
        }

        if (skipBlankPages !== undefined && null !== skipBlankPages) {
            localVarQueryParameters['skipBlankPages'] = ObjectSerializer.serialize(skipBlankPages, "boolean");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (xResolution !== undefined && null !== xResolution) {
            localVarQueryParameters['xResolution'] = ObjectSerializer.serialize(xResolution, "number");
        }

        if (yResolution !== undefined && null !== yResolution) {
            localVarQueryParameters['yResolution'] = ObjectSerializer.serialize(yResolution, "number");
        }

        if (pageIndex !== undefined && null !== pageIndex) {
            localVarQueryParameters['pageIndex'] = ObjectSerializer.serialize(pageIndex, "number");
        }

        if (pageCount !== undefined && null !== pageCount) {
            localVarQueryParameters['pageCount'] = ObjectSerializer.serialize(pageCount, "number");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to XLS format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.xls)
     * @param insertBlankColumnAtFirst Insert blank column at first
     * @param minimizeTheNumberOfWorksheets Minimize the number of worksheets
     * @param scaleFactor Scale factor (Obsolete)
     * @param uniformWorksheets Uniform worksheets
     * @param storage The document storage.
     * @param password The password (Base64).
     * @param file A file to be converted.
     */
    public async putPdfInRequestToXls (outPath: string, insertBlankColumnAtFirst?: boolean, minimizeTheNumberOfWorksheets?: boolean, scaleFactor?: number, uniformWorksheets?: boolean, storage?: string, password?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/xls';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToXls.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (insertBlankColumnAtFirst !== undefined && null !== insertBlankColumnAtFirst) {
            localVarQueryParameters['insertBlankColumnAtFirst'] = ObjectSerializer.serialize(insertBlankColumnAtFirst, "boolean");
        }

        if (minimizeTheNumberOfWorksheets !== undefined && null !== minimizeTheNumberOfWorksheets) {
            localVarQueryParameters['minimizeTheNumberOfWorksheets'] = ObjectSerializer.serialize(minimizeTheNumberOfWorksheets, "boolean");
        }

        if (scaleFactor !== undefined && null !== scaleFactor) {
            localVarQueryParameters['scaleFactor'] = ObjectSerializer.serialize(scaleFactor, "number");
        }

        if (uniformWorksheets !== undefined && null !== uniformWorksheets) {
            localVarQueryParameters['uniformWorksheets'] = ObjectSerializer.serialize(uniformWorksheets, "boolean");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to XLSX format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.xlsx)
     * @param insertBlankColumnAtFirst Insert blank column at first
     * @param minimizeTheNumberOfWorksheets Minimize the number of worksheets
     * @param scaleFactor Scale factor (Obsolete)
     * @param uniformWorksheets Uniform worksheets
     * @param storage The document storage.
     * @param password The password (Base64).
     * @param file A file to be converted.
     */
    public async putPdfInRequestToXlsx (outPath: string, insertBlankColumnAtFirst?: boolean, minimizeTheNumberOfWorksheets?: boolean, scaleFactor?: number, uniformWorksheets?: boolean, storage?: string, password?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/xlsx';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToXlsx.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (insertBlankColumnAtFirst !== undefined && null !== insertBlankColumnAtFirst) {
            localVarQueryParameters['insertBlankColumnAtFirst'] = ObjectSerializer.serialize(insertBlankColumnAtFirst, "boolean");
        }

        if (minimizeTheNumberOfWorksheets !== undefined && null !== minimizeTheNumberOfWorksheets) {
            localVarQueryParameters['minimizeTheNumberOfWorksheets'] = ObjectSerializer.serialize(minimizeTheNumberOfWorksheets, "boolean");
        }

        if (scaleFactor !== undefined && null !== scaleFactor) {
            localVarQueryParameters['scaleFactor'] = ObjectSerializer.serialize(scaleFactor, "number");
        }

        if (uniformWorksheets !== undefined && null !== uniformWorksheets) {
            localVarQueryParameters['uniformWorksheets'] = ObjectSerializer.serialize(uniformWorksheets, "boolean");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to XML format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.xml)
     * @param storage The document storage.
     * @param file A file to be converted.
     */
    public async putPdfInRequestToXml (outPath: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/xml';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToXml.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (in request content) to XPS format and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.xps)
     * @param storage The document storage.
     * @param file A file to be converted.
     */
    public async putPdfInRequestToXps (outPath: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/xps';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInRequestToXps.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to APS format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.aps)
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async putPdfInStorageToAps (name: string, outPath: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/aps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToAps.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToAps.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to DOC format and uploads resulting file to storage.
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.doc)
     * @param addReturnToLineEnd Add return to line end.
     * @param format Allows to specify .doc or .docx file format.
     * @param imageResolutionX Image resolution X.
     * @param imageResolutionY Image resolution Y.
     * @param maxDistanceBetweenTextLines Max distance between text lines.
     * @param mode Allows to control how a PDF document is converted into a word processing document.
     * @param recognizeBullets Recognize bullets.
     * @param relativeHorizontalProximity Relative horizontal proximity.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPdfInStorageToDoc (name: string, outPath: string, addReturnToLineEnd?: boolean, format?: string, imageResolutionX?: number, imageResolutionY?: number, maxDistanceBetweenTextLines?: number, mode?: string, recognizeBullets?: boolean, relativeHorizontalProximity?: number, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/doc'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToDoc.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToDoc.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (addReturnToLineEnd !== undefined && null !== addReturnToLineEnd) {
            localVarQueryParameters['addReturnToLineEnd'] = ObjectSerializer.serialize(addReturnToLineEnd, "boolean");
        }

        if (format !== undefined && null !== format) {
            localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "string");
        }

        if (imageResolutionX !== undefined && null !== imageResolutionX) {
            localVarQueryParameters['imageResolutionX'] = ObjectSerializer.serialize(imageResolutionX, "number");
        }

        if (imageResolutionY !== undefined && null !== imageResolutionY) {
            localVarQueryParameters['imageResolutionY'] = ObjectSerializer.serialize(imageResolutionY, "number");
        }

        if (maxDistanceBetweenTextLines !== undefined && null !== maxDistanceBetweenTextLines) {
            localVarQueryParameters['maxDistanceBetweenTextLines'] = ObjectSerializer.serialize(maxDistanceBetweenTextLines, "number");
        }

        if (mode !== undefined && null !== mode) {
            localVarQueryParameters['mode'] = ObjectSerializer.serialize(mode, "string");
        }

        if (recognizeBullets !== undefined && null !== recognizeBullets) {
            localVarQueryParameters['recognizeBullets'] = ObjectSerializer.serialize(recognizeBullets, "boolean");
        }

        if (relativeHorizontalProximity !== undefined && null !== relativeHorizontalProximity) {
            localVarQueryParameters['relativeHorizontalProximity'] = ObjectSerializer.serialize(relativeHorizontalProximity, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to EPUB format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.epub)
     * @param contentRecognitionMode Property tunes conversion for this or that desirable method of recognition of content.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async putPdfInStorageToEpub (name: string, outPath: string, contentRecognitionMode?: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/epub'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToEpub.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToEpub.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (contentRecognitionMode !== undefined && null !== contentRecognitionMode) {
            localVarQueryParameters['contentRecognitionMode'] = ObjectSerializer.serialize(contentRecognitionMode, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to Html format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.html)
     * @param additionalMarginWidthInPoints Defines width of margin that will be forcibly left around that output HTML-areas.
     * @param compressSvgGraphicsIfAny The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving.
     * @param convertMarkedContentToLayers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with \&quot;data-pdflayer\&quot; attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content.
     * @param defaultFontName Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used.
     * @param documentType Result document type.
     * @param fixedLayout The value indicating whether that HTML is created as fixed layout.
     * @param imageResolution Resolution for image rendering.
     * @param minimalLineWidth This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers.
     * @param preventGlyphsGrouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true.
     * @param splitCssIntoPages When multipage-mode selected(i.e &#39;SplitIntoPages&#39; is &#39;true&#39;), then this attribute defines whether should be created separate CSS-file for each result HTML page.
     * @param splitIntoPages The flag that indicates whether each page of source document will be converted into it&#39;s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages.
     * @param useZOrder If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects.
     * @param antialiasingProcessing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML.
     * @param cssClassNamesPrefix When PDFtoHTML converter generates result CSSs, CSS class names (something like \&quot;.stl_01 {}\&quot; ... \&quot;.stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix.
     * @param explicitListOfSavedPages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1...[NumberOfPagesInConvertedDocument]) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF.
     * @param fontEncodingStrategy Defines encoding special rule to tune PDF decoding for current document.
     * @param fontSavingMode Defines font saving mode that will be used during saving of PDF to desirable format.
     * @param htmlMarkupGenerationMode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments.
     * @param lettersPositioningMethod The mode of positioning of letters in words in result HTML.
     * @param pagesFlowTypeDependsOnViewersScreenSize If attribute &#39;SplitOnPages&#x3D;false&#39;, than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer.
     * @param partsEmbeddingMode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities.
     * @param rasterImagesSavingMode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML.
     * @param removeEmptyAreasOnTopAndBottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any).
     * @param saveShadowedTextsAsTransparentTexts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard).
     * @param saveTransparentTexts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML.
     * @param specialFolderForAllImages The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file.
     * @param specialFolderForSvgImages The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file.
     * @param trySaveTextUnderliningAndStrikeoutingInCss PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param flowLayoutParagraphFullWidth This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false.
     * @param outputFormat This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is \&quot;Zip\&quot; or missed (default). In case of the \&quot;Folder\&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file.
     */
    public async putPdfInStorageToHtml (name: string, outPath: string, additionalMarginWidthInPoints?: number, compressSvgGraphicsIfAny?: boolean, convertMarkedContentToLayers?: boolean, defaultFontName?: string, documentType?: string, fixedLayout?: boolean, imageResolution?: number, minimalLineWidth?: number, preventGlyphsGrouping?: boolean, splitCssIntoPages?: boolean, splitIntoPages?: boolean, useZOrder?: boolean, antialiasingProcessing?: string, cssClassNamesPrefix?: string, explicitListOfSavedPages?: Array<number>, fontEncodingStrategy?: string, fontSavingMode?: string, htmlMarkupGenerationMode?: string, lettersPositioningMethod?: string, pagesFlowTypeDependsOnViewersScreenSize?: boolean, partsEmbeddingMode?: string, rasterImagesSavingMode?: string, removeEmptyAreasOnTopAndBottom?: boolean, saveShadowedTextsAsTransparentTexts?: boolean, saveTransparentTexts?: boolean, specialFolderForAllImages?: string, specialFolderForSvgImages?: string, trySaveTextUnderliningAndStrikeoutingInCss?: boolean, folder?: string, storage?: string, flowLayoutParagraphFullWidth?: boolean, outputFormat?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/html'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToHtml.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToHtml.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (additionalMarginWidthInPoints !== undefined && null !== additionalMarginWidthInPoints) {
            localVarQueryParameters['additionalMarginWidthInPoints'] = ObjectSerializer.serialize(additionalMarginWidthInPoints, "number");
        }

        if (compressSvgGraphicsIfAny !== undefined && null !== compressSvgGraphicsIfAny) {
            localVarQueryParameters['compressSvgGraphicsIfAny'] = ObjectSerializer.serialize(compressSvgGraphicsIfAny, "boolean");
        }

        if (convertMarkedContentToLayers !== undefined && null !== convertMarkedContentToLayers) {
            localVarQueryParameters['convertMarkedContentToLayers'] = ObjectSerializer.serialize(convertMarkedContentToLayers, "boolean");
        }

        if (defaultFontName !== undefined && null !== defaultFontName) {
            localVarQueryParameters['defaultFontName'] = ObjectSerializer.serialize(defaultFontName, "string");
        }

        if (documentType !== undefined && null !== documentType) {
            localVarQueryParameters['documentType'] = ObjectSerializer.serialize(documentType, "string");
        }

        if (fixedLayout !== undefined && null !== fixedLayout) {
            localVarQueryParameters['fixedLayout'] = ObjectSerializer.serialize(fixedLayout, "boolean");
        }

        if (imageResolution !== undefined && null !== imageResolution) {
            localVarQueryParameters['imageResolution'] = ObjectSerializer.serialize(imageResolution, "number");
        }

        if (minimalLineWidth !== undefined && null !== minimalLineWidth) {
            localVarQueryParameters['minimalLineWidth'] = ObjectSerializer.serialize(minimalLineWidth, "number");
        }

        if (preventGlyphsGrouping !== undefined && null !== preventGlyphsGrouping) {
            localVarQueryParameters['preventGlyphsGrouping'] = ObjectSerializer.serialize(preventGlyphsGrouping, "boolean");
        }

        if (splitCssIntoPages !== undefined && null !== splitCssIntoPages) {
            localVarQueryParameters['splitCssIntoPages'] = ObjectSerializer.serialize(splitCssIntoPages, "boolean");
        }

        if (splitIntoPages !== undefined && null !== splitIntoPages) {
            localVarQueryParameters['splitIntoPages'] = ObjectSerializer.serialize(splitIntoPages, "boolean");
        }

        if (useZOrder !== undefined && null !== useZOrder) {
            localVarQueryParameters['useZOrder'] = ObjectSerializer.serialize(useZOrder, "boolean");
        }

        if (antialiasingProcessing !== undefined && null !== antialiasingProcessing) {
            localVarQueryParameters['antialiasingProcessing'] = ObjectSerializer.serialize(antialiasingProcessing, "string");
        }

        if (cssClassNamesPrefix !== undefined && null !== cssClassNamesPrefix) {
            localVarQueryParameters['cssClassNamesPrefix'] = ObjectSerializer.serialize(cssClassNamesPrefix, "string");
        }

        if (explicitListOfSavedPages !== undefined && null !== explicitListOfSavedPages) {
            localVarQueryParameters['explicitListOfSavedPages'] = ObjectSerializer.serialize(explicitListOfSavedPages, "Array<number>");
        }

        if (fontEncodingStrategy !== undefined && null !== fontEncodingStrategy) {
            localVarQueryParameters['fontEncodingStrategy'] = ObjectSerializer.serialize(fontEncodingStrategy, "string");
        }

        if (fontSavingMode !== undefined && null !== fontSavingMode) {
            localVarQueryParameters['fontSavingMode'] = ObjectSerializer.serialize(fontSavingMode, "string");
        }

        if (htmlMarkupGenerationMode !== undefined && null !== htmlMarkupGenerationMode) {
            localVarQueryParameters['htmlMarkupGenerationMode'] = ObjectSerializer.serialize(htmlMarkupGenerationMode, "string");
        }

        if (lettersPositioningMethod !== undefined && null !== lettersPositioningMethod) {
            localVarQueryParameters['lettersPositioningMethod'] = ObjectSerializer.serialize(lettersPositioningMethod, "string");
        }

        if (pagesFlowTypeDependsOnViewersScreenSize !== undefined && null !== pagesFlowTypeDependsOnViewersScreenSize) {
            localVarQueryParameters['pagesFlowTypeDependsOnViewersScreenSize'] = ObjectSerializer.serialize(pagesFlowTypeDependsOnViewersScreenSize, "boolean");
        }

        if (partsEmbeddingMode !== undefined && null !== partsEmbeddingMode) {
            localVarQueryParameters['partsEmbeddingMode'] = ObjectSerializer.serialize(partsEmbeddingMode, "string");
        }

        if (rasterImagesSavingMode !== undefined && null !== rasterImagesSavingMode) {
            localVarQueryParameters['rasterImagesSavingMode'] = ObjectSerializer.serialize(rasterImagesSavingMode, "string");
        }

        if (removeEmptyAreasOnTopAndBottom !== undefined && null !== removeEmptyAreasOnTopAndBottom) {
            localVarQueryParameters['removeEmptyAreasOnTopAndBottom'] = ObjectSerializer.serialize(removeEmptyAreasOnTopAndBottom, "boolean");
        }

        if (saveShadowedTextsAsTransparentTexts !== undefined && null !== saveShadowedTextsAsTransparentTexts) {
            localVarQueryParameters['saveShadowedTextsAsTransparentTexts'] = ObjectSerializer.serialize(saveShadowedTextsAsTransparentTexts, "boolean");
        }

        if (saveTransparentTexts !== undefined && null !== saveTransparentTexts) {
            localVarQueryParameters['saveTransparentTexts'] = ObjectSerializer.serialize(saveTransparentTexts, "boolean");
        }

        if (specialFolderForAllImages !== undefined && null !== specialFolderForAllImages) {
            localVarQueryParameters['specialFolderForAllImages'] = ObjectSerializer.serialize(specialFolderForAllImages, "string");
        }

        if (specialFolderForSvgImages !== undefined && null !== specialFolderForSvgImages) {
            localVarQueryParameters['specialFolderForSvgImages'] = ObjectSerializer.serialize(specialFolderForSvgImages, "string");
        }

        if (trySaveTextUnderliningAndStrikeoutingInCss !== undefined && null !== trySaveTextUnderliningAndStrikeoutingInCss) {
            localVarQueryParameters['trySaveTextUnderliningAndStrikeoutingInCss'] = ObjectSerializer.serialize(trySaveTextUnderliningAndStrikeoutingInCss, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (flowLayoutParagraphFullWidth !== undefined && null !== flowLayoutParagraphFullWidth) {
            localVarQueryParameters['flowLayoutParagraphFullWidth'] = ObjectSerializer.serialize(flowLayoutParagraphFullWidth, "boolean");
        }

        if (outputFormat !== undefined && null !== outputFormat) {
            localVarQueryParameters['outputFormat'] = ObjectSerializer.serialize(outputFormat, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to MOBIXML format and uploads resulting ZIP archive file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.mobixml)
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async putPdfInStorageToMobiXml (name: string, outPath: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/mobixml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToMobiXml.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToMobiXml.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to PdfA format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.pdf)
     * @param type Type of PdfA format.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPdfInStorageToPdfA (name: string, outPath: string, type: string, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/pdfa'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToPdfA.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToPdfA.');
        }

        // verify required parameter 'type' is not null or undefined
        if (type === null || type === undefined) {
            throw new Error('Required parameter type was null or undefined when calling putPdfInStorageToPdfA.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (type !== undefined && null !== type) {
            localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to PPTX format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.pptx)
     * @param separateImages Separate images.
     * @param slidesAsImages Slides as images.
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password Base64 encoded password.
     */
    public async putPdfInStorageToPptx (name: string, outPath: string, separateImages?: boolean, slidesAsImages?: boolean, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/pptx'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToPptx.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToPptx.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (separateImages !== undefined && null !== separateImages) {
            localVarQueryParameters['separateImages'] = ObjectSerializer.serialize(separateImages, "boolean");
        }

        if (slidesAsImages !== undefined && null !== slidesAsImages) {
            localVarQueryParameters['slidesAsImages'] = ObjectSerializer.serialize(slidesAsImages, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to SVG format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.svg)
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPdfInStorageToSvg (name: string, outPath: string, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/svg'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToSvg.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToSvg.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to TeX format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.tex)
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async putPdfInStorageToTeX (name: string, outPath: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/tex'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToTeX.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToTeX.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to TIFF format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.tiff)
     * @param brightness Image brightness.
     * @param compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None.
     * @param colorDepth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp.
     * @param leftMargin Left image margin.
     * @param rightMargin Right image margin.
     * @param topMargin Top image margin.
     * @param bottomMargin Bottom image margin.
     * @param orientation Image orientation. Possible values are: None, Landscape, Portait.
     * @param skipBlankPages Skip blank pages flag.
     * @param width Image width.
     * @param height Image height.
     * @param xResolution Horizontal resolution.
     * @param yResolution Vertical resolution.
     * @param pageIndex Start page to export.
     * @param pageCount Number of pages to export.
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async putPdfInStorageToTiff (name: string, outPath: string, brightness?: number, compression?: string, colorDepth?: string, leftMargin?: number, rightMargin?: number, topMargin?: number, bottomMargin?: number, orientation?: string, skipBlankPages?: boolean, width?: number, height?: number, xResolution?: number, yResolution?: number, pageIndex?: number, pageCount?: number, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/tiff'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToTiff.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToTiff.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (brightness !== undefined && null !== brightness) {
            localVarQueryParameters['brightness'] = ObjectSerializer.serialize(brightness, "number");
        }

        if (compression !== undefined && null !== compression) {
            localVarQueryParameters['compression'] = ObjectSerializer.serialize(compression, "string");
        }

        if (colorDepth !== undefined && null !== colorDepth) {
            localVarQueryParameters['colorDepth'] = ObjectSerializer.serialize(colorDepth, "string");
        }

        if (leftMargin !== undefined && null !== leftMargin) {
            localVarQueryParameters['leftMargin'] = ObjectSerializer.serialize(leftMargin, "number");
        }

        if (rightMargin !== undefined && null !== rightMargin) {
            localVarQueryParameters['rightMargin'] = ObjectSerializer.serialize(rightMargin, "number");
        }

        if (topMargin !== undefined && null !== topMargin) {
            localVarQueryParameters['topMargin'] = ObjectSerializer.serialize(topMargin, "number");
        }

        if (bottomMargin !== undefined && null !== bottomMargin) {
            localVarQueryParameters['bottomMargin'] = ObjectSerializer.serialize(bottomMargin, "number");
        }

        if (orientation !== undefined && null !== orientation) {
            localVarQueryParameters['orientation'] = ObjectSerializer.serialize(orientation, "string");
        }

        if (skipBlankPages !== undefined && null !== skipBlankPages) {
            localVarQueryParameters['skipBlankPages'] = ObjectSerializer.serialize(skipBlankPages, "boolean");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (xResolution !== undefined && null !== xResolution) {
            localVarQueryParameters['xResolution'] = ObjectSerializer.serialize(xResolution, "number");
        }

        if (yResolution !== undefined && null !== yResolution) {
            localVarQueryParameters['yResolution'] = ObjectSerializer.serialize(yResolution, "number");
        }

        if (pageIndex !== undefined && null !== pageIndex) {
            localVarQueryParameters['pageIndex'] = ObjectSerializer.serialize(pageIndex, "number");
        }

        if (pageCount !== undefined && null !== pageCount) {
            localVarQueryParameters['pageCount'] = ObjectSerializer.serialize(pageCount, "number");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to XLS format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.xls)
     * @param insertBlankColumnAtFirst Insert blank column at first
     * @param minimizeTheNumberOfWorksheets Minimize the number of worksheets
     * @param scaleFactor Scale factor (Obsolete)
     * @param uniformWorksheets Uniform worksheets
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPdfInStorageToXls (name: string, outPath: string, insertBlankColumnAtFirst?: boolean, minimizeTheNumberOfWorksheets?: boolean, scaleFactor?: number, uniformWorksheets?: boolean, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xls'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToXls.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToXls.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (insertBlankColumnAtFirst !== undefined && null !== insertBlankColumnAtFirst) {
            localVarQueryParameters['insertBlankColumnAtFirst'] = ObjectSerializer.serialize(insertBlankColumnAtFirst, "boolean");
        }

        if (minimizeTheNumberOfWorksheets !== undefined && null !== minimizeTheNumberOfWorksheets) {
            localVarQueryParameters['minimizeTheNumberOfWorksheets'] = ObjectSerializer.serialize(minimizeTheNumberOfWorksheets, "boolean");
        }

        if (scaleFactor !== undefined && null !== scaleFactor) {
            localVarQueryParameters['scaleFactor'] = ObjectSerializer.serialize(scaleFactor, "number");
        }

        if (uniformWorksheets !== undefined && null !== uniformWorksheets) {
            localVarQueryParameters['uniformWorksheets'] = ObjectSerializer.serialize(uniformWorksheets, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to XLSX format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.xlsx)
     * @param insertBlankColumnAtFirst Insert blank column at first
     * @param minimizeTheNumberOfWorksheets Minimize the number of worksheets
     * @param scaleFactor Scale factor (Obsolete)
     * @param uniformWorksheets Uniform worksheets
     * @param folder The document folder.
     * @param storage The document storage.
     * @param password The password (Base64).
     */
    public async putPdfInStorageToXlsx (name: string, outPath: string, insertBlankColumnAtFirst?: boolean, minimizeTheNumberOfWorksheets?: boolean, scaleFactor?: number, uniformWorksheets?: boolean, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xlsx'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToXlsx.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToXlsx.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (insertBlankColumnAtFirst !== undefined && null !== insertBlankColumnAtFirst) {
            localVarQueryParameters['insertBlankColumnAtFirst'] = ObjectSerializer.serialize(insertBlankColumnAtFirst, "boolean");
        }

        if (minimizeTheNumberOfWorksheets !== undefined && null !== minimizeTheNumberOfWorksheets) {
            localVarQueryParameters['minimizeTheNumberOfWorksheets'] = ObjectSerializer.serialize(minimizeTheNumberOfWorksheets, "boolean");
        }

        if (scaleFactor !== undefined && null !== scaleFactor) {
            localVarQueryParameters['scaleFactor'] = ObjectSerializer.serialize(scaleFactor, "number");
        }

        if (uniformWorksheets !== undefined && null !== uniformWorksheets) {
            localVarQueryParameters['uniformWorksheets'] = ObjectSerializer.serialize(uniformWorksheets, "boolean");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to XML format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.xml)
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async putPdfInStorageToXml (name: string, outPath: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToXml.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToXml.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document (located on storage) to XPS format and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.xps)
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async putPdfInStorageToXps (name: string, outPath: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPdfInStorageToXps.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putPdfInStorageToXps.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document polyline annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putPolyLineAnnotation (name: string, annotationId: string, annotation: PolyLineAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PolyLineAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/polyline/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPolyLineAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putPolyLineAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putPolyLineAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "PolyLineAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PolyLineAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document polygon annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putPolygonAnnotation (name: string, annotationId: string, annotation: PolygonAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PolygonAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/polygon/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPolygonAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putPolygonAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putPolygonAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "PolygonAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PolygonAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document popup annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putPopupAnnotation (name: string, annotationId: string, annotation: PopupAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: PopupAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/popup/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPopupAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putPopupAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putPopupAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "PopupAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "PopupAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update privilege document.
     * @param name The document name.
     * @param privileges Document privileges. DocumentPrivilege
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putPrivileges (name: string, privileges: DocumentPrivilege, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/privileges'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPrivileges.');
        }

        // verify required parameter 'privileges' is not null or undefined
        if (privileges === null || privileges === undefined) {
            throw new Error('Required parameter privileges was null or undefined when calling putPrivileges.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(privileges, "DocumentPrivilege")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert PS file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.ps)
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putPsInStorageToPdf (name: string, srcPath: string, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/ps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putPsInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putPsInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document RadioButton field
     * @param name The document name.
     * @param fieldName The field name.
     * @param field The field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putRadioButtonField (name: string, fieldName: string, field: RadioButtonField, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: RadioButtonFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/radiobutton/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putRadioButtonField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling putRadioButtonField.');
        }

        // verify required parameter 'field' is not null or undefined
        if (field === null || field === undefined) {
            throw new Error('Required parameter field was null or undefined when calling putRadioButtonField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(field, "RadioButtonField")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "RadioButtonFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document redaction annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param apply Apply redaction immediately after adding.
     */
    public async putRedactionAnnotation (name: string, annotationId: string, annotation: RedactionAnnotation, storage?: string, folder?: string, apply?: boolean) : Promise<{ response: http.IncomingMessage; body: RedactionAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/redaction/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putRedactionAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putRedactionAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putRedactionAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (apply !== undefined && null !== apply) {
            localVarQueryParameters['apply'] = ObjectSerializer.serialize(apply, "boolean");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "RedactionAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "RedactionAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document image.
     * @param name The document name.
     * @param imageId The image ID.
     * @param imageFilePath Path to image file if specified. Request content is used otherwise.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param image Image file.
     */
    public async putReplaceImage (name: string, imageId: string, imageFilePath?: string, storage?: string, folder?: string, image?: Buffer) : Promise<{ response: http.IncomingMessage; body: ImageResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/{imageId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'imageId' + '}', encodeURIComponent(String(imageId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putReplaceImage.');
        }

        // verify required parameter 'imageId' is not null or undefined
        if (imageId === null || imageId === undefined) {
            throw new Error('Required parameter imageId was null or undefined when calling putReplaceImage.');
        }

        if (imageFilePath !== undefined && null !== imageFilePath) {
            localVarQueryParameters['imageFilePath'] = ObjectSerializer.serialize(imageFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (image !== undefined) {
            localVarFormParams['image'] = image;
            fileData = image;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ImageResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document multiple image.
     * @param name The document name.
     * @param imageIds The image IDs.
     * @param imageFilePath Path to image file if specified. Request content is used otherwise.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param image Image file.
     */
    public async putReplaceMultipleImage (name: string, imageIds: Array<string>, imageFilePath?: string, storage?: string, folder?: string, image?: Buffer) : Promise<{ response: http.IncomingMessage; body: ImagesResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/images/replace'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putReplaceMultipleImage.');
        }

        // verify required parameter 'imageIds' is not null or undefined
        if (imageIds === null || imageIds === undefined) {
            throw new Error('Required parameter imageIds was null or undefined when calling putReplaceMultipleImage.');
        }

        if (imageIds !== undefined && null !== imageIds) {
            localVarQueryParameters['imageIds'] = ObjectSerializer.serialize(imageIds, "Array<string>");
        }

        if (imageFilePath !== undefined && null !== imageFilePath) {
            localVarQueryParameters['imageFilePath'] = ObjectSerializer.serialize(imageFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (image !== undefined) {
            localVarFormParams['image'] = image;
            fileData = image;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ImagesResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document screen annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putScreenAnnotation (name: string, annotationId: string, annotation: ScreenAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: ScreenAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/screen/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putScreenAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putScreenAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putScreenAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "ScreenAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "ScreenAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document screen annotation content to storage
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param outFilePath The output file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putScreenAnnotationDataExtract (name: string, annotationId: string, outFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/screen/{annotationId}/data/extract'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putScreenAnnotationDataExtract.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putScreenAnnotationDataExtract.');
        }

        // verify required parameter 'outFilePath' is not null or undefined
        if (outFilePath === null || outFilePath === undefined) {
            throw new Error('Required parameter outFilePath was null or undefined when calling putScreenAnnotationDataExtract.');
        }

        if (outFilePath !== undefined && null !== outFilePath) {
            localVarQueryParameters['outFilePath'] = ObjectSerializer.serialize(outFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Create searchable PDF document. Generate OCR layer for images in input PDF document.
     * @param name The document name.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param lang language for OCR engine. Possible values: eng, ara, bel, ben, bul, ces, dan, deu, ell, fin, fra, heb, hin, ind, isl, ita, jpn, kor, nld, nor, pol, por, ron, rus, spa, swe, tha, tur, ukr, vie, chi_sim, chi_tra or thier combination e.g. eng,rus 
     */
    public async putSearchableDocument (name: string, storage?: string, folder?: string, lang?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/ocr'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putSearchableDocument.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (lang !== undefined && null !== lang) {
            localVarQueryParameters['lang'] = ObjectSerializer.serialize(lang, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Add/update document property.
     * @param name The document name.
     * @param propertyName Property name.
     * @param value Property value.
     * @param storage The document storage.
     * @param folder The document folder.
     * @param password The password (Base64).
     */
    public async putSetProperty (name: string, propertyName: string, value: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: DocumentPropertyResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/documentproperties/{propertyName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'propertyName' + '}', encodeURIComponent(String(propertyName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putSetProperty.');
        }

        // verify required parameter 'propertyName' is not null or undefined
        if (propertyName === null || propertyName === undefined) {
            throw new Error('Required parameter propertyName was null or undefined when calling putSetProperty.');
        }

        // verify required parameter 'value' is not null or undefined
        if (value === null || value === undefined) {
            throw new Error('Required parameter value was null or undefined when calling putSetProperty.');
        }

        if (value !== undefined && null !== value) {
            localVarQueryParameters['value'] = ObjectSerializer.serialize(value, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (password !== undefined && null !== password) {
            localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "DocumentPropertyResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document signature field.
     * @param name The document name.
     * @param fieldName The field name.
     * @param field The field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putSignatureField (name: string, fieldName: string, field: SignatureField, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SignatureFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/signature/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putSignatureField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling putSignatureField.');
        }

        // verify required parameter 'field' is not null or undefined
        if (field === null || field === undefined) {
            throw new Error('Required parameter field was null or undefined when calling putSignatureField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(field, "SignatureField")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SignatureFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document sound annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putSoundAnnotation (name: string, annotationId: string, annotation: SoundAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SoundAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/sound/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putSoundAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putSoundAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putSoundAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "SoundAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SoundAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document sound annotation content to storage
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param outFilePath The output file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putSoundAnnotationDataExtract (name: string, annotationId: string, outFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/sound/{annotationId}/data/extract'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putSoundAnnotationDataExtract.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putSoundAnnotationDataExtract.');
        }

        // verify required parameter 'outFilePath' is not null or undefined
        if (outFilePath === null || outFilePath === undefined) {
            throw new Error('Required parameter outFilePath was null or undefined when calling putSoundAnnotationDataExtract.');
        }

        if (outFilePath !== undefined && null !== outFilePath) {
            localVarQueryParameters['outFilePath'] = ObjectSerializer.serialize(outFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document square annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putSquareAnnotation (name: string, annotationId: string, annotation: SquareAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SquareAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/square/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putSquareAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putSquareAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putSquareAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "SquareAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SquareAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document squiggly annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putSquigglyAnnotation (name: string, annotationId: string, annotation: SquigglyAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: SquigglyAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/squiggly/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putSquigglyAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putSquigglyAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putSquigglyAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "SquigglyAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "SquigglyAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document stamp annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putStampAnnotation (name: string, annotationId: string, annotation: StampAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: StampAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/stamp/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putStampAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putStampAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putStampAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "StampAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StampAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Extract document stamp annotation content to storage
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param outFilePath The output file path.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putStampAnnotationDataExtract (name: string, annotationId: string, outFilePath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/stamp/{annotationId}/data/extract'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putStampAnnotationDataExtract.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putStampAnnotationDataExtract.');
        }

        // verify required parameter 'outFilePath' is not null or undefined
        if (outFilePath === null || outFilePath === undefined) {
            throw new Error('Required parameter outFilePath was null or undefined when calling putStampAnnotationDataExtract.');
        }

        if (outFilePath !== undefined && null !== outFilePath) {
            localVarQueryParameters['outFilePath'] = ObjectSerializer.serialize(outFilePath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document StrikeOut annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putStrikeOutAnnotation (name: string, annotationId: string, annotation: StrikeOutAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: StrikeOutAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/strikeout/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putStrikeOutAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putStrikeOutAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putStrikeOutAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "StrikeOutAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StrikeOutAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert SVG file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.svg)
     * @param adjustPageSize Adjust page size
     * @param height Page height
     * @param width Page width
     * @param isLandscape Is page landscaped
     * @param marginLeft Page margin left
     * @param marginBottom Page margin bottom
     * @param marginRight Page margin right
     * @param marginTop Page margin top
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putSvgInStorageToPdf (name: string, srcPath: string, adjustPageSize?: boolean, height?: number, width?: number, isLandscape?: boolean, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/svg'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putSvgInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putSvgInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (adjustPageSize !== undefined && null !== adjustPageSize) {
            localVarQueryParameters['adjustPageSize'] = ObjectSerializer.serialize(adjustPageSize, "boolean");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (isLandscape !== undefined && null !== isLandscape) {
            localVarQueryParameters['isLandscape'] = ObjectSerializer.serialize(isLandscape, "boolean");
        }

        if (marginLeft !== undefined && null !== marginLeft) {
            localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
        }

        if (marginBottom !== undefined && null !== marginBottom) {
            localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
        }

        if (marginRight !== undefined && null !== marginRight) {
            localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
        }

        if (marginTop !== undefined && null !== marginTop) {
            localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document page table.
     * @param name The document name.
     * @param tableId The table ID.
     * @param table The table.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putTable (name: string, tableId: string, table: Table, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/tables/{tableId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'tableId' + '}', encodeURIComponent(String(tableId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putTable.');
        }

        // verify required parameter 'tableId' is not null or undefined
        if (tableId === null || tableId === undefined) {
            throw new Error('Required parameter tableId was null or undefined when calling putTable.');
        }

        // verify required parameter 'table' is not null or undefined
        if (table === null || table === undefined) {
            throw new Error('Required parameter table was null or undefined when calling putTable.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(table, "Table")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert TeX file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.tex)
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putTeXInStorageToPdf (name: string, srcPath: string, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/tex'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putTeXInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putTeXInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document text annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putTextAnnotation (name: string, annotationId: string, annotation: TextAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/text/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putTextAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putTextAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putTextAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "TextAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document text box field
     * @param name The document name.
     * @param fieldName The field name.
     * @param field The field.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putTextBoxField (name: string, fieldName: string, field: TextBoxField, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: TextBoxFieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/textbox/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putTextBoxField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling putTextBoxField.');
        }

        // verify required parameter 'field' is not null or undefined
        if (field === null || field === undefined) {
            throw new Error('Required parameter field was null or undefined when calling putTextBoxField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(field, "TextBoxField")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "TextBoxFieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Replace document underline annotation
     * @param name The document name.
     * @param annotationId The annotation ID.
     * @param annotation Annotation.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putUnderlineAnnotation (name: string, annotationId: string, annotation: UnderlineAnnotation, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: UnderlineAnnotationResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/annotations/underline/{annotationId}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'annotationId' + '}', encodeURIComponent(String(annotationId)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putUnderlineAnnotation.');
        }

        // verify required parameter 'annotationId' is not null or undefined
        if (annotationId === null || annotationId === undefined) {
            throw new Error('Required parameter annotationId was null or undefined when calling putUnderlineAnnotation.');
        }

        // verify required parameter 'annotation' is not null or undefined
        if (annotation === null || annotation === undefined) {
            throw new Error('Required parameter annotation was null or undefined when calling putUnderlineAnnotation.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(annotation, "UnderlineAnnotation")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "UnderlineAnnotationResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update field.
     * @param name The document name.
     * @param fieldName The name of a field to be updated.
     * @param field Field with the field data.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putUpdateField (name: string, fieldName: string, field: Field, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FieldResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields/{fieldName}'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'))
            .replace('{' + 'fieldName' + '}', encodeURIComponent(String(fieldName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putUpdateField.');
        }

        // verify required parameter 'fieldName' is not null or undefined
        if (fieldName === null || fieldName === undefined) {
            throw new Error('Required parameter fieldName was null or undefined when calling putUpdateField.');
        }

        // verify required parameter 'field' is not null or undefined
        if (field === null || field === undefined) {
            throw new Error('Required parameter field was null or undefined when calling putUpdateField.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(field, "Field")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FieldResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Update fields.
     * @param name The document name.
     * @param fields Fields with the fields data.
     * @param storage The document storage.
     * @param folder The document folder.
     */
    public async putUpdateFields (name: string, fields: Fields, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: FieldsResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/fields'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putUpdateFields.');
        }

        // verify required parameter 'fields' is not null or undefined
        if (fields === null || fields === undefined) {
            throw new Error('Required parameter fields was null or undefined when calling putUpdateFields.');
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
            body: ObjectSerializer.serialize(fields, "Fields")
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FieldsResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert web page to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param url Source url
     * @param height Page height
     * @param width Page width
     * @param isLandscape Is page landscaped
     * @param marginLeft Page margin left
     * @param marginBottom Page margin bottom
     * @param marginRight Page margin right
     * @param marginTop Page margin top
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putWebInStorageToPdf (name: string, url: string, height?: number, width?: number, isLandscape?: boolean, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/web'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putWebInStorageToPdf.');
        }

        // verify required parameter 'url' is not null or undefined
        if (url === null || url === undefined) {
            throw new Error('Required parameter url was null or undefined when calling putWebInStorageToPdf.');
        }

        if (url !== undefined && null !== url) {
            localVarQueryParameters['url'] = ObjectSerializer.serialize(url, "string");
        }

        if (height !== undefined && null !== height) {
            localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
        }

        if (width !== undefined && null !== width) {
            localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
        }

        if (isLandscape !== undefined && null !== isLandscape) {
            localVarQueryParameters['isLandscape'] = ObjectSerializer.serialize(isLandscape, "boolean");
        }

        if (marginLeft !== undefined && null !== marginLeft) {
            localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
        }

        if (marginBottom !== undefined && null !== marginBottom) {
            localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
        }

        if (marginRight !== undefined && null !== marginRight) {
            localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
        }

        if (marginTop !== undefined && null !== marginTop) {
            localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document which contains XFA form (in request content) to PDF with AcroForm and uploads resulting file to storage.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.pdf)
     * @param storage The document storage.
     * @param file A file to be converted.
     */
    public async putXfaPdfInRequestToAcroForm (outPath: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/convert/xfatoacroform';
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putXfaPdfInRequestToAcroForm.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['file'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and uploads resulting file to storage
     * @param name The document name.
     * @param outPath Full resulting filename (ex. /folder1/folder2/result.pdf)
     * @param folder The document folder.
     * @param storage The document storage.
     */
    public async putXfaPdfInStorageToAcroForm (name: string, outPath: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/convert/xfatoacroform'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putXfaPdfInStorageToAcroForm.');
        }

        // verify required parameter 'outPath' is not null or undefined
        if (outPath === null || outPath === undefined) {
            throw new Error('Required parameter outPath was null or undefined when calling putXfaPdfInStorageToAcroForm.');
        }

        if (outPath !== undefined && null !== outPath) {
            localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
        }

        if (folder !== undefined && null !== folder) {
            localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert XML file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.xml)
     * @param xslFilePath Full XSL source filename (ex. /folder1/folder2/template.xsl)
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putXmlInStorageToPdf (name: string, srcPath: string, xslFilePath?: string, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/xml'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putXmlInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putXmlInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (xslFilePath !== undefined && null !== xslFilePath) {
            localVarQueryParameters['xslFilePath'] = ObjectSerializer.serialize(xslFilePath, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert XPS file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.xps)
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putXpsInStorageToPdf (name: string, srcPath: string, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/xps'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putXpsInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putXpsInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Convert XslFo file (located on storage) to PDF format and upload resulting file to storage. 
     * @param name The document name.
     * @param srcPath Full source filename (ex. /folder1/folder2/template.xpsfo)
     * @param dstFolder The destination document folder.
     * @param storage The document storage.
     */
    public async putXslFoInStorageToPdf (name: string, srcPath: string, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse;  }> {
        const localVarPath = this.basePath + '/pdf/{name}/create/xslfo'
            .replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'name' is not null or undefined
        if (name === null || name === undefined) {
            throw new Error('Required parameter name was null or undefined when calling putXslFoInStorageToPdf.');
        }

        // verify required parameter 'srcPath' is not null or undefined
        if (srcPath === null || srcPath === undefined) {
            throw new Error('Required parameter srcPath was null or undefined when calling putXslFoInStorageToPdf.');
        }

        if (srcPath !== undefined && null !== srcPath) {
            localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
        }

        if (dstFolder !== undefined && null !== dstFolder) {
            localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
        }

        if (storage !== undefined && null !== storage) {
            localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "AsposeResponse");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Check if storage exists
     * @param storageName Storage name
     */
    public async storageExists (storageName: string) : Promise<{ response: http.IncomingMessage; body: StorageExist;  }> {
        const localVarPath = this.basePath + '/pdf/storage/{storageName}/exist'
            .replace('{' + 'storageName' + '}', encodeURIComponent(String(storageName)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'storageName' is not null or undefined
        if (storageName === null || storageName === undefined) {
            throw new Error('Required parameter storageName was null or undefined when calling storageExists.');
        }


        let localVarUseFormData = false;
        let fileData = null;
        let localVarRequestOptions: localVarRequest.Options = {
            method: 'GET',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "StorageExist");
        return Promise.resolve({body: result, response});
    }


    /**
     * 
     * @summary Upload file
     * @param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext             If the content is multipart and path does not contains the file name it tries to get them from filename parameter             from Content-Disposition header.             
     * @param file File to upload
     * @param storageName Storage name
     */
    public async uploadFile (path: string, file: Buffer, storageName?: string) : Promise<{ response: http.IncomingMessage; body: FilesUploadResult;  }> {
        const localVarPath = this.basePath + '/pdf/storage/file/{path}'
            .replace('{' + 'path' + '}', encodeURIComponent(String(path)).replace('%2F', '/'));
        let localVarQueryParameters: any = {};
        let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
        let localVarFormParams: any = {};

        // verify required parameter 'path' is not null or undefined
        if (path === null || path === undefined) {
            throw new Error('Required parameter path was null or undefined when calling uploadFile.');
        }

        // verify required parameter 'file' is not null or undefined
        if (file === null || file === undefined) {
            throw new Error('Required parameter file was null or undefined when calling uploadFile.');
        }

        if (storageName !== undefined && null !== storageName) {
            localVarQueryParameters['storageName'] = ObjectSerializer.serialize(storageName, "string");
        }


        let localVarUseFormData = false;
        let fileData = null;
        if (file !== undefined) {
            localVarFormParams['File'] = file;
            fileData = file;
        }
        localVarUseFormData = true;
        

        let localVarRequestOptions: localVarRequest.Options = {
            method: 'PUT',
            qs: localVarQueryParameters,
            headers: localVarHeaderParams,
            uri: localVarPath,
            useQuerystring: this._useQuerystring,
            json: true,
        };

        if (Object.keys(localVarFormParams).length) {
            if (localVarUseFormData) {
                (<any>localVarRequestOptions).formData = localVarFormParams;
            } else {
                localVarRequestOptions.form = localVarFormParams;
            }
        }
        const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
        const result =  ObjectSerializer.deserialize(response.body, "FilesUploadResult");
        return Promise.resolve({body: result, response});
    }
}

