@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.
315 lines (312 loc) • 8.36 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CPDFWidgetType = exports.CPDFViewMode = exports.CPDFTypeface = exports.CPDFToolbarMenuAction = exports.CPDFToolbarAction = exports.CPDFThemes = exports.CPDFThemeMode = exports.CPDFLineType = exports.CPDFFormType = exports.CPDFDocumentPermissions = exports.CPDFDocumentEncryptAlgo = exports.CPDFDisplayMode = exports.CPDFContentEditorType = exports.CPDFConfigTool = exports.CPDFCheckStyle = exports.CPDFBorderStyle = exports.CPDFAnnotationType = exports.CPDFAlignment = void 0;
/**
* Copyright © 2014-2025 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.
*/
const CPDFViewMode = exports.CPDFViewMode = {
/**
* Viewer mode, allows viewing PDF only, cannot edit annotations, forms, etc.
*/
VIEWER: 'viewer',
/**
* Annotations mode, allows annotation editing
*/
ANNOTATIONS: 'annotations',
/**
* Content editor mode, allows editing text, images of PDF document
*/
CONTENT_EDITOR: 'contentEditor',
/**
* Forms mode, allows adding text fields, signature fields, list boxes, etc.
*/
FORMS: 'forms',
/**
* Signatures mode, allows adding signature fields for electronic signing, digital signing, verifying digital signatures
*/
SIGNATURES: 'signatures'
};
/**
* Toolbar actions supported in the displayed PDF view
*/
const CPDFToolbarAction = exports.CPDFToolbarAction = {
/**
* Back button, exits the displayed PDF interface when clicked.
* for Android platform, it will be shown only on the far left of the toolbar.
* for iOS platform, it will be displayed according to the configuration position.
*/
BACK: 'back',
/**
* Thumbnail list
*/
THUMBNAIL: 'thumbnail',
/**
* PDF text search functionality
*/
SEARCH: 'search',
/**
* Display related content in the PDF document
*
* b: Bookmark list
* o: Outline list
* t: Thumbnail list
* a: Annotation list
*/
BOTA: 'bota',
/**
* Menu button
*/
MENU: 'menu'
};
/**
* Configure the menu options opened in the top toolbar {@link CPDFToolbarAction.MENU}
*
*/
const CPDFToolbarMenuAction = exports.CPDFToolbarMenuAction = {
/**
* Open the settings view and set the scrolling direction,
* display mode, theme color and other related settings for reading PDF.
*/
VIEW_SETTINGS: 'viewSettings',
/**
* Open the document thumbnail list, and you can delete, rotate, and add document pages in the view.
*/
DOCUMENT_EDITOR: 'documentEditor',
/**
* Open the document information view to display basic document information and permission information.
*/
DOCUMENT_INFO: 'documentInfo',
/**
* Open the watermark editing view to add text and image watermarks and save them as a new document.
*/
WATERMARK: 'watermark',
/**
* Open the security settings view, set the document opening password and set the permission password
*/
SECURITY: 'security',
/**
* Flatten the annotations in the document, and the annotations will not be editable.
*/
FLATTENED: 'flattened',
/**
* save pdf document.
*/
SAVE: 'save',
/**
* Turn on system sharing function.
*/
SHARE: 'share',
/**
* Open the system file selector and open a new pdf document.
*/
OPEN_DOCUMENT: 'openDocument',
/**
* The PDF capture function allows you to capture an area
* in the PDF document and convert it into an image.
*/
SNIP: 'snip'
};
/**
* annotations type.
* Please note that {@link PENCIL} is only available on ios platform.
*/
const CPDFAnnotationType = exports.CPDFAnnotationType = {
UNKNOWN: 'unknown',
NOTE: 'note',
HIGHLIGHT: 'highlight',
UNDERLINE: 'underline',
SQUIGGLY: 'squiggly',
STRIKEOUT: 'strikeout',
INK: 'ink',
/**
* only ios platform.
*/
PENCIL: "pencil",
CIRCLE: 'circle',
SQUARE: 'square',
ARROW: 'arrow',
LINE: 'line',
FREETEXT: 'freetext',
SIGNATURE: 'signature',
STAMP: 'stamp',
PICTURES: 'pictures',
LINK: 'link',
SOUND: 'sound'
};
/**
* {@link CPDFViewMode.ANNOTATIONS}, {@link CPDFViewMode.CONTENT_EDITOR},{@link CPDFViewMode.FORMS} function tools.
* {@link CPDFConfigTool.SETTING} is not available in form functionality.
*
*/
const CPDFConfigTool = exports.CPDFConfigTool = {
/**
* Set button, corresponding to open the selected annotation, text or picture property panel.
*/
SETTING: 'setting',
/**
* Undo annotation, content editing, form operations
*/
UNDO: 'undo',
/**
* Redo an undone action
*/
REDO: 'redo'
};
/**
* Shape annotation border style, default {@link CPDFBorderStyle.SOLID}.
* shape:
* * {@link CPDFAnnotationType.SQUARE}
* * {@link CPDFAnnotationType.CIRCLE}
* * {@link CPDFAnnotationType.ARROW}
* * {@link CPDFAnnotationType.LINE}
*/
const CPDFBorderStyle = exports.CPDFBorderStyle = {
SOLID: 'solid',
DASHED: 'dashed'
};
/**
* Arrow annotation, start and tail shapes
*/
const CPDFLineType = exports.CPDFLineType = {
NONE: 'none',
OPEN_ARROW: 'openArrow',
CLOSE_ARROW: 'closedArrow',
SQUARE: 'square',
CIRCLE: 'circle',
DIAMOND: 'diamond'
};
/**
* text alignment
*/
const CPDFAlignment = exports.CPDFAlignment = {
LEFT: 'left',
CENTER: 'center',
RIGHT: 'right'
};
const CPDFTypeface = exports.CPDFTypeface = {
COURIER: 'Courier',
HELVETICA: 'Helvetica',
TIMES_ROMAN: 'Times-Roman'
};
const CPDFContentEditorType = exports.CPDFContentEditorType = {
EDITOR_TEXT: 'editorText',
EDITOR_IMAGE: 'editorImage'
};
/**
* form types
* @deprecated please use 'CPDFWidgetType' instead.
*/
const CPDFFormType = exports.CPDFFormType = {
TEXT_FIELD: 'textField',
CHECKBOX: 'checkBox',
RADIO_BUTTON: 'radioButton',
LISTBOX: 'listBox',
COMBOBOX: 'comboBox',
SIGNATURES_FIELDS: 'signaturesFields',
PUSH_BUTTON: 'pushButton',
UNKNOWN: 'unknown'
};
/**
* @deprecated Please use `CPDFWidgetType` instead.
*/
/**
* New widget type definition, recommended for use.
*/
const CPDFWidgetType = exports.CPDFWidgetType = {
...CPDFFormType
};
const CPDFCheckStyle = exports.CPDFCheckStyle = {
CHECK: 'check',
CIRCLE: 'circle',
CROSS: 'cross',
DIAMOND: 'diamond',
SQUARE: 'square',
STAR: 'star'
};
const CPDFDisplayMode = exports.CPDFDisplayMode = {
SINGLE_PAGE: 'singlePage',
DOUBLE_PAGE: 'doublePage',
COVER_PAGE: 'coverPage'
};
const CPDFThemes = exports.CPDFThemes = {
/**
* Bright mode, readerview background is white
*/
LIGHT: 'light',
/**
* dark mode, readerview background is black
*/
DARK: 'dark',
/**
* brown paper color
*/
SEPIA: 'sepia',
/**
* Light green, eye protection mode
*/
RESEDA: 'reseda'
};
/**
* Set UI theme modes, including light, dark, and follow system modes
* Default: Follow system
*/
const CPDFThemeMode = exports.CPDFThemeMode = {
/**
* Light mode, with a primarily white UI
*/
LIGHT: 'light',
/**
* Dark night mode, with a primarily black UI
*/
DARK: 'dark',
/**
* Follow the current system setting
*/
SYSTEM: 'system'
};
/**
* Represents the permissions available for the currently opened document.
*/
const CPDFDocumentPermissions = exports.CPDFDocumentPermissions = {
/**
* No restrictions. The document does not have an open password or owner permission password.
*/
NONE: 'none',
/**
* User permissions. The document can only be viewed and has an owner password set.
*/
USER: 'user',
/**
* Owner permissions. The current viewer is identified as the owner of the document.
*/
OWNER: 'owner'
};
/**
* Specifies the encryption algorithms supported for a PDF document.
*/
const CPDFDocumentEncryptAlgo = exports.CPDFDocumentEncryptAlgo = {
/**
* RC4 encryption algorithm.
*/
RC4: 'rc4',
/**
* AES 128-bit encryption algorithm.
*/
AES128: 'aes128',
/**
* AES 256-bit encryption algorithm.
*/
AES256: 'aes256',
/**
* Indicates that no encryption algorithm is applied.
*/
NO_ENCRYPT_ALGO: 'noEncryptAlgo'
};
//# sourceMappingURL=CPDFOptions.js.map