UNPKG

@compdfkit_pdf_sdk/react_native

Version:

ComPDFKit for React Native is a comprehensive SDK that allows you to quickly add PDF functionality to Android, iOS, and React Native applications.

80 lines 2.95 kB
"use strict"; /** * Copyright © 2014-2026 PDF Technologies, Inc. All Rights Reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT. * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. * This notice may not be removed from this file. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CPDFConfiguration = void 0; /** * PDF configuration class for customizing display and interaction via ComPDFKit.openDocument. * Supports flexible customization of UI elements, PDF properties, toolbars, annotations, forms, content editing, etc. * @group Configuration * @example * const configuration: CPDFConfiguration = { * modeConfig: { * initialViewMode: CPDFModeConfig.ViewMode.VIEWER, * availableViewModes: [ * CPDFModeConfig.ViewMode.VIEWER, * CPDFModeConfig.ViewMode.ANNOTATIONS, * CPDFModeConfig.ViewMode.CONTENT_EDITOR, * CPDFModeConfig.ViewMode.FORMS, * CPDFModeConfig.ViewMode.SIGNATURES * ] * } * }; * * ComPDFKit.openDocument(document, 'password', JSON.stringify(configuration)); * * CPDFReaderView( * configuration={ComPDFKit.getDefaultConfig({ * modeConfig: { * initialViewMode: CPDFViewMode.ANNOTATIONS, * uiVisibilityMode: "automatic", * }, * toolbarConfig: { * annotationToolbarVisible: false, * }, * })} * ); */ class CPDFConfiguration { /** * PDF mode configuration. Used to set initial and available view modes (reading, annotation, content editing, forms, signatures, etc.), * as well as behaviors like auto fullscreen and toolbar visibility. */ modeConfig; /** * Configuration for the top toolbar and bottom toolbars in different modes. */ toolbarConfig; /** * Annotation configuration. Defines available annotation types, tools, and default properties in annotation mode. */ annotationsConfig; /** * Content editor mode configuration. Sets editing tools, types, and default properties for content editing mode. */ contentEditorConfig; /** * Form configuration. Customizes form filling and field properties. */ formsConfig; /** * PDF view configuration. Sets page layout, scroll direction, theme color, etc. */ readerViewConfig; /** * Global configuration. Sets global features such as theme mode, watermark, error prompts, etc. */ global; /** * Context menu configuration. Customizes context menu options for annotations, forms, text, etc. in various modes. */ contextMenuConfig; } exports.CPDFConfiguration = CPDFConfiguration; //# sourceMappingURL=CPDFConfiguration.js.map