/* tslint:disable */ /* eslint-disable */ /** * DocRaptor * A native client library for the DocRaptor HTML to PDF/XLS service. * * The version of the OpenAPI document: 2.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; /** * * @export * @interface PrinceOptions */ export interface PrinceOptions { /** * Set the baseurl for assets. * @type {string} * @memberof PrinceOptions */ baseurl?: string; /** * Disable XML inclusion. * @type {boolean} * @memberof PrinceOptions */ noXinclude?: boolean; /** * Disable network access. * @type {boolean} * @memberof PrinceOptions */ noNetwork?: boolean; /** * Disables parallel fetching of assets during PDF creation. Useful if your asset host has strict rate limiting. * @type {boolean} * @memberof PrinceOptions */ noParallelDownloads?: boolean; /** * Set the user for HTTP authentication. * @type {string} * @memberof PrinceOptions */ httpUser?: string; /** * Set the password for HTTP authentication. * @type {string} * @memberof PrinceOptions */ httpPassword?: string; /** * Set the HTTP proxy server. * @type {string} * @memberof PrinceOptions */ httpProxy?: string; /** * Set the HTTP request timeout. * @type {number} * @memberof PrinceOptions */ httpTimeout?: number; /** * Disable SSL verification. * @type {boolean} * @memberof PrinceOptions */ insecure?: boolean; /** * Specify the CSS media type. Defaults to "print" but you may want to use "screen" for web styles. * @type {string} * @memberof PrinceOptions */ media?: string; /** * Ignore author stylesheets. * @type {boolean} * @memberof PrinceOptions */ noAuthorStyle?: boolean; /** * Ignore default stylesheets. * @type {boolean} * @memberof PrinceOptions */ noDefaultStyle?: boolean; /** * Disable font embedding in PDFs. * @type {boolean} * @memberof PrinceOptions */ noEmbedFonts?: boolean; /** * Disable font subsetting in PDFs. * @type {boolean} * @memberof PrinceOptions */ noSubsetFonts?: boolean; /** * Disable PDF compression. * @type {boolean} * @memberof PrinceOptions */ noCompress?: boolean; /** * Encrypt PDF output. * @type {boolean} * @memberof PrinceOptions */ encrypt?: boolean; /** * Set encryption key size. * @type {number} * @memberof PrinceOptions */ keyBits?: number; /** * Set the PDF user password. * @type {string} * @memberof PrinceOptions */ userPassword?: string; /** * Set the PDF owner password. * @type {string} * @memberof PrinceOptions */ ownerPassword?: string; /** * Disallow printing of this PDF. * @type {boolean} * @memberof PrinceOptions */ disallowPrint?: boolean; /** * Disallow copying of this PDF. * @type {boolean} * @memberof PrinceOptions */ disallowCopy?: boolean; /** * Disallow annotation of this PDF. * @type {boolean} * @memberof PrinceOptions */ disallowAnnotate?: boolean; /** * Disallow modification of this PDF. * @type {boolean} * @memberof PrinceOptions */ disallowModify?: boolean; /** * Enable Prince debug mode. * @type {boolean} * @memberof PrinceOptions */ debug?: boolean; /** * Specify the input format. * @type {string} * @memberof PrinceOptions */ input?: PrinceOptionsInputEnum; /** * Deprecated, use the appropriate `pipeline` version. Specify a specific verison of PrinceXML to use. * @type {string} * @memberof PrinceOptions */ version?: string; /** * Enable PrinceXML JavaScript. DocRaptor JavaScript parsing is also available elsewhere. * @type {boolean} * @memberof PrinceOptions */ javascript?: boolean; /** * Set the DPI when rendering CSS. Defaults to 96 but can be set with Prince 9.0 and up. * @type {number} * @memberof PrinceOptions */ cssDpi?: number; /** * In Prince 9.0 and up you can set the PDF profile. * @type {string} * @memberof PrinceOptions */ profile?: string; /** * Specify the PDF title, part of the document's metadata. * @type {string} * @memberof PrinceOptions */ pdfTitle?: string; } /** * @export */ export const PrinceOptionsInputEnum = { Html: 'html', Xml: 'xml', Auto: 'auto' } as const; export type PrinceOptionsInputEnum = typeof PrinceOptionsInputEnum[keyof typeof PrinceOptionsInputEnum]; /** * Check if a given object implements the PrinceOptions interface. */ export function instanceOfPrinceOptions(value: object): boolean { let isInstance = true; return isInstance; } export function PrinceOptionsFromJSON(json: any): PrinceOptions { return PrinceOptionsFromJSONTyped(json, false); } export function PrinceOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PrinceOptions { if ((json === undefined) || (json === null)) { return json; } return { 'baseurl': !exists(json, 'baseurl') ? undefined : json['baseurl'], 'noXinclude': !exists(json, 'no_xinclude') ? undefined : json['no_xinclude'], 'noNetwork': !exists(json, 'no_network') ? undefined : json['no_network'], 'noParallelDownloads': !exists(json, 'no_parallel_downloads') ? undefined : json['no_parallel_downloads'], 'httpUser': !exists(json, 'http_user') ? undefined : json['http_user'], 'httpPassword': !exists(json, 'http_password') ? undefined : json['http_password'], 'httpProxy': !exists(json, 'http_proxy') ? undefined : json['http_proxy'], 'httpTimeout': !exists(json, 'http_timeout') ? undefined : json['http_timeout'], 'insecure': !exists(json, 'insecure') ? undefined : json['insecure'], 'media': !exists(json, 'media') ? undefined : json['media'], 'noAuthorStyle': !exists(json, 'no_author_style') ? undefined : json['no_author_style'], 'noDefaultStyle': !exists(json, 'no_default_style') ? undefined : json['no_default_style'], 'noEmbedFonts': !exists(json, 'no_embed_fonts') ? undefined : json['no_embed_fonts'], 'noSubsetFonts': !exists(json, 'no_subset_fonts') ? undefined : json['no_subset_fonts'], 'noCompress': !exists(json, 'no_compress') ? undefined : json['no_compress'], 'encrypt': !exists(json, 'encrypt') ? undefined : json['encrypt'], 'keyBits': !exists(json, 'key_bits') ? undefined : json['key_bits'], 'userPassword': !exists(json, 'user_password') ? undefined : json['user_password'], 'ownerPassword': !exists(json, 'owner_password') ? undefined : json['owner_password'], 'disallowPrint': !exists(json, 'disallow_print') ? undefined : json['disallow_print'], 'disallowCopy': !exists(json, 'disallow_copy') ? undefined : json['disallow_copy'], 'disallowAnnotate': !exists(json, 'disallow_annotate') ? undefined : json['disallow_annotate'], 'disallowModify': !exists(json, 'disallow_modify') ? undefined : json['disallow_modify'], 'debug': !exists(json, 'debug') ? undefined : json['debug'], 'input': !exists(json, 'input') ? undefined : json['input'], 'version': !exists(json, 'version') ? undefined : json['version'], 'javascript': !exists(json, 'javascript') ? undefined : json['javascript'], 'cssDpi': !exists(json, 'css_dpi') ? undefined : json['css_dpi'], 'profile': !exists(json, 'profile') ? undefined : json['profile'], 'pdfTitle': !exists(json, 'pdf_title') ? undefined : json['pdf_title'], }; } export function PrinceOptionsToJSON(value?: PrinceOptions | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'baseurl': value.baseurl, 'no_xinclude': value.noXinclude, 'no_network': value.noNetwork, 'no_parallel_downloads': value.noParallelDownloads, 'http_user': value.httpUser, 'http_password': value.httpPassword, 'http_proxy': value.httpProxy, 'http_timeout': value.httpTimeout, 'insecure': value.insecure, 'media': value.media, 'no_author_style': value.noAuthorStyle, 'no_default_style': value.noDefaultStyle, 'no_embed_fonts': value.noEmbedFonts, 'no_subset_fonts': value.noSubsetFonts, 'no_compress': value.noCompress, 'encrypt': value.encrypt, 'key_bits': value.keyBits, 'user_password': value.userPassword, 'owner_password': value.ownerPassword, 'disallow_print': value.disallowPrint, 'disallow_copy': value.disallowCopy, 'disallow_annotate': value.disallowAnnotate, 'disallow_modify': value.disallowModify, 'debug': value.debug, 'input': value.input, 'version': value.version, 'javascript': value.javascript, 'css_dpi': value.cssDpi, 'profile': value.profile, 'pdf_title': value.pdfTitle, }; }