@yudaocode/univer-pdfs 1.6.217 → 1.6.218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade/index.js +2 -1
- package/lib/cjs/facade/index.js.map +1 -1
- package/lib/cjs/index.js +1986 -549
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/jsx/index.js +1346 -338
- package/lib/cjs/jsx/index.js.map +1 -1
- package/lib/es/{chunk-EMSHTYYU.js → chunk-SUXA7HBV.js} +1271 -192
- package/lib/es/chunk-SUXA7HBV.js.map +1 -0
- package/lib/es/facade/index.js +2 -1
- package/lib/es/facade/index.js.map +1 -1
- package/lib/es/index.js +453 -57
- package/lib/es/index.js.map +1 -1
- package/lib/es/jsx/index.js +1 -1
- package/lib/types/index.d.ts +152 -3
- package/lib/types/jsx/index.d.ts +2 -2
- package/lib/types/jsx/jsx-dev-runtime.d.ts +1 -1
- package/lib/types/jsx/jsx-runtime.d.ts +1 -1
- package/lib/types/{jsx-dev-runtime-Dm72R_Vm.d.ts → jsx-dev-runtime-DsfnOIFS.d.ts} +37 -1
- package/package.json +1 -1
- package/lib/es/chunk-EMSHTYYU.js.map +0 -1
package/lib/es/jsx/index.js
CHANGED
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IPdfUnitData, a as IPdfDocument, b as IPdfPage, c as IPdfPageSize, d as IPdfPageElement, e as IPdfLayer, f as IPdfSourceDocumentRef, g as IPdfResourceBinding, h as IPdfUnitMetadata, i as
|
|
2
|
-
export {
|
|
1
|
+
import { I as IPdfUnitData, a as IPdfDocument, b as IPdfPage, c as IPdfPageSize, d as IPdfPageElement, e as IPdfLayer, f as IPdfSourceDocumentRef, g as IPdfResourceBinding, h as IPdfUnitMetadata, i as IPdfBookmarkItem, j as IPdfAttachment, k as IPdfSecurityConfig, l as IPdfSecurityPermissions, m as IPdfSignatureEnvelope, P as PdfElementType, n as IPdfTextStyle, o as PdfPageRotation, p as IPdfBatesConfig, q as IPdfHeaderFooterConfig, r as IPdfNativeTextSpan, s as IPdfCropBox, t as IPdfWatermarkConfig, u as IPdfDocumentData, v as IPdfTextElement, w as PdfDateTimeKind, x as IPdfCircleMarkElement, y as IPdfListElement, z as IPdfRichTextSpan, A as PdfColorSpaceType, B as IPdfExportOptions, C as PDF_PAGE_PRESETS, D as PdfBatesPosition, E as IPdfSignerInfo, F as IPdfSecurityPermissionFlags, G as IPdfjsAssetsConfig, H as PdfDisplayUnit, J as PdfInteractionMode, K as IPdfVersionSnapshot } from './jsx-dev-runtime-DsfnOIFS.js';
|
|
2
|
+
export { L as DEFAULT_PDF_CJK_FONT_FAMILY, M as DEFAULT_PDF_CJK_FONT_FILES, N as DEFAULT_PDF_CJK_FONT_PACKAGE, O as DEFAULT_PDF_CJK_FONT_VERSION, Q as Fragment, R as ICjkDetectionSummary, S as IComputeDynamicFontSizeParams, T as IDetectedPaperPreset, U as IDiagnosePdfFontsOptions, V as IDiagnosticGridOverlayOptions, W as IExportJsxToPdfOptions, X as IInputsCjkReport, Y as IJsxAbsoluteProps, Z as IJsxBarcodeProps, _ as IJsxBoxProps, $ as IJsxContainerStyleProps, a0 as IJsxDocumentProps, a1 as IJsxHeaderFooterProps, a2 as IJsxImageProps, a3 as IJsxLineProps, a4 as IJsxListProps, a5 as IJsxMultiVariableTextProps, a6 as IJsxPageBreakProps, a7 as IJsxPageProps, a8 as IJsxQrCodeProps, a9 as IJsxRowProps, aa as IJsxShapeProps, ab as IJsxSpacerProps, ac as IJsxStackProps, ad as IJsxStaticProps, ae as IJsxSvgProps, af as IJsxTableColumnSpec, ag as IJsxTableProps, ah as IJsxTextProps, ai as IPdfAnnotationElement, aj as IPdfAnnotationReply, ak as IPdfBarcodeElement, al as IPdfBrowserRenderOptions, am as IPdfCheckboxElement, an as IPdfCjkFontSourcesOptions, ao as IPdfDatasetField, ap as IPdfDatasetSchema, aq as IPdfDateTimeElement, ar as IPdfDocumentMetadata, as as IPdfDurableEditState, at as IPdfDynamicFontSizeConfig, au as IPdfElement, av as IPdfElementBase, aw as IPdfElementTransform, ax as IPdfEllipseElement, ay as IPdfExportCapabilitiesReport, az as IPdfFailedFontEntry, aA as IPdfFieldContractHint, aB as IPdfFontDiagnosisReport, aC as IPdfFontDiagnosticIssue, aD as IPdfFontDoctorInputEntry, aE as IPdfFontSource, aF as IPdfImageCrop, aG as IPdfImageElement, aH as IPdfInkElement, aI as IPdfInkPoint, aJ as IPdfInputContractValidationResult, aK as IPdfInputContractViolation, aL as IPdfJsxNode, aM as IPdfLayerConfig, aN as IPdfLineElement, aO as IPdfMissingGlyphItem, aP as IPdfPageElementBase, aQ as IPdfParagraphBlock, aR as IPdfPolygonElement, aS as IPdfPolygonPoint, aT as IPdfQrCodeElement, aU as IPdfRadioGroupElement, aV as IPdfRedactionElement, aW as IPdfRenderWarning, aX as IPdfSchemaDiagnosticIssue, aY as IPdfSelectElement, aZ as IPdfShapeElement, a_ as IPdfSignatureElement, a$ as IPdfStampElement, b0 as IPdfSvgElement, b1 as IPdfTableBorderWidths, b2 as IPdfTableCellStyle, b3 as IPdfTableColumn, b4 as IPdfTableElement, b5 as IPdfTableMerge, b6 as IPdfTablePageChunk, b7 as IPdfTablePaginationOptions, b8 as IPdfTableRowCapacity, b9 as IPdfTableThemePreset, ba as IPdfTemplateSchemaValidationResult, bb as IPdfVariableValidationResult, bc as IPdfmeBlankPdf, bd as IPdfmeSchemaItem, be as IPdfmeTemplate, bf as IRenderJsxOptions, bg as ISubsetFontResult, bh as ITemplateCjkReport, bi as ITrueTypeFontInspection, bj as IValidatePdfTemplateSchemaOptions, bk as JSX, bl as PAGE_SIZE_PRESETS_MM, bm as PDF_JSX_ELEMENT_SYMBOL, bn as PDF_JSX_FRAGMENT_SYMBOL, bo as PDF_TABLE_THEME_PRESETS, bp as PT_PER_MM, bq as PdfAnnotationStatus, br as PdfAnnotationType, bs as PdfBarcodeFormat, bt as PdfCjkScriptBlock, bu as PdfCjkTextMode, bv as PdfDynamicFontFitMode, bw as PdfFontFailureKind, bx as PdfFontFallbackPolicy, by as PdfImageSourceType, bz as PdfJsxChild, bA as PdfJsxComponent, bB as PdfJsxIntrinsicKind, bC as PdfJsxPaddingSpec, bD as PdfListKind, bE as PdfListPresetId, bF as PdfMissingGlyphPolicy, bG as PdfPaperPresetName, bH as PdfRenderError, bI as PdfTableBorderStyle, bJ as PdfTableCellVerticalAlign, bK as PdfTablePaginationMode, bL as PdfTextAnchor, bM as PdfTextFormatMode, bN as PdfTextOverflowMode, bO as PdfZebraParityMode, bP as UNIVER_PDF_SCHEMA, bQ as UNIVER_PDF_SCHEMA_VERSION, bR as buildMinimalTestTrueTypeFont, bS as calculatePdfTableRowCapacity, bT as clearPdfFontUrlCache, bU as collectMissingGlyphsFromPdfUnit, bV as collectPdfInputContractHints, bW as collectUsedCodePointsFromPdfUnit, bX as computeAutoFitFontSize, bY as computeDynamicFontSize, bZ as computeFontUrlCacheKey, b_ as computePdfTableSummaryRow, b$ as createPdfCjkFontSources, c0 as createPdfJsxNode, c1 as detectCJKCharacters, c2 as detectCJKInPdfInputs, c3 as detectCJKInPdfTemplate, c4 as detectPaperSizePreset, c5 as diagnosePdfFonts, c6 as evaluatePdfJsxElement, c7 as exportBatchPdfBytes, c8 as exportCalibrationGridPdfBytes, c9 as exportPdfBytes, ca as exportPdfUnitToBytes, cb as exportToPdfmeTemplate, cc as extractAcroFormValuesFromPdfBytes, cd as extractJsxTextContent, ce as extractPdfFormValues, cf as fillPdfFormValues, cg as flattenJsxChildrenToNodes, ch as formatBatesNumber, ci as formatPdfTableCell, cj as fromPdfmeTemplate, ck as getTrueTypeMappedCodePoints, cl as importFromPdfmeTemplate, cm as inspectPdfExportCapabilities, cn as inspectTrueTypeFont, co as isFontUrlSafeToFetch, cp as isPdfJsxNode, cq as jsx, cr as jsxDEV, cs as jsxs, ct as mmToPt, cu as normalizeBarcodePayloadForFormat, cv as normalizeImageCrop, cw as overlayDiagnosticGridOnPdfBytes, cx as paginatePdfTableRows, cy as ptToMm, cz as renderBarcodeDataUrl, cA as renderQrCodeDataUrl, cB as resolveDynamicTableRawRows, cC as resolvePaddingMm, cD as resolvePageSizeMm, cE as resolvePolygonNormalizedPoints, cF as resolveTemplateString, cG as subsetTrueTypeFont, cH as toPdfmeTemplate, cI as validatePdfInputContract, cJ as validatePdfTemplateSchema, cK as validatePdfTemplateVariables, cL as wrapMixedCjkAndLatinLines } from './jsx-dev-runtime-DsfnOIFS.js';
|
|
3
3
|
import * as _univerjs_core from '@univerjs/core';
|
|
4
4
|
import { UnitModel, UniverInstanceType, ICommand, IMutation, IDisposable, Disposable, IUniverInstanceService, Plugin, Injector, ICommandService } from '@univerjs/core';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
@@ -51,7 +51,9 @@ interface IPdfUnitPropsPatch {
|
|
|
51
51
|
document?: IPdfDocument;
|
|
52
52
|
editState?: IPdfUnitData['editState'];
|
|
53
53
|
layers?: IPdfLayer[] | null;
|
|
54
|
+
bookmarks?: IPdfBookmarkItem[] | null;
|
|
54
55
|
attachments?: IPdfAttachment[] | null;
|
|
56
|
+
security?: IPdfSecurityConfig | null;
|
|
55
57
|
securityPermissions?: IPdfSecurityPermissions | null;
|
|
56
58
|
signatureEnvelope?: IPdfSignatureEnvelope | null;
|
|
57
59
|
pdfACompliant?: boolean | null;
|
|
@@ -279,6 +281,11 @@ interface ISetPdfAttachmentsCommandParams {
|
|
|
279
281
|
attachments: IPdfAttachment[];
|
|
280
282
|
}
|
|
281
283
|
declare const SetPdfAttachmentsCommand: ICommand<ISetPdfAttachmentsCommandParams>;
|
|
284
|
+
interface ISetPdfSecurityConfigCommandParams {
|
|
285
|
+
unitId?: string;
|
|
286
|
+
security?: IPdfSecurityConfig | null;
|
|
287
|
+
}
|
|
288
|
+
declare const SetPdfSecurityConfigCommand: ICommand<ISetPdfSecurityConfigCommandParams>;
|
|
282
289
|
interface IUpdatePdfPagePropsCommandParams {
|
|
283
290
|
unitId?: string;
|
|
284
291
|
pageId?: string;
|
|
@@ -1621,6 +1628,113 @@ interface IPdfBrowserFidelityExpectationSuite {
|
|
|
1621
1628
|
declare function createPdfBrowserFidelityExpectations(): IPdfBrowserFidelityExpectationSuite;
|
|
1622
1629
|
declare const PDF_S1_S7_FIDELITY_EXPECTATIONS: Readonly<IPdfBrowserFidelityExpectationSuite>;
|
|
1623
1630
|
|
|
1631
|
+
type PdfSecurityErrorCode = 'PDF_PASSWORD_REQUIRED' | 'PDF_INVALID_PASSWORD' | 'PDF_UNSUPPORTED_ENCRYPTION';
|
|
1632
|
+
declare class PdfSecurityError extends Error {
|
|
1633
|
+
readonly code: PdfSecurityErrorCode;
|
|
1634
|
+
constructor(code: PdfSecurityErrorCode, message: string);
|
|
1635
|
+
}
|
|
1636
|
+
interface IPdfEncryptionInspection {
|
|
1637
|
+
encrypted: boolean;
|
|
1638
|
+
requiresOpenPassword: boolean;
|
|
1639
|
+
filter?: string;
|
|
1640
|
+
version?: number;
|
|
1641
|
+
revision?: number;
|
|
1642
|
+
keyLength?: number;
|
|
1643
|
+
permissionFlagsRaw?: number;
|
|
1644
|
+
permissions: Required<IPdfSecurityPermissionFlags>;
|
|
1645
|
+
}
|
|
1646
|
+
/**
|
|
1647
|
+
* ISO 32000-1 §7.6.3.3 standard 32-byte password padding string.
|
|
1648
|
+
*/
|
|
1649
|
+
declare const PDF_PASSWORD_PADDING: Uint8Array<ArrayBuffer>;
|
|
1650
|
+
/**
|
|
1651
|
+
* Pure TypeScript RFC 1321 MD5 digest (16 bytes), 100% browser- and Node-safe with zero external dependencies.
|
|
1652
|
+
*/
|
|
1653
|
+
declare function md5Bytes(data: Uint8Array): Uint8Array;
|
|
1654
|
+
/**
|
|
1655
|
+
* Pure TypeScript RC4 (ARCFOUR) symmetric stream cipher over `Uint8Array`.
|
|
1656
|
+
*/
|
|
1657
|
+
declare function rc4Bytes(key: Uint8Array, data: Uint8Array): Uint8Array;
|
|
1658
|
+
declare function bytesToHex(bytes: Uint8Array): string;
|
|
1659
|
+
declare function hexToBytes(hexRaw: string): Uint8Array;
|
|
1660
|
+
declare function padPdfPassword(password?: string | Uint8Array): Uint8Array;
|
|
1661
|
+
/**
|
|
1662
|
+
* Encodes `IPdfSecurityPermissionFlags` into the signed 32-bit PDF `/P` permission bitmask
|
|
1663
|
+
* per ISO 32000-1 §7.6.3.2 Table 22.
|
|
1664
|
+
*/
|
|
1665
|
+
declare function encodePdfPermissionFlags(permissions?: IPdfSecurityPermissionFlags, revision?: 2 | 3): number;
|
|
1666
|
+
/**
|
|
1667
|
+
* Decodes signed 32-bit PDF `/P` permission bitmask into structured `IPdfSecurityPermissionFlags`.
|
|
1668
|
+
*/
|
|
1669
|
+
declare function decodePdfPermissionFlags(pMask: number, revision?: number): Required<IPdfSecurityPermissionFlags>;
|
|
1670
|
+
declare function isPdfSecurityActive(security?: IPdfSecurityConfig | null): boolean;
|
|
1671
|
+
/**
|
|
1672
|
+
* ISO 32000-1 §7.6.3.4 Algorithm 3: Computing the `/O` value (32 bytes).
|
|
1673
|
+
*/
|
|
1674
|
+
declare function computeOwnerPasswordValue(userPassword: string, ownerPassword: string, revision: 2 | 3, keyLengthBits: number): Uint8Array;
|
|
1675
|
+
/**
|
|
1676
|
+
* ISO 32000-1 §7.6.3.3 Algorithm 2: Computing the file encryption key from a 32-byte padded password.
|
|
1677
|
+
*/
|
|
1678
|
+
declare function computeFileEncryptionKeyFromPadded(paddedUserPassword: Uint8Array, oValue: Uint8Array, pFlagsSigned: number, fileId: Uint8Array, revision: 2 | 3, keyLengthBits: number): Uint8Array;
|
|
1679
|
+
/**
|
|
1680
|
+
* ISO 32000-1 §7.6.3.4 Algorithm 4 & Algorithm 5: Computing the `/U` value (32 bytes).
|
|
1681
|
+
*/
|
|
1682
|
+
declare function computeUserPasswordValue(encryptionKey: Uint8Array, fileId: Uint8Array, revision: 2 | 3): Uint8Array;
|
|
1683
|
+
/**
|
|
1684
|
+
* ISO 32000-1 §7.6.2 Algorithm 1: Derives per-object RC4 key for `(objectNumber, generationNumber)`.
|
|
1685
|
+
*/
|
|
1686
|
+
declare function buildObjectEncryptionKey(encryptionKey: Uint8Array, objectNumber: number, generationNumber: number): Uint8Array;
|
|
1687
|
+
/**
|
|
1688
|
+
* Encrypts all indirect objects (strings & streams) inside an in-memory `pdf-lib` `PDFDocument`
|
|
1689
|
+
* using ISO 32000-1 §7.6.3 Standard Security Handler (`V=2, R=3` 128-bit RC4 or `V=1, R=2` 40-bit RC4).
|
|
1690
|
+
* Caller MUST save with `{ useObjectStreams: false }` so indirect object numbers match traditional PDF xref.
|
|
1691
|
+
*/
|
|
1692
|
+
declare function applyPdfSecurityToDocument(pdfDoc: PDFDocument, security: IPdfSecurityConfig): Promise<void>;
|
|
1693
|
+
/**
|
|
1694
|
+
* Encrypts raw PDF bytes using PDF Standard Security Handler (`V=2, R=3` 128-bit RC4 by default).
|
|
1695
|
+
*/
|
|
1696
|
+
declare function encryptPdfBytes(pdfBytes: Uint8Array, security: IPdfSecurityConfig): Promise<Uint8Array>;
|
|
1697
|
+
/**
|
|
1698
|
+
* Inspects a PDF binary (`Uint8Array`) for `/Encrypt` dictionary metadata,
|
|
1699
|
+
* open-password requirement, and decoded `/P` permissions without mutating the input.
|
|
1700
|
+
*/
|
|
1701
|
+
declare function inspectPdfEncryption(pdfBytes: Uint8Array): IPdfEncryptionInspection;
|
|
1702
|
+
/**
|
|
1703
|
+
* Authenticates `password` (`""`, `userPassword`, or `ownerPassword`) against `/U` and `/O`,
|
|
1704
|
+
* decrypts all indirect object strings & streams, strips `/Encrypt` from trailer, and returns
|
|
1705
|
+
* clean unencrypted PDF bytes ready for `PDFDocument.load` and `importPdfBytesToUnit`.
|
|
1706
|
+
*/
|
|
1707
|
+
declare function decryptPdfBytes(pdfBytes: Uint8Array, password?: string): Promise<Uint8Array>;
|
|
1708
|
+
/**
|
|
1709
|
+
* Verifies PDF encryption status and returns unencrypted PDF bytes (throwing `PdfSecurityError`
|
|
1710
|
+
* if an open password is required and missing or if the provided password is invalid).
|
|
1711
|
+
*/
|
|
1712
|
+
declare function verifyAndDecryptPdfBytes(pdfBytes: Uint8Array, password?: string): Promise<Uint8Array>;
|
|
1713
|
+
|
|
1714
|
+
interface IPdfImportBytesOptions {
|
|
1715
|
+
/** Optional open/owner password for encrypted PDFs */
|
|
1716
|
+
password?: string;
|
|
1717
|
+
/** Optional explicit unit ID */
|
|
1718
|
+
unitId?: string;
|
|
1719
|
+
/** Optional document name override */
|
|
1720
|
+
name?: string;
|
|
1721
|
+
/** Alias for `name` */
|
|
1722
|
+
title?: string;
|
|
1723
|
+
/** Optional source file name recorded on `sourceDocumentRef.fileName` */
|
|
1724
|
+
fileName?: string;
|
|
1725
|
+
/**
|
|
1726
|
+
* When `true`, also promotes extracted native text spans into editable `TEXT` elements
|
|
1727
|
+
* on pages that have no editable elements yet. Defaults to `false` (spans preserved in `nativeTextSpansByPage`).
|
|
1728
|
+
*/
|
|
1729
|
+
promoteNativeTextToElements?: boolean;
|
|
1730
|
+
}
|
|
1731
|
+
/**
|
|
1732
|
+
* Verifies & decrypts an input PDF binary (supporting Standard Security Handler RC4 encryption)
|
|
1733
|
+
* and imports pages, native text spans, AcroForm widgets, `/Outlines` bookmarks, and `/OCProperties` layers
|
|
1734
|
+
* into an editable `IPdfUnitData` snapshot.
|
|
1735
|
+
*/
|
|
1736
|
+
declare function importPdfBytesToUnit(pdfBytes: Uint8Array, options?: IPdfImportBytesOptions): Promise<IPdfUnitData>;
|
|
1737
|
+
|
|
1624
1738
|
interface IPdfImportWarning {
|
|
1625
1739
|
code: string;
|
|
1626
1740
|
message: string;
|
|
@@ -1994,6 +2108,21 @@ interface IPdfViewportRatio {
|
|
|
1994
2108
|
width: number;
|
|
1995
2109
|
height: number;
|
|
1996
2110
|
}
|
|
2111
|
+
interface IPdfSearchHighlight {
|
|
2112
|
+
pageId: string;
|
|
2113
|
+
left: number;
|
|
2114
|
+
top: number;
|
|
2115
|
+
width: number;
|
|
2116
|
+
height: number;
|
|
2117
|
+
elementId?: string;
|
|
2118
|
+
spanId?: string;
|
|
2119
|
+
query?: string;
|
|
2120
|
+
}
|
|
2121
|
+
interface IPdfScrollTarget {
|
|
2122
|
+
pageId?: string;
|
|
2123
|
+
topPt: number;
|
|
2124
|
+
seq: number;
|
|
2125
|
+
}
|
|
1997
2126
|
interface IPdfSelectionState {
|
|
1998
2127
|
unitId: string | null;
|
|
1999
2128
|
activePageId: string | null;
|
|
@@ -2013,6 +2142,9 @@ interface IPdfSelectionService {
|
|
|
2013
2142
|
readonly inkColor$: Observable<string>;
|
|
2014
2143
|
readonly viewportRatio$: Observable<IPdfViewportRatio>;
|
|
2015
2144
|
readonly previewOpen$: Observable<boolean>;
|
|
2145
|
+
readonly findReplaceOpen$: Observable<boolean>;
|
|
2146
|
+
readonly searchHighlight$: Observable<IPdfSearchHighlight | null>;
|
|
2147
|
+
readonly scrollTarget$: Observable<IPdfScrollTarget | null>;
|
|
2016
2148
|
readonly clipboard$: Observable<IPdfPageElement[]>;
|
|
2017
2149
|
readonly versionsChange$: Observable<string>;
|
|
2018
2150
|
getState(): IPdfSelectionState;
|
|
@@ -2045,6 +2177,11 @@ interface IPdfSelectionService {
|
|
|
2045
2177
|
setInkColor(color: string): void;
|
|
2046
2178
|
setViewportRatio(ratio: IPdfViewportRatio): void;
|
|
2047
2179
|
setPreviewOpen(open: boolean): void;
|
|
2180
|
+
getFindReplaceOpen(): boolean;
|
|
2181
|
+
setFindReplaceOpen(open: boolean): void;
|
|
2182
|
+
getSearchHighlight(): IPdfSearchHighlight | null;
|
|
2183
|
+
setSearchHighlight(highlight: IPdfSearchHighlight | null): void;
|
|
2184
|
+
requestScrollToTopPt(topPt: number, pageId?: string): void;
|
|
2048
2185
|
setClipboard(elements: IPdfPageElement[]): void;
|
|
2049
2186
|
getClipboard(): IPdfPageElement[];
|
|
2050
2187
|
getPasteStep(): number;
|
|
@@ -2087,6 +2224,13 @@ declare class PdfSelectionService extends Disposable implements IPdfSelectionSer
|
|
|
2087
2224
|
readonly viewportRatio$: Observable<IPdfViewportRatio>;
|
|
2088
2225
|
private readonly _previewOpen$;
|
|
2089
2226
|
readonly previewOpen$: Observable<boolean>;
|
|
2227
|
+
private readonly _findReplaceOpen$;
|
|
2228
|
+
readonly findReplaceOpen$: Observable<boolean>;
|
|
2229
|
+
private readonly _searchHighlight$;
|
|
2230
|
+
readonly searchHighlight$: Observable<IPdfSearchHighlight | null>;
|
|
2231
|
+
private _scrollSeq;
|
|
2232
|
+
private readonly _scrollTarget$;
|
|
2233
|
+
readonly scrollTarget$: Observable<IPdfScrollTarget | null>;
|
|
2090
2234
|
private readonly _clipboard$;
|
|
2091
2235
|
readonly clipboard$: Observable<IPdfPageElement[]>;
|
|
2092
2236
|
constructor(_univerInstanceService: IUniverInstanceService);
|
|
@@ -2121,6 +2265,11 @@ declare class PdfSelectionService extends Disposable implements IPdfSelectionSer
|
|
|
2121
2265
|
setInkColor(color: string): void;
|
|
2122
2266
|
setViewportRatio(ratio: IPdfViewportRatio): void;
|
|
2123
2267
|
setPreviewOpen(open: boolean): void;
|
|
2268
|
+
getFindReplaceOpen(): boolean;
|
|
2269
|
+
setFindReplaceOpen(open: boolean): void;
|
|
2270
|
+
getSearchHighlight(): IPdfSearchHighlight | null;
|
|
2271
|
+
setSearchHighlight(highlight: IPdfSearchHighlight | null): void;
|
|
2272
|
+
requestScrollToTopPt(topPt: number, pageId?: string): void;
|
|
2124
2273
|
setClipboard(elements: IPdfPageElement[]): void;
|
|
2125
2274
|
getClipboard(): IPdfPageElement[];
|
|
2126
2275
|
getPasteStep(): number;
|
|
@@ -2132,4 +2281,4 @@ declare class PdfSelectionService extends Disposable implements IPdfSelectionSer
|
|
|
2132
2281
|
getVersionSnapshot(unitId: string, versionId: string): IPdfVersionSnapshot | null;
|
|
2133
2282
|
}
|
|
2134
2283
|
|
|
2135
|
-
export { ASPECT_RATIO_LOCKED_BARCODE_TYPES, AddPdfElementCommand, AddPdfElementMutation, AddPdfLayerCommand, AddPdfPageCommand, AddPdfPageMutation, AlignSelectedPdfElementsCommand, type AspectRatioLockedBarcodeType, AssignPdfElementLayerCommand, BARCODE_TYPES, CIRCLE_MARK_BEZIER_KAPPA, DeleteSelectedPdfElementsCommand, DistributeSelectedPdfElementsCommand, DuplicateSelectedPdfElementsCommand, FindAndReplacePdfTextCommand, type IAddPdfElementCommandParams, type IAddPdfLayerCommandParams, type IAssignPdfElementLayerCommandParams, type IBarcodeBarRun, type IBarcodeLayoutBox, type IBeforePdfExportHookParams, type IBeforePdfPrintHookParams, type ICircleMarkBezierEllipse, type IComputeSmartSnapParams, type IConvertImagesToPdfOptions, type IConvertMarkdownToPdfOptions, type IDataMatrixEncodedResult, type IDeleteSelectedPdfElementsCommandParams, type IDistributeSelectedPdfElementsCommandParams, type IDynamicLayoutItemInput, type IDynamicLayoutPlacement, type IDynamicLayoutSplitOptions, type IDynamicLayoutSplitRange, type IFindAndReplacePdfTextCommandParams, type IGs1128EncodedResult, type IGs1DataMatrixEncodedResult, type IHttpSilentPrintAdapterConfig, type IImageFitPlacement, type IImportPdfSourceCommandParams, type IJapanPostBar, type IJapanPostEncodedResult, type ILinear1dEncodedResult, type INw7EncodedResult, type IParsedPdfColor, type IParsedStreamTextOp, type IPdf417EncodedResult, type IPdfAiCopilotAdapter, IPdfAttachment, type IPdfAuditSealOptions, type IPdfAuditVerificationResult, type IPdfBatchAction, type IPdfBatchPipelineFileInput, type IPdfBatchPipelineItemResult, IPdfBatesConfig, IPdfBookmarkItem, type IPdfBrowserFidelityExpectationEntry, type IPdfBrowserFidelityExpectationSuite, type IPdfBrowserFidelityExpectedOutcome, type IPdfBrowserFidelityRenderScenario, type IPdfBrowserFidelitySampleSet, type IPdfBrowserFidelityStrictErrorExpectation, IPdfCircleMarkElement, type IPdfComparisonResult, IPdfCropBox, IPdfDocument, IPdfDocumentData, type IPdfDocxDocumentSnapshot, type IPdfElementDiffItem, type IPdfExportContext, IPdfExportOptions, type IPdfExportUnifiedOptions, type IPdfExportedHookParams, type IPdfFormFieldIssue, type IPdfFormValidationResult, IPdfHeaderFooterConfig, type IPdfImportContext, type IPdfImportOptions, type IPdfImportOutcome, type IPdfImportOutcomeReport, type IPdfImportSourceOptions, type IPdfImportSourceResult, type IPdfImportWarning, type IPdfImportWithReportContext, type IPdfInspectedPageSize, type IPdfIoAdapter, type IPdfIoAdapterImportResult, type IPdfIoCapabilities, type IPdfIoFormatCapability, type IPdfIoFormatListConfig, IPdfIoService, IPdfLayer, IPdfListElement, type IPdfListPageChunk, IPdfNativeTextSpan, type IPdfOcrAdapter, type IPdfOcrFieldInput, type IPdfOcrPageInfo, type IPdfOcrRecognizedBlock, type IPdfOptimizeUnitOptions, type IPdfOrganizeAction, IPdfPage, IPdfPageElement, IPdfPageSize, type IPdfRenderedPageImage, IPdfResourceBinding, IPdfRichTextSpan, type IPdfSanitizeOptions, type IPdfSaveContext, IPdfSecurityPermissions, IPdfSelectionService, type IPdfSelectionState, type IPdfSheetConvertedStructure, type IPdfSheetConvertedTable, IPdfSignatureEnvelope, type IPdfSignedAuditResult, IPdfSignerInfo, IPdfSourceDocumentRef, type IPdfTextDiffItem, IPdfTextElement, IPdfTextStyle, IPdfUnitData, IPdfUnitMetadata, type IPdfUnitPropsPatch, type IPdfUnitSignatureVerificationResult, IPdfVersionSnapshot, type IPdfViewportRatio, IPdfWatermarkConfig, type IPdfWordBlock, type IPdfWordConvertedPage, type IPdfWordConvertedStructure, type IPdfWorkbookCell, type IPdfWorkbookSnapshot, IPdfjsAssetsConfig, type IRemovePdfLayerCommandParams, type IRenderPdfBytesToImagesOptions, type IReplacePdfNativeTextCommandParams, type IRotatePdfPageCommandParams, type ISetPdfAttachmentsCommandParams, type ISetPdfBatesConfigCommandParams, type ISetPdfBookmarksCommandParams, type ISetPdfHeaderFooterConfigCommandParams, type ISetPdfNativeTextSpansCommandParams, type ISetPdfPageCropBoxCommandParams, type ISetPdfWatermarkConfigCommandParams, type ISilentPrintOptions, type ISilentPrintResult, type ISmartSnapBox, type ISnapGuideLine, type ITemplateVariableMatch, type IUnifiedBarcodeEncoded, type IUniverPdfsConfig, type IUpdatePdfElementsCommandParams, type IUpdatePdfLayerCommandParams, type IUpdatePdfPageMutationParams, type IUpdatePdfPagePropsCommandParams, type IUpdatePdfUnitPropsCommandParams, type IUpdatePdfUnitPropsMutationParams, ImportPdfSourceCommand, type JapanPostBarState, PDF_DIFF_COLORS, PDF_PAGE_PRESETS, PDF_S1_S7_FIDELITY_EXPECTATIONS, type PdfAlignMode, PdfBatesPosition, type PdfBrowserFidelitySampleKey, type PdfCanonicalBarcodeType, PdfColorSpaceType, type PdfConvertibleImageInput, PdfDateTimeKind, PdfDisplayUnit, type PdfDistributeDirection, PdfElementType, type PdfExifMatrixTuple, type PdfExifOrientation, PdfImportError, type PdfImportErrorCode, PdfInteractionMode, PdfIoService, type PdfIoTarget, PdfIoTargetError, type PdfLayerOrderMode, PdfPageRotation, type PdfRawImportWarning, PdfSelectionService, PdfUnitModel, RemovePdfElementsMutation, RemovePdfLayerCommand, RemovePdfPageCommand, RemovePdfPageMutation, ReorderPdfElementOrderMutation, ReorderPdfLayerCommand, ReorderPdfPagesCommand, ReorderPdfPagesMutation, ReplacePdfNativeTextCommand, ReplacePdfSnapshotCommand, RestorePdfVersionCommand, RotatePdfPageCommand, SavePdfVersionCommand, SetPdfAttachmentsCommand, SetPdfBatesConfigCommand, SetPdfBookmarksCommand, SetPdfHeaderFooterConfigCommand, SetPdfNativeTextSpansCommand, SetPdfPageCropBoxCommand, SetPdfPageSizeCommand, SetPdfWatermarkConfigCommand, type SignatureQuadraticSegment, type SilentPrintDriverType, type SvgMat2D, UNIVER_PDFS_PLUGIN_NAME, UniverPdfsPlugin, UpdatePdfElementsCommand, UpdatePdfElementsMutation, UpdatePdfLayerCommand, UpdatePdfPageMutation, UpdatePdfPagePropsCommand, UpdatePdfUnitPropsCommand, UpdatePdfUnitPropsMutation, applyOcrToUnitPage, autoDetectFormFieldsOnPage, buildOverlayImportCandidateSnapshot, buildPdfTemplateFromOcrFields, canonicalJsonStringify, cmykToRgb, comparePdfBytes, comparePdfUnits, computeBarcodeLayoutBox, computeCircleMarkBezierEllipse, computeDynamicLayoutSplitRanges, computeElementCenterTransformMatrix, computeExifTransformMatrix, computeExpandedTextHeightMm, computeExpandedTextHeightPt, computeImageFitPlacement, computePasteCascadeOffset, computePdfPayloadDigest, computeSmartSnapWithEqualGap, convertImagesToPdfBytes, convertMarkdownToPdfBytes, convertMarkdownToPdfUnit, convertPdfBytesToCsv, convertPdfBytesToDocxBytes, convertPdfToSheetStructure, convertPdfToWordStructure, convertPdfUnitToCsv, createDefaultElement, createDefaultPdfUnitData, createHttpSilentPrintAdapter, createPdfAbortError, createPdfBrowserFidelityExpectations, createPdfBrowserFidelitySamples, detectFormFieldsFromPageSpans, drawVectorSvgOnPdfPage, encodeBarcodeByFormat, encodeCodabar, encodeCode128, encodeCode39, encodeDataMatrix, encodeEan13, encodeEan8, encodeGs1128, encodeGs1DataMatrix, encodeItf14, encodeJapanPost, encodeNw7, encodePdf417, encodeQrCodeMatrix, encodeUpcA, encodeUpcE, evaluatePdfFormExpression, evaluateSafeTemplateExpression, exportFormDataToFdf, exportFormDataToXfdf, exportPdfToDocxSnapshot, exportPdfToWorkbookSnapshot, exportPdfWithTarget, exportSignedPdfWithAuditSeal, extractAttachmentsFromPdfBytes, extractNativeTextSpansFromPdfBytes, formatGs1HumanReadable, formatPdfDateTimeValue, generatePdfTemplateByPrompt, getDefaultDateTimeFormat, getRegisteredOcrAdapter, importAcroFormPdfToUnit, importFormDataFromFdf, importFormDataFromXfdf, importPdfSource, insertPdfPagesBytes, inspectPdfBytePageSizes, isAspectRatioLockedBarcodeType, isCircleMarkChecked, isExifDimensionsSwapped, mayBeJson, mergePdfBytes, movePdfPageBytes, normalizeBarcodeFormatType, normalizePdfImportWarnings, optimizePdfUnit, organizePdfBytes, paginatePdfListItems, parseGs1ApplicationIdentifiers, parseInlineMarkdownToSpans, parseObjectPositionRatios, parsePdfColorWithAlpha, parsePdfContentStreamTextOps, parsePdfPageRange, parseSafeKeyValueRecord, parseSvgToVectorCommands, parseSvgTransformAttr, readJpegExifOrientation, recalculatePdfFormFields, rectsIntersect, registerOcrAdapter, removePdfPagesBytes, renderBarcodeSvgByFormat, renderBarcodeSvgDataUrlByFormat, renderDataMatrixSvg, renderDataMatrixSvgDataUrl, renderGs1128Svg, renderGs1128SvgDataUrl, renderGs1DataMatrixSvg, renderGs1DataMatrixSvgDataUrl, renderPdf417Svg, renderPdf417SvgDataUrl, renderPdfBytesToImages, resolveMultiVariableText, rgbToCmyk, rotatePdfPagesBytes, runPdfBatchPipeline, safeLookupVariablePath, sanitizePdfUnit, scanTemplateExpressionTokens, sha256BytesSync, sha256Hex, sha256HexSync, signPdfUnitWithDigest, exportSignedPdfWithAuditSeal as signPdfWithAuditDigest, smoothSignatureStrokeQuadratic, splitPdfBytes, stripPdfPageNativeTextInRects, svgToDataUri, toHtmlDateTimeInputValue, toPdfLibColor, toggleCircleMarkState, validatePdfFormFields, verifyPdfAuditSeal as verifyPdfAuditDigest, verifyPdfAuditSeal, verifyPdfUnitSignature, visitTemplateVariables, wrapPdfTextLines };
|
|
2284
|
+
export { ASPECT_RATIO_LOCKED_BARCODE_TYPES, AddPdfElementCommand, AddPdfElementMutation, AddPdfLayerCommand, AddPdfPageCommand, AddPdfPageMutation, AlignSelectedPdfElementsCommand, type AspectRatioLockedBarcodeType, AssignPdfElementLayerCommand, BARCODE_TYPES, CIRCLE_MARK_BEZIER_KAPPA, DeleteSelectedPdfElementsCommand, DistributeSelectedPdfElementsCommand, DuplicateSelectedPdfElementsCommand, FindAndReplacePdfTextCommand, type IAddPdfElementCommandParams, type IAddPdfLayerCommandParams, type IAssignPdfElementLayerCommandParams, type IBarcodeBarRun, type IBarcodeLayoutBox, type IBeforePdfExportHookParams, type IBeforePdfPrintHookParams, type ICircleMarkBezierEllipse, type IComputeSmartSnapParams, type IConvertImagesToPdfOptions, type IConvertMarkdownToPdfOptions, type IDataMatrixEncodedResult, type IDeleteSelectedPdfElementsCommandParams, type IDistributeSelectedPdfElementsCommandParams, type IDynamicLayoutItemInput, type IDynamicLayoutPlacement, type IDynamicLayoutSplitOptions, type IDynamicLayoutSplitRange, type IFindAndReplacePdfTextCommandParams, type IGs1128EncodedResult, type IGs1DataMatrixEncodedResult, type IHttpSilentPrintAdapterConfig, type IImageFitPlacement, type IImportPdfSourceCommandParams, type IJapanPostBar, type IJapanPostEncodedResult, type ILinear1dEncodedResult, type INw7EncodedResult, type IParsedPdfColor, type IParsedStreamTextOp, type IPdf417EncodedResult, type IPdfAiCopilotAdapter, IPdfAttachment, type IPdfAuditSealOptions, type IPdfAuditVerificationResult, type IPdfBatchAction, type IPdfBatchPipelineFileInput, type IPdfBatchPipelineItemResult, IPdfBatesConfig, IPdfBookmarkItem, type IPdfBrowserFidelityExpectationEntry, type IPdfBrowserFidelityExpectationSuite, type IPdfBrowserFidelityExpectedOutcome, type IPdfBrowserFidelityRenderScenario, type IPdfBrowserFidelitySampleSet, type IPdfBrowserFidelityStrictErrorExpectation, IPdfCircleMarkElement, type IPdfComparisonResult, IPdfCropBox, IPdfDocument, IPdfDocumentData, type IPdfDocxDocumentSnapshot, type IPdfElementDiffItem, type IPdfEncryptionInspection, type IPdfExportContext, IPdfExportOptions, type IPdfExportUnifiedOptions, type IPdfExportedHookParams, type IPdfFormFieldIssue, type IPdfFormValidationResult, IPdfHeaderFooterConfig, type IPdfImportBytesOptions, type IPdfImportContext, type IPdfImportOptions, type IPdfImportOutcome, type IPdfImportOutcomeReport, type IPdfImportSourceOptions, type IPdfImportSourceResult, type IPdfImportWarning, type IPdfImportWithReportContext, type IPdfInspectedPageSize, type IPdfIoAdapter, type IPdfIoAdapterImportResult, type IPdfIoCapabilities, type IPdfIoFormatCapability, type IPdfIoFormatListConfig, IPdfIoService, IPdfLayer, IPdfListElement, type IPdfListPageChunk, IPdfNativeTextSpan, type IPdfOcrAdapter, type IPdfOcrFieldInput, type IPdfOcrPageInfo, type IPdfOcrRecognizedBlock, type IPdfOptimizeUnitOptions, type IPdfOrganizeAction, IPdfPage, IPdfPageElement, IPdfPageSize, type IPdfRenderedPageImage, IPdfResourceBinding, IPdfRichTextSpan, type IPdfSanitizeOptions, type IPdfSaveContext, type IPdfScrollTarget, type IPdfSearchHighlight, IPdfSecurityConfig, IPdfSecurityPermissionFlags, IPdfSecurityPermissions, IPdfSelectionService, type IPdfSelectionState, type IPdfSheetConvertedStructure, type IPdfSheetConvertedTable, IPdfSignatureEnvelope, type IPdfSignedAuditResult, IPdfSignerInfo, IPdfSourceDocumentRef, type IPdfTextDiffItem, IPdfTextElement, IPdfTextStyle, IPdfUnitData, IPdfUnitMetadata, type IPdfUnitPropsPatch, type IPdfUnitSignatureVerificationResult, IPdfVersionSnapshot, type IPdfViewportRatio, IPdfWatermarkConfig, type IPdfWordBlock, type IPdfWordConvertedPage, type IPdfWordConvertedStructure, type IPdfWorkbookCell, type IPdfWorkbookSnapshot, IPdfjsAssetsConfig, type IRemovePdfLayerCommandParams, type IRenderPdfBytesToImagesOptions, type IReplacePdfNativeTextCommandParams, type IRotatePdfPageCommandParams, type ISetPdfAttachmentsCommandParams, type ISetPdfBatesConfigCommandParams, type ISetPdfBookmarksCommandParams, type ISetPdfHeaderFooterConfigCommandParams, type ISetPdfNativeTextSpansCommandParams, type ISetPdfPageCropBoxCommandParams, type ISetPdfSecurityConfigCommandParams, type ISetPdfWatermarkConfigCommandParams, type ISilentPrintOptions, type ISilentPrintResult, type ISmartSnapBox, type ISnapGuideLine, type ITemplateVariableMatch, type IUnifiedBarcodeEncoded, type IUniverPdfsConfig, type IUpdatePdfElementsCommandParams, type IUpdatePdfLayerCommandParams, type IUpdatePdfPageMutationParams, type IUpdatePdfPagePropsCommandParams, type IUpdatePdfUnitPropsCommandParams, type IUpdatePdfUnitPropsMutationParams, ImportPdfSourceCommand, type JapanPostBarState, PDF_DIFF_COLORS, PDF_PAGE_PRESETS, PDF_PASSWORD_PADDING, PDF_S1_S7_FIDELITY_EXPECTATIONS, type PdfAlignMode, PdfBatesPosition, type PdfBrowserFidelitySampleKey, type PdfCanonicalBarcodeType, PdfColorSpaceType, type PdfConvertibleImageInput, PdfDateTimeKind, PdfDisplayUnit, type PdfDistributeDirection, PdfElementType, type PdfExifMatrixTuple, type PdfExifOrientation, PdfImportError, type PdfImportErrorCode, PdfInteractionMode, PdfIoService, type PdfIoTarget, PdfIoTargetError, type PdfLayerOrderMode, PdfPageRotation, type PdfRawImportWarning, PdfSecurityError, type PdfSecurityErrorCode, PdfSelectionService, PdfUnitModel, RemovePdfElementsMutation, RemovePdfLayerCommand, RemovePdfPageCommand, RemovePdfPageMutation, ReorderPdfElementOrderMutation, ReorderPdfLayerCommand, ReorderPdfPagesCommand, ReorderPdfPagesMutation, ReplacePdfNativeTextCommand, ReplacePdfSnapshotCommand, RestorePdfVersionCommand, RotatePdfPageCommand, SavePdfVersionCommand, SetPdfAttachmentsCommand, SetPdfBatesConfigCommand, SetPdfBookmarksCommand, SetPdfHeaderFooterConfigCommand, SetPdfNativeTextSpansCommand, SetPdfPageCropBoxCommand, SetPdfPageSizeCommand, SetPdfSecurityConfigCommand, SetPdfWatermarkConfigCommand, type SignatureQuadraticSegment, type SilentPrintDriverType, type SvgMat2D, UNIVER_PDFS_PLUGIN_NAME, UniverPdfsPlugin, UpdatePdfElementsCommand, UpdatePdfElementsMutation, UpdatePdfLayerCommand, UpdatePdfPageMutation, UpdatePdfPagePropsCommand, UpdatePdfUnitPropsCommand, UpdatePdfUnitPropsMutation, applyOcrToUnitPage, applyPdfSecurityToDocument, autoDetectFormFieldsOnPage, buildObjectEncryptionKey, buildOverlayImportCandidateSnapshot, buildPdfTemplateFromOcrFields, bytesToHex, canonicalJsonStringify, cmykToRgb, comparePdfBytes, comparePdfUnits, computeBarcodeLayoutBox, computeCircleMarkBezierEllipse, computeDynamicLayoutSplitRanges, computeElementCenterTransformMatrix, computeExifTransformMatrix, computeExpandedTextHeightMm, computeExpandedTextHeightPt, computeFileEncryptionKeyFromPadded, computeImageFitPlacement, computeOwnerPasswordValue, computePasteCascadeOffset, computePdfPayloadDigest, computeSmartSnapWithEqualGap, computeUserPasswordValue, convertImagesToPdfBytes, convertMarkdownToPdfBytes, convertMarkdownToPdfUnit, convertPdfBytesToCsv, convertPdfBytesToDocxBytes, convertPdfToSheetStructure, convertPdfToWordStructure, convertPdfUnitToCsv, createDefaultElement, createDefaultPdfUnitData, createHttpSilentPrintAdapter, createPdfAbortError, createPdfBrowserFidelityExpectations, createPdfBrowserFidelitySamples, decodePdfPermissionFlags, decryptPdfBytes, detectFormFieldsFromPageSpans, drawVectorSvgOnPdfPage, encodeBarcodeByFormat, encodeCodabar, encodeCode128, encodeCode39, encodeDataMatrix, encodeEan13, encodeEan8, encodeGs1128, encodeGs1DataMatrix, encodeItf14, encodeJapanPost, encodeNw7, encodePdf417, encodePdfPermissionFlags, encodeQrCodeMatrix, encodeUpcA, encodeUpcE, encryptPdfBytes, evaluatePdfFormExpression, evaluateSafeTemplateExpression, exportFormDataToFdf, exportFormDataToXfdf, exportPdfToDocxSnapshot, exportPdfToWorkbookSnapshot, exportPdfWithTarget, exportSignedPdfWithAuditSeal, extractAttachmentsFromPdfBytes, extractNativeTextSpansFromPdfBytes, formatGs1HumanReadable, formatPdfDateTimeValue, generatePdfTemplateByPrompt, getDefaultDateTimeFormat, getRegisteredOcrAdapter, hexToBytes, importAcroFormPdfToUnit, importFormDataFromFdf, importFormDataFromXfdf, importPdfBytesToUnit, importPdfSource, insertPdfPagesBytes, inspectPdfBytePageSizes, inspectPdfEncryption, isAspectRatioLockedBarcodeType, isCircleMarkChecked, isExifDimensionsSwapped, isPdfSecurityActive, mayBeJson, md5Bytes, mergePdfBytes, movePdfPageBytes, normalizeBarcodeFormatType, normalizePdfImportWarnings, optimizePdfUnit, organizePdfBytes, padPdfPassword, paginatePdfListItems, parseGs1ApplicationIdentifiers, parseInlineMarkdownToSpans, parseObjectPositionRatios, parsePdfColorWithAlpha, parsePdfContentStreamTextOps, parsePdfPageRange, parseSafeKeyValueRecord, parseSvgToVectorCommands, parseSvgTransformAttr, rc4Bytes, readJpegExifOrientation, recalculatePdfFormFields, rectsIntersect, registerOcrAdapter, removePdfPagesBytes, renderBarcodeSvgByFormat, renderBarcodeSvgDataUrlByFormat, renderDataMatrixSvg, renderDataMatrixSvgDataUrl, renderGs1128Svg, renderGs1128SvgDataUrl, renderGs1DataMatrixSvg, renderGs1DataMatrixSvgDataUrl, renderPdf417Svg, renderPdf417SvgDataUrl, renderPdfBytesToImages, resolveMultiVariableText, rgbToCmyk, rotatePdfPagesBytes, runPdfBatchPipeline, safeLookupVariablePath, sanitizePdfUnit, scanTemplateExpressionTokens, sha256BytesSync, sha256Hex, sha256HexSync, signPdfUnitWithDigest, exportSignedPdfWithAuditSeal as signPdfWithAuditDigest, smoothSignatureStrokeQuadratic, splitPdfBytes, stripPdfPageNativeTextInRects, svgToDataUri, toHtmlDateTimeInputValue, toPdfLibColor, toggleCircleMarkState, validatePdfFormFields, verifyAndDecryptPdfBytes, verifyPdfAuditSeal as verifyPdfAuditDigest, verifyPdfAuditSeal, verifyPdfUnitSignature, visitTemplateVariables, wrapPdfTextLines };
|
package/lib/types/jsx/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { Y as IJsxAbsoluteProps, aL as IPdfJsxNode, Z as IJsxBarcodeProps, _ as IJsxBoxProps, a0 as IJsxDocumentProps, aa as IJsxShapeProps, a1 as IJsxHeaderFooterProps, a2 as IJsxImageProps, a3 as IJsxLineProps, a4 as IJsxListProps, a5 as IJsxMultiVariableTextProps, a7 as IJsxPageProps, a6 as IJsxPageBreakProps, a8 as IJsxQrCodeProps, a9 as IJsxRowProps, ab as IJsxSpacerProps, ac as IJsxStackProps, ad as IJsxStaticProps, ae as IJsxSvgProps, ag as IJsxTableProps, ah as IJsxTextProps, bA as PdfJsxComponent, W as IExportJsxToPdfOptions, bf as IRenderJsxOptions, I as IPdfUnitData, be as IPdfmeTemplate } from '../jsx-dev-runtime-DsfnOIFS.js';
|
|
2
|
+
export { Q as Fragment, $ as IJsxContainerStyleProps, af as IJsxTableColumnSpec, bk as JSX, bm as PDF_JSX_ELEMENT_SYMBOL, bn as PDF_JSX_FRAGMENT_SYMBOL, bz as PdfJsxChild, bB as PdfJsxIntrinsicKind, bC as PdfJsxPaddingSpec, c0 as createPdfJsxNode, c6 as evaluatePdfJsxElement, cd as extractJsxTextContent, cg as flattenJsxChildrenToNodes, cp as isPdfJsxNode, cq as jsx, cr as jsxDEV, cs as jsxs, cC as resolvePaddingMm } from '../jsx-dev-runtime-DsfnOIFS.js';
|
|
3
3
|
import '@univerjs/core';
|
|
4
4
|
|
|
5
5
|
declare function Document(props?: IJsxDocumentProps): IPdfJsxNode<IJsxDocumentProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Q as Fragment, bk as JSX, cq as jsx, cr as jsxDEV, cs as jsxs } from '../jsx-dev-runtime-DsfnOIFS.js';
|
|
2
2
|
import '@univerjs/core';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Q as Fragment, bk as JSX, cq as jsx, cr as jsxDEV, cs as jsxs } from '../jsx-dev-runtime-DsfnOIFS.js';
|
|
2
2
|
import '@univerjs/core';
|
|
@@ -271,6 +271,7 @@ interface IPdfLayer {
|
|
|
271
271
|
locked?: boolean;
|
|
272
272
|
printable?: boolean;
|
|
273
273
|
}
|
|
274
|
+
type IPdfLayerConfig = IPdfLayer;
|
|
274
275
|
interface IPdfPageElementBase {
|
|
275
276
|
id: string;
|
|
276
277
|
type: PdfElementType;
|
|
@@ -604,6 +605,8 @@ interface IPdfBookmarkItem {
|
|
|
604
605
|
pageIndex: number;
|
|
605
606
|
/** Optional vertical offset in pt from top of target page */
|
|
606
607
|
topOffsetPt?: number;
|
|
608
|
+
/** Optional vertical offset alias in pt from top of target page */
|
|
609
|
+
topPt?: number;
|
|
607
610
|
children?: IPdfBookmarkItem[];
|
|
608
611
|
}
|
|
609
612
|
type PdfBatesPosition = 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft';
|
|
@@ -644,6 +647,26 @@ interface IPdfAttachment {
|
|
|
644
647
|
dataBase64: string;
|
|
645
648
|
description?: string;
|
|
646
649
|
}
|
|
650
|
+
interface IPdfSecurityPermissionFlags {
|
|
651
|
+
print?: boolean;
|
|
652
|
+
highResPrint?: boolean;
|
|
653
|
+
modify?: boolean;
|
|
654
|
+
copy?: boolean;
|
|
655
|
+
annotate?: boolean;
|
|
656
|
+
fillForms?: boolean;
|
|
657
|
+
assemble?: boolean;
|
|
658
|
+
}
|
|
659
|
+
interface IPdfSecurityConfig {
|
|
660
|
+
enabled?: boolean;
|
|
661
|
+
/** Open password (user password) required to open the PDF */
|
|
662
|
+
userPassword?: string;
|
|
663
|
+
/** Permissions/master password (owner password) */
|
|
664
|
+
ownerPassword?: string;
|
|
665
|
+
/** Granular PDF Standard Security Handler permission flags */
|
|
666
|
+
permissions?: IPdfSecurityPermissionFlags;
|
|
667
|
+
/** RC4 encryption key length in bits (`40` for V=1/R=2, `128` default for PDF 1.4+ V=2/R=3) */
|
|
668
|
+
keyLength?: 40 | 128;
|
|
669
|
+
}
|
|
647
670
|
interface IPdfSecurityPermissions {
|
|
648
671
|
openPasswordHash?: string;
|
|
649
672
|
ownerPasswordHash?: string;
|
|
@@ -731,6 +754,8 @@ interface IPdfUnitMetadata {
|
|
|
731
754
|
batesConfig?: IPdfBatesConfig;
|
|
732
755
|
/** Embedded file attachments (`/EmbeddedFiles`) */
|
|
733
756
|
attachments?: IPdfAttachment[];
|
|
757
|
+
/** Standard PDF password encryption & permission configuration (`/Standard` RC4) */
|
|
758
|
+
security?: IPdfSecurityConfig;
|
|
734
759
|
/** Document security & permission restrictions */
|
|
735
760
|
securityPermissions?: IPdfSecurityPermissions;
|
|
736
761
|
/** Digital signature SHA-256 envelope */
|
|
@@ -760,8 +785,12 @@ interface IPdfUnitData {
|
|
|
760
785
|
editState: IPdfDurableEditState;
|
|
761
786
|
/** Optional named PDF Optional Content Group (`/OCProperties`) layers */
|
|
762
787
|
layers?: IPdfLayer[];
|
|
788
|
+
/** Optional navigable PDF outline bookmark tree (`/Outlines`) */
|
|
789
|
+
bookmarks?: IPdfBookmarkItem[];
|
|
763
790
|
/** Optional embedded file attachments (`/Names /EmbeddedFiles`) */
|
|
764
791
|
attachments?: IPdfAttachment[];
|
|
792
|
+
/** Optional standard PDF password encryption & permissions (`/Standard` RC4) */
|
|
793
|
+
security?: IPdfSecurityConfig;
|
|
765
794
|
/** Optional document security & permission restrictions */
|
|
766
795
|
securityPermissions?: IPdfSecurityPermissions;
|
|
767
796
|
/** Optional deterministic SHA-256 digital signature envelope */
|
|
@@ -1256,6 +1285,8 @@ interface IPdfExportOptions {
|
|
|
1256
1285
|
accessibilityTagged?: boolean;
|
|
1257
1286
|
/** Compresses uncompressed streams with FlateDecode & prunes unreferenced indirect objects */
|
|
1258
1287
|
optimizeSize?: boolean;
|
|
1288
|
+
/** Optional standard PDF password encryption & permission restrictions (`/Standard` RC4) */
|
|
1289
|
+
security?: IPdfSecurityConfig;
|
|
1259
1290
|
/** Optional `AbortSignal` to cancel PDF compilation before or during async rendering */
|
|
1260
1291
|
signal?: AbortSignal;
|
|
1261
1292
|
}
|
|
@@ -1376,6 +1407,11 @@ declare function formatBatesNumber(batesConfig: IPdfBatesConfig, pageZeroIndex:
|
|
|
1376
1407
|
* Compiles a Univer `IPdfUnitData` snapshot (plus optional dataset values & export options) into standard PDF bytes.
|
|
1377
1408
|
*/
|
|
1378
1409
|
declare function exportPdfBytes(snapshot: IPdfUnitData, runtimeData?: Record<string, unknown>, options?: IPdfExportOptions): Promise<Uint8Array>;
|
|
1410
|
+
/**
|
|
1411
|
+
* Alias for `exportPdfBytes`: compiles an `IPdfUnitData` snapshot (with optional dataset bindings
|
|
1412
|
+
* and `unit.security` / `options.security` encryption) into PDF binary bytes (`Uint8Array`).
|
|
1413
|
+
*/
|
|
1414
|
+
declare const exportPdfUnitToBytes: typeof exportPdfBytes;
|
|
1379
1415
|
/**
|
|
1380
1416
|
* Loads an interactive PDF binary (`Uint8Array`) via `PDFDocument.load`, inspects all `AcroForm`
|
|
1381
1417
|
* fields (`PDFTextField`, `PDFCheckBox`, `PDFDropdown`, `PDFOptionList`, `PDFRadioGroup`, `/FT /Sig`),
|
|
@@ -1731,4 +1767,4 @@ declare namespace JSX {
|
|
|
1731
1767
|
}
|
|
1732
1768
|
}
|
|
1733
1769
|
|
|
1734
|
-
export { type
|
|
1770
|
+
export { type IJsxContainerStyleProps as $, type PdfColorSpaceType as A, type IPdfExportOptions as B, PDF_PAGE_PRESETS as C, type PdfBatesPosition as D, type IPdfSignerInfo as E, type IPdfSecurityPermissionFlags as F, type IPdfjsAssetsConfig as G, type PdfDisplayUnit as H, type IPdfUnitData as I, type PdfInteractionMode as J, type IPdfVersionSnapshot as K, DEFAULT_PDF_CJK_FONT_FAMILY as L, DEFAULT_PDF_CJK_FONT_FILES as M, DEFAULT_PDF_CJK_FONT_PACKAGE as N, DEFAULT_PDF_CJK_FONT_VERSION as O, PdfElementType as P, Fragment as Q, type ICjkDetectionSummary as R, type IComputeDynamicFontSizeParams as S, type IDetectedPaperPreset as T, type IDiagnosePdfFontsOptions as U, type IDiagnosticGridOverlayOptions as V, type IExportJsxToPdfOptions as W, type IInputsCjkReport as X, type IJsxAbsoluteProps as Y, type IJsxBarcodeProps as Z, type IJsxBoxProps as _, type IPdfDocument as a, type IPdfStampElement as a$, type IJsxDocumentProps as a0, type IJsxHeaderFooterProps as a1, type IJsxImageProps as a2, type IJsxLineProps as a3, type IJsxListProps as a4, type IJsxMultiVariableTextProps as a5, type IJsxPageBreakProps as a6, type IJsxPageProps as a7, type IJsxQrCodeProps as a8, type IJsxRowProps as a9, type IPdfFieldContractHint as aA, type IPdfFontDiagnosisReport as aB, type IPdfFontDiagnosticIssue as aC, type IPdfFontDoctorInputEntry as aD, type IPdfFontSource as aE, type IPdfImageCrop as aF, type IPdfImageElement as aG, type IPdfInkElement as aH, type IPdfInkPoint as aI, type IPdfInputContractValidationResult as aJ, type IPdfInputContractViolation as aK, type IPdfJsxNode as aL, type IPdfLayerConfig as aM, type IPdfLineElement as aN, type IPdfMissingGlyphItem as aO, type IPdfPageElementBase as aP, type IPdfParagraphBlock as aQ, type IPdfPolygonElement as aR, type IPdfPolygonPoint as aS, type IPdfQrCodeElement as aT, type IPdfRadioGroupElement as aU, type IPdfRedactionElement as aV, type IPdfRenderWarning as aW, type IPdfSchemaDiagnosticIssue as aX, type IPdfSelectElement as aY, type IPdfShapeElement as aZ, type IPdfSignatureElement as a_, type IJsxShapeProps as aa, type IJsxSpacerProps as ab, type IJsxStackProps as ac, type IJsxStaticProps as ad, type IJsxSvgProps as ae, type IJsxTableColumnSpec as af, type IJsxTableProps as ag, type IJsxTextProps as ah, type IPdfAnnotationElement as ai, type IPdfAnnotationReply as aj, type IPdfBarcodeElement as ak, type IPdfBrowserRenderOptions as al, type IPdfCheckboxElement as am, type IPdfCjkFontSourcesOptions as an, type IPdfDatasetField as ao, type IPdfDatasetSchema as ap, type IPdfDateTimeElement as aq, type IPdfDocumentMetadata as ar, type IPdfDurableEditState as as, type IPdfDynamicFontSizeConfig as at, type IPdfElement as au, type IPdfElementBase as av, type IPdfElementTransform as aw, type IPdfEllipseElement as ax, type IPdfExportCapabilitiesReport as ay, type IPdfFailedFontEntry as az, type IPdfPage as b, createPdfCjkFontSources as b$, type IPdfSvgElement as b0, type IPdfTableBorderWidths as b1, type IPdfTableCellStyle as b2, type IPdfTableColumn as b3, type IPdfTableElement as b4, type IPdfTableMerge as b5, type IPdfTablePageChunk as b6, type IPdfTablePaginationOptions as b7, type IPdfTableRowCapacity as b8, type IPdfTableThemePreset as b9, type PdfJsxComponent as bA, type PdfJsxIntrinsicKind as bB, type PdfJsxPaddingSpec as bC, PdfListKind as bD, PdfListPresetId as bE, type PdfMissingGlyphPolicy as bF, type PdfPaperPresetName as bG, PdfRenderError as bH, PdfTableBorderStyle as bI, PdfTableCellVerticalAlign as bJ, type PdfTablePaginationMode as bK, PdfTextAnchor as bL, type PdfTextFormatMode as bM, type PdfTextOverflowMode as bN, type PdfZebraParityMode as bO, UNIVER_PDF_SCHEMA as bP, UNIVER_PDF_SCHEMA_VERSION as bQ, buildMinimalTestTrueTypeFont as bR, calculatePdfTableRowCapacity as bS, clearPdfFontUrlCache as bT, collectMissingGlyphsFromPdfUnit as bU, collectPdfInputContractHints as bV, collectUsedCodePointsFromPdfUnit as bW, computeAutoFitFontSize as bX, computeDynamicFontSize as bY, computeFontUrlCacheKey as bZ, computePdfTableSummaryRow as b_, type IPdfTemplateSchemaValidationResult as ba, type IPdfVariableValidationResult as bb, type IPdfmeBlankPdf as bc, type IPdfmeSchemaItem as bd, type IPdfmeTemplate as be, type IRenderJsxOptions as bf, type ISubsetFontResult as bg, type ITemplateCjkReport as bh, type ITrueTypeFontInspection as bi, type IValidatePdfTemplateSchemaOptions as bj, JSX as bk, PAGE_SIZE_PRESETS_MM as bl, PDF_JSX_ELEMENT_SYMBOL as bm, PDF_JSX_FRAGMENT_SYMBOL as bn, PDF_TABLE_THEME_PRESETS as bo, PT_PER_MM as bp, type PdfAnnotationStatus as bq, PdfAnnotationType as br, type PdfBarcodeFormat as bs, type PdfCjkScriptBlock as bt, type PdfCjkTextMode as bu, type PdfDynamicFontFitMode as bv, type PdfFontFailureKind as bw, type PdfFontFallbackPolicy as bx, PdfImageSourceType as by, type PdfJsxChild as bz, type IPdfPageSize as c, createPdfJsxNode as c0, detectCJKCharacters as c1, detectCJKInPdfInputs as c2, detectCJKInPdfTemplate as c3, detectPaperSizePreset as c4, diagnosePdfFonts as c5, evaluatePdfJsxElement as c6, exportBatchPdfBytes as c7, exportCalibrationGridPdfBytes as c8, exportPdfBytes as c9, renderQrCodeDataUrl as cA, resolveDynamicTableRawRows as cB, resolvePaddingMm as cC, resolvePageSizeMm as cD, resolvePolygonNormalizedPoints as cE, resolveTemplateString as cF, subsetTrueTypeFont as cG, toPdfmeTemplate as cH, validatePdfInputContract as cI, validatePdfTemplateSchema as cJ, validatePdfTemplateVariables as cK, wrapMixedCjkAndLatinLines as cL, exportPdfUnitToBytes as ca, exportToPdfmeTemplate as cb, extractAcroFormValuesFromPdfBytes as cc, extractJsxTextContent as cd, extractPdfFormValues as ce, fillPdfFormValues as cf, flattenJsxChildrenToNodes as cg, formatBatesNumber as ch, formatPdfTableCell as ci, fromPdfmeTemplate as cj, getTrueTypeMappedCodePoints as ck, importFromPdfmeTemplate as cl, inspectPdfExportCapabilities as cm, inspectTrueTypeFont as cn, isFontUrlSafeToFetch as co, isPdfJsxNode as cp, jsx as cq, jsxDEV as cr, jsxs as cs, mmToPt as ct, normalizeBarcodePayloadForFormat as cu, normalizeImageCrop as cv, overlayDiagnosticGridOnPdfBytes as cw, paginatePdfTableRows as cx, ptToMm as cy, renderBarcodeDataUrl as cz, type IPdfPageElement as d, type IPdfLayer as e, type IPdfSourceDocumentRef as f, type IPdfResourceBinding as g, type IPdfUnitMetadata as h, type IPdfBookmarkItem as i, type IPdfAttachment as j, type IPdfSecurityConfig as k, type IPdfSecurityPermissions as l, type IPdfSignatureEnvelope as m, type IPdfTextStyle as n, type PdfPageRotation as o, type IPdfBatesConfig as p, type IPdfHeaderFooterConfig as q, type IPdfNativeTextSpan as r, type IPdfCropBox as s, type IPdfWatermarkConfig as t, type IPdfDocumentData as u, type IPdfTextElement as v, type PdfDateTimeKind as w, type IPdfCircleMarkElement as x, type IPdfListElement as y, type IPdfRichTextSpan as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yudaocode/univer-pdfs",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.218",
|
|
4
4
|
"description": "Univer PDFs core unit model, commands, PDF exporter, JSX layout DSL, and template adapter",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/yudaocode/yudao-univer#readme",
|