@yudaocode/univer-pdfs 1.6.217 → 1.6.219
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/README.md +8 -8
- package/lib/cjs/facade/index.js +2 -1
- package/lib/cjs/facade/index.js.map +1 -1
- package/lib/cjs/index.js +4071 -857
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/jsx/index.js +1688 -418
- package/lib/cjs/jsx/index.js.map +1 -1
- package/lib/es/{chunk-EMSHTYYU.js → chunk-PQUNQAVL.js} +2072 -289
- package/lib/es/chunk-PQUNQAVL.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 +1588 -114
- package/lib/es/index.js.map +1 -1
- package/lib/es/jsx/index.js +1 -1
- package/lib/types/index.d.ts +303 -4
- 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-B1jMa7VW.d.ts} +87 -4
- 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, n as IPdfAnnotationReply, P as PdfElementType, o as IPdfTextStyle, p as PdfPageRotation, q as PdfAnnotationReviewStatus, r as IPdfBatesConfig, s as IPdfHeaderFooterConfig, t as IPdfNativeTextSpan, u as IPdfCropBox, v as IPdfCropBoxInput, w as IPdfWatermarkConfig, x as IPdfDocumentData, y as IPdfTextElement, z as PdfDateTimeKind, A as IPdfCircleMarkElement, B as IPdfListElement, C as IPdfRichTextSpan, D as PdfColorSpaceType, E as IPdfExportOptions, F as PDF_PAGE_PRESETS, G as PdfBatesPosition, H as IPdfSignerInfo, J as IPdfSecurityPermissionFlags, K as IPdfStampElement, L as IPdfSvgElement, M as IPdfjsAssetsConfig, N as PdfDisplayUnit, O as PdfInteractionMode, Q as IPdfVersionSnapshot } from './jsx-dev-runtime-B1jMa7VW.js';
|
|
2
|
+
export { R as DEFAULT_PDF_CJK_FONT_FAMILY, S as DEFAULT_PDF_CJK_FONT_FILES, T as DEFAULT_PDF_CJK_FONT_PACKAGE, U as DEFAULT_PDF_CJK_FONT_VERSION, V as Fragment, W as ICjkDetectionSummary, X as IComputeDynamicFontSizeParams, Y as IDetectedPaperPreset, Z as IDiagnosePdfFontsOptions, _ as IDiagnosticGridOverlayOptions, $ as IExportJsxToPdfOptions, a0 as IInputsCjkReport, a1 as IJsxAbsoluteProps, a2 as IJsxBarcodeProps, a3 as IJsxBoxProps, a4 as IJsxContainerStyleProps, a5 as IJsxDocumentProps, a6 as IJsxHeaderFooterProps, a7 as IJsxImageProps, a8 as IJsxLineProps, a9 as IJsxListProps, aa as IJsxMultiVariableTextProps, ab as IJsxPageBreakProps, ac as IJsxPageProps, ad as IJsxQrCodeProps, ae as IJsxRowProps, af as IJsxShapeProps, ag as IJsxSpacerProps, ah as IJsxStackProps, ai as IJsxStaticProps, aj as IJsxSvgProps, ak as IJsxTableColumnSpec, al as IJsxTableProps, am as IJsxTextProps, an as IPdfAnnotationElement, ao as IPdfBarcodeElement, ap as IPdfBrowserRenderOptions, aq as IPdfCheckboxElement, ar as IPdfCjkFontSourcesOptions, as as IPdfCommentThread, at as IPdfDatasetField, au as IPdfDatasetSchema, av as IPdfDateTimeElement, aw as IPdfDocumentMetadata, ax as IPdfDurableEditState, ay as IPdfDynamicFontSizeConfig, az as IPdfElement, aA as IPdfElementBase, aB as IPdfElementTransform, aC as IPdfEllipseElement, aD as IPdfExportCapabilitiesReport, aE as IPdfFailedFontEntry, aF as IPdfFieldContractHint, aG as IPdfFontDiagnosisReport, aH as IPdfFontDiagnosticIssue, aI as IPdfFontDoctorInputEntry, aJ as IPdfFontSource, aK as IPdfImageCrop, aL as IPdfImageElement, aM as IPdfInkElement, aN as IPdfInkPoint, aO as IPdfInputContractValidationResult, aP as IPdfInputContractViolation, aQ as IPdfJsxNode, aR as IPdfLayerConfig, aS as IPdfLineElement, aT as IPdfMissingGlyphItem, aU as IPdfPageElementBase, aV as IPdfParagraphBlock, aW as IPdfPolygonElement, aX as IPdfPolygonPoint, aY as IPdfQrCodeElement, aZ as IPdfRadioGroupElement, a_ as IPdfRedactionElement, a$ as IPdfRenderWarning, b0 as IPdfSchemaDiagnosticIssue, b1 as IPdfSelectElement, b2 as IPdfShapeElement, b3 as IPdfSignatureElement, b4 as IPdfTableBorderWidths, b5 as IPdfTableCellStyle, b6 as IPdfTableColumn, b7 as IPdfTableElement, b8 as IPdfTableMerge, b9 as IPdfTablePageChunk, ba as IPdfTablePaginationOptions, bb as IPdfTableRowCapacity, bc as IPdfTableThemePreset, bd as IPdfTemplateSchemaValidationResult, be as IPdfVariableValidationResult, bf as IPdfmeBlankPdf, bg as IPdfmeSchemaItem, bh as IPdfmeTemplate, bi as IRenderJsxOptions, bj as ISubsetFontResult, bk as ITemplateCjkReport, bl as ITrueTypeFontInspection, bm as IValidatePdfTemplateSchemaOptions, bn as JSX, bo as PAGE_SIZE_PRESETS_MM, bp as PDF_JSX_ELEMENT_SYMBOL, bq as PDF_JSX_FRAGMENT_SYMBOL, br as PDF_TABLE_THEME_PRESETS, bs as PT_PER_MM, bt as PdfAnnotationStatus, bu as PdfAnnotationType, bv as PdfBarcodeFormat, bw as PdfCjkScriptBlock, bx as PdfCjkTextMode, by as PdfDynamicFontFitMode, bz as PdfFontFailureKind, bA as PdfFontFallbackPolicy, bB as PdfImageSourceType, bC as PdfJsxChild, bD as PdfJsxComponent, bE as PdfJsxIntrinsicKind, bF as PdfJsxPaddingSpec, bG as PdfListKind, bH as PdfListPresetId, bI as PdfMissingGlyphPolicy, bJ as PdfPaperPresetName, bK as PdfRenderError, bL as PdfTableBorderStyle, bM as PdfTableCellVerticalAlign, bN as PdfTablePaginationMode, bO as PdfTextAnchor, bP as PdfTextFormatMode, bQ as PdfTextOverflowMode, bR as PdfZebraParityMode, bS as UNIVER_PDF_SCHEMA, bT as UNIVER_PDF_SCHEMA_VERSION, bU as buildMinimalTestTrueTypeFont, bV as calculatePdfTableRowCapacity, bW as clearPdfFontUrlCache, bX as collectMissingGlyphsFromPdfUnit, bY as collectPdfInputContractHints, bZ as collectUsedCodePointsFromPdfUnit, b_ as computeAutoFitFontSize, b$ as computeDynamicFontSize, c0 as computeFontUrlCacheKey, c1 as computePdfTableSummaryRow, c2 as createPdfCjkFontSources, c3 as createPdfJsxNode, c4 as detectCJKCharacters, c5 as detectCJKInPdfInputs, c6 as detectCJKInPdfTemplate, c7 as detectPaperSizePreset, c8 as diagnosePdfFonts, c9 as evaluatePdfJsxElement, ca as exportBatchPdfBytes, cb as exportCalibrationGridPdfBytes, cc as exportPdfBytes, cd as exportPdfUnitToBytes, ce as exportToPdfmeTemplate, cf as extractAcroFormValuesFromPdfBytes, cg as extractJsxTextContent, ch as extractPdfFormValues, ci as fillPdfFormValues, cj as flattenJsxChildrenToNodes, ck as formatBatesNumber, cl as formatPdfTableCell, cm as fromPdfmeTemplate, cn as getTrueTypeMappedCodePoints, co as importFromPdfmeTemplate, cp as inspectPdfExportCapabilities, cq as inspectTrueTypeFont, cr as isFontUrlSafeToFetch, cs as isPdfJsxNode, ct as jsx, cu as jsxDEV, cv as jsxs, cw as mmToPt, cx as normalizeBarcodePayloadForFormat, cy as normalizeImageCrop, cz as overlayDiagnosticGridOnPdfBytes, cA as paginatePdfTableRows, cB as ptToMm, cC as renderBarcodeDataUrl, cD as renderQrCodeDataUrl, cE as resolveDynamicTableRawRows, cF as resolvePaddingMm, cG as resolvePageSizeMm, cH as resolvePdfCropBoxPt, cI as resolvePolygonNormalizedPoints, cJ as resolveTemplateString, cK as subsetTrueTypeFont, cL as toPdfmeTemplate, cM as validatePdfInputContract, cN as validatePdfTemplateSchema, cO as validatePdfTemplateVariables, cP as wrapMixedCjkAndLatinLines } from './jsx-dev-runtime-B1jMa7VW.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;
|
|
@@ -178,7 +180,7 @@ declare const RotatePdfPageCommand: ICommand<IRotatePdfPageCommandParams>;
|
|
|
178
180
|
interface ISetPdfPageCropBoxCommandParams {
|
|
179
181
|
unitId?: string;
|
|
180
182
|
pageId?: string;
|
|
181
|
-
cropBox?: IPdfCropBox;
|
|
183
|
+
cropBox?: IPdfCropBox | IPdfCropBoxInput | null;
|
|
182
184
|
}
|
|
183
185
|
declare const SetPdfPageCropBoxCommand: ICommand<ISetPdfPageCropBoxCommandParams>;
|
|
184
186
|
declare const SetPdfPageSizeCommand: ICommand<{
|
|
@@ -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;
|
|
@@ -292,6 +299,34 @@ interface IUpdatePdfUnitPropsCommandParams {
|
|
|
292
299
|
props?: IPdfUnitPropsPatch;
|
|
293
300
|
}
|
|
294
301
|
declare const UpdatePdfUnitPropsCommand: ICommand<IUpdatePdfUnitPropsCommandParams>;
|
|
302
|
+
interface IAddPdfAnnotationReplyCommandParams {
|
|
303
|
+
unitId?: string;
|
|
304
|
+
pageId?: string;
|
|
305
|
+
elementId: string;
|
|
306
|
+
reply?: Partial<IPdfAnnotationReply> & {
|
|
307
|
+
content: string;
|
|
308
|
+
};
|
|
309
|
+
id?: string;
|
|
310
|
+
author?: string;
|
|
311
|
+
content?: string;
|
|
312
|
+
createdAt?: string;
|
|
313
|
+
onCreated?: (reply: IPdfAnnotationReply) => void;
|
|
314
|
+
}
|
|
315
|
+
declare const AddPdfAnnotationReplyCommand: ICommand<IAddPdfAnnotationReplyCommandParams>;
|
|
316
|
+
interface IDeletePdfAnnotationReplyCommandParams {
|
|
317
|
+
unitId?: string;
|
|
318
|
+
pageId?: string;
|
|
319
|
+
elementId: string;
|
|
320
|
+
replyId: string;
|
|
321
|
+
}
|
|
322
|
+
declare const DeletePdfAnnotationReplyCommand: ICommand<IDeletePdfAnnotationReplyCommandParams>;
|
|
323
|
+
interface ISetPdfAnnotationReviewStatusCommandParams {
|
|
324
|
+
unitId?: string;
|
|
325
|
+
pageId?: string;
|
|
326
|
+
elementId: string;
|
|
327
|
+
reviewStatus: PdfAnnotationReviewStatus;
|
|
328
|
+
}
|
|
329
|
+
declare const SetPdfAnnotationReviewStatusCommand: ICommand<ISetPdfAnnotationReviewStatusCommandParams>;
|
|
295
330
|
|
|
296
331
|
interface IAddPdfElementMutationParams {
|
|
297
332
|
unitId: string;
|
|
@@ -668,6 +703,43 @@ declare function organizePdfBytes(pdfBytes: Uint8Array, planOrOptions: IPdfOrgan
|
|
|
668
703
|
pages?: IPdfOrganizePageSpec[];
|
|
669
704
|
actions?: IPdfOrganizeAction[];
|
|
670
705
|
}): Promise<Uint8Array>;
|
|
706
|
+
interface IPdfParseRangeSpecOptions {
|
|
707
|
+
everyNPages?: number;
|
|
708
|
+
}
|
|
709
|
+
interface IPdfSplitUnitPart {
|
|
710
|
+
label: string;
|
|
711
|
+
pageIndices: number[];
|
|
712
|
+
unit: IPdfUnitData;
|
|
713
|
+
}
|
|
714
|
+
interface IPdfSplitBytesPart {
|
|
715
|
+
label: string;
|
|
716
|
+
pageCount: number;
|
|
717
|
+
bytes: Uint8Array;
|
|
718
|
+
}
|
|
719
|
+
declare function formatPdfPageIndicesLabel(pageIndices: number[]): string;
|
|
720
|
+
/**
|
|
721
|
+
* Parses a page-range split specification into an array of 0-based page index groups (`number[][]`).
|
|
722
|
+
*
|
|
723
|
+
* Supported formats:
|
|
724
|
+
* - Comma/semicolon-separated 1-based groups: `"1-3, 5, 7-9"` -> `[[0, 1, 2], [4], [6, 7, 8]]`
|
|
725
|
+
* - Combined non-contiguous group with `+`: `"1-2+5, 3-4"` -> `[[0, 1, 4], [2, 3]]`
|
|
726
|
+
* - Open-ended trailing range: `"4-"` -> `[[3, ..., totalPages - 1]]`
|
|
727
|
+
* - Parity keywords: `"odd"` -> `[[0, 2, 4, ...]]`, `"even"` -> `[[1, 3, 5, ...]]`, `"all"` / `"*"`
|
|
728
|
+
* - Fixed-size chunking: `"every:2"` / `"every 2"` / `"every2"` / `"single"` or `options.everyNPages`
|
|
729
|
+
*/
|
|
730
|
+
declare function parsePdfPageRangeSpec(spec: string, totalPages: number, options?: IPdfParseRangeSpecOptions): number[][];
|
|
731
|
+
/**
|
|
732
|
+
* Splits an `IPdfUnitData` snapshot into standalone `IPdfUnitData` units according to page-range specs.
|
|
733
|
+
*/
|
|
734
|
+
declare function splitPdfUnitByRanges(unitData: IPdfUnitData, specs: string[], options?: IPdfParseRangeSpecOptions): IPdfSplitUnitPart[];
|
|
735
|
+
/**
|
|
736
|
+
* Splits an arbitrary PDF binary (`Uint8Array`, including password-encrypted PDFs when `options.password` is supplied)
|
|
737
|
+
* into standalone valid PDF binaries using `pdf-lib` `copyPages`.
|
|
738
|
+
*/
|
|
739
|
+
declare function splitPdfBytesByRanges(pdfBytes: Uint8Array, specs: string[], options?: {
|
|
740
|
+
password?: string;
|
|
741
|
+
everyNPages?: number;
|
|
742
|
+
}): Promise<IPdfSplitBytesPart[]>;
|
|
671
743
|
|
|
672
744
|
/** Exact 4-arc cubic Bezier circular/elliptical approximation constant `4 * (sqrt(2) - 1) / 3` */
|
|
673
745
|
declare const CIRCLE_MARK_BEZIER_KAPPA = 0.5522847498;
|
|
@@ -1207,6 +1279,25 @@ declare function renderBarcodeSvgDataUrlByFormat(format: string | undefined, raw
|
|
|
1207
1279
|
height?: number;
|
|
1208
1280
|
}): string;
|
|
1209
1281
|
|
|
1282
|
+
/** 1 PostScript point (1/72 inch) = 12,700 English Metric Units (914,400 EMU / inch) */
|
|
1283
|
+
declare const PPTX_EMU_PER_PT = 12700;
|
|
1284
|
+
declare function ptToPptxEmu(pt: number): number;
|
|
1285
|
+
/**
|
|
1286
|
+
* Converts an `IPdfUnitData` snapshot into a valid, zero-dependency OpenXML `.pptx` PresentationML binary (`Uint8Array`).
|
|
1287
|
+
*
|
|
1288
|
+
* Maps each PDF page (`widthPt × heightPt` -> `1 pt = 12700 EMU` in `<p:sldSz>`) to `ppt/slides/slideN.xml`,
|
|
1289
|
+
* converting `TEXT` & `nativeTextSpans` into editable `<p:sp>` text boxes, `TABLE` elements into native `<p:graphicFrame><a:tbl>` tables,
|
|
1290
|
+
* `SHAPE` / `LINE` / `ELLIPSE` elements into native `<p:sp>` shapes, and `IMAGE` data URLs into `ppt/media/imageM.*` + `<p:pic>`.
|
|
1291
|
+
*/
|
|
1292
|
+
declare function convertPdfUnitToPptxBytes(unitData: IPdfUnitData): Uint8Array;
|
|
1293
|
+
/**
|
|
1294
|
+
* Imports a raw PDF binary (`Uint8Array`, decrypting with `options.password` when encrypted)
|
|
1295
|
+
* via `importPdfBytesToUnit` and converts all pages into an editable OpenXML `.pptx` file.
|
|
1296
|
+
*/
|
|
1297
|
+
declare function convertPdfBytesToPptxBytes(pdfBytes: Uint8Array, options?: {
|
|
1298
|
+
password?: string;
|
|
1299
|
+
}): Promise<Uint8Array>;
|
|
1300
|
+
|
|
1210
1301
|
type IPdfWordBlock = {
|
|
1211
1302
|
type: 'heading' | 'paragraph';
|
|
1212
1303
|
text: string;
|
|
@@ -1621,6 +1712,172 @@ interface IPdfBrowserFidelityExpectationSuite {
|
|
|
1621
1712
|
declare function createPdfBrowserFidelityExpectations(): IPdfBrowserFidelityExpectationSuite;
|
|
1622
1713
|
declare const PDF_S1_S7_FIDELITY_EXPECTATIONS: Readonly<IPdfBrowserFidelityExpectationSuite>;
|
|
1623
1714
|
|
|
1715
|
+
type PdfSecurityErrorCode = 'PDF_PASSWORD_REQUIRED' | 'PDF_INVALID_PASSWORD' | 'PDF_UNSUPPORTED_ENCRYPTION';
|
|
1716
|
+
declare class PdfSecurityError extends Error {
|
|
1717
|
+
readonly code: PdfSecurityErrorCode;
|
|
1718
|
+
constructor(code: PdfSecurityErrorCode, message: string);
|
|
1719
|
+
}
|
|
1720
|
+
interface IPdfEncryptionInspection {
|
|
1721
|
+
encrypted: boolean;
|
|
1722
|
+
requiresOpenPassword: boolean;
|
|
1723
|
+
filter?: string;
|
|
1724
|
+
version?: number;
|
|
1725
|
+
revision?: number;
|
|
1726
|
+
keyLength?: number;
|
|
1727
|
+
permissionFlagsRaw?: number;
|
|
1728
|
+
permissions: Required<IPdfSecurityPermissionFlags>;
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* ISO 32000-1 §7.6.3.3 standard 32-byte password padding string.
|
|
1732
|
+
*/
|
|
1733
|
+
declare const PDF_PASSWORD_PADDING: Uint8Array<ArrayBuffer>;
|
|
1734
|
+
/**
|
|
1735
|
+
* Pure TypeScript RFC 1321 MD5 digest (16 bytes), 100% browser- and Node-safe with zero external dependencies.
|
|
1736
|
+
*/
|
|
1737
|
+
declare function md5Bytes(data: Uint8Array): Uint8Array;
|
|
1738
|
+
/**
|
|
1739
|
+
* Pure TypeScript RC4 (ARCFOUR) symmetric stream cipher over `Uint8Array`.
|
|
1740
|
+
*/
|
|
1741
|
+
declare function rc4Bytes(key: Uint8Array, data: Uint8Array): Uint8Array;
|
|
1742
|
+
declare function bytesToHex(bytes: Uint8Array): string;
|
|
1743
|
+
declare function hexToBytes(hexRaw: string): Uint8Array;
|
|
1744
|
+
declare function padPdfPassword(password?: string | Uint8Array): Uint8Array;
|
|
1745
|
+
/**
|
|
1746
|
+
* Encodes `IPdfSecurityPermissionFlags` into the signed 32-bit PDF `/P` permission bitmask
|
|
1747
|
+
* per ISO 32000-1 §7.6.3.2 Table 22.
|
|
1748
|
+
*/
|
|
1749
|
+
declare function encodePdfPermissionFlags(permissions?: IPdfSecurityPermissionFlags, revision?: 2 | 3): number;
|
|
1750
|
+
/**
|
|
1751
|
+
* Decodes signed 32-bit PDF `/P` permission bitmask into structured `IPdfSecurityPermissionFlags`.
|
|
1752
|
+
*/
|
|
1753
|
+
declare function decodePdfPermissionFlags(pMask: number, revision?: number): Required<IPdfSecurityPermissionFlags>;
|
|
1754
|
+
declare function isPdfSecurityActive(security?: IPdfSecurityConfig | null): boolean;
|
|
1755
|
+
/**
|
|
1756
|
+
* ISO 32000-1 §7.6.3.4 Algorithm 3: Computing the `/O` value (32 bytes).
|
|
1757
|
+
*/
|
|
1758
|
+
declare function computeOwnerPasswordValue(userPassword: string, ownerPassword: string, revision: 2 | 3, keyLengthBits: number): Uint8Array;
|
|
1759
|
+
/**
|
|
1760
|
+
* ISO 32000-1 §7.6.3.3 Algorithm 2: Computing the file encryption key from a 32-byte padded password.
|
|
1761
|
+
*/
|
|
1762
|
+
declare function computeFileEncryptionKeyFromPadded(paddedUserPassword: Uint8Array, oValue: Uint8Array, pFlagsSigned: number, fileId: Uint8Array, revision: 2 | 3, keyLengthBits: number): Uint8Array;
|
|
1763
|
+
/**
|
|
1764
|
+
* ISO 32000-1 §7.6.3.4 Algorithm 4 & Algorithm 5: Computing the `/U` value (32 bytes).
|
|
1765
|
+
*/
|
|
1766
|
+
declare function computeUserPasswordValue(encryptionKey: Uint8Array, fileId: Uint8Array, revision: 2 | 3): Uint8Array;
|
|
1767
|
+
/**
|
|
1768
|
+
* ISO 32000-1 §7.6.2 Algorithm 1: Derives per-object RC4 key for `(objectNumber, generationNumber)`.
|
|
1769
|
+
*/
|
|
1770
|
+
declare function buildObjectEncryptionKey(encryptionKey: Uint8Array, objectNumber: number, generationNumber: number): Uint8Array;
|
|
1771
|
+
/**
|
|
1772
|
+
* Encrypts all indirect objects (strings & streams) inside an in-memory `pdf-lib` `PDFDocument`
|
|
1773
|
+
* 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).
|
|
1774
|
+
* Caller MUST save with `{ useObjectStreams: false }` so indirect object numbers match traditional PDF xref.
|
|
1775
|
+
*/
|
|
1776
|
+
declare function applyPdfSecurityToDocument(pdfDoc: PDFDocument, security: IPdfSecurityConfig): Promise<void>;
|
|
1777
|
+
/**
|
|
1778
|
+
* Encrypts raw PDF bytes using PDF Standard Security Handler (`V=2, R=3` 128-bit RC4 by default).
|
|
1779
|
+
*/
|
|
1780
|
+
declare function encryptPdfBytes(pdfBytes: Uint8Array, security: IPdfSecurityConfig): Promise<Uint8Array>;
|
|
1781
|
+
/**
|
|
1782
|
+
* Inspects a PDF binary (`Uint8Array`) for `/Encrypt` dictionary metadata,
|
|
1783
|
+
* open-password requirement, and decoded `/P` permissions without mutating the input.
|
|
1784
|
+
*/
|
|
1785
|
+
declare function inspectPdfEncryption(pdfBytes: Uint8Array): IPdfEncryptionInspection;
|
|
1786
|
+
/**
|
|
1787
|
+
* Authenticates `password` (`""`, `userPassword`, or `ownerPassword`) against `/U` and `/O`,
|
|
1788
|
+
* decrypts all indirect object strings & streams, strips `/Encrypt` from trailer, and returns
|
|
1789
|
+
* clean unencrypted PDF bytes ready for `PDFDocument.load` and `importPdfBytesToUnit`.
|
|
1790
|
+
*/
|
|
1791
|
+
declare function decryptPdfBytes(pdfBytes: Uint8Array, password?: string): Promise<Uint8Array>;
|
|
1792
|
+
/**
|
|
1793
|
+
* Verifies PDF encryption status and returns unencrypted PDF bytes (throwing `PdfSecurityError`
|
|
1794
|
+
* if an open password is required and missing or if the provided password is invalid).
|
|
1795
|
+
*/
|
|
1796
|
+
declare function verifyAndDecryptPdfBytes(pdfBytes: Uint8Array, password?: string): Promise<Uint8Array>;
|
|
1797
|
+
|
|
1798
|
+
interface IPdfImportBytesOptions {
|
|
1799
|
+
/** Optional open/owner password for encrypted PDFs */
|
|
1800
|
+
password?: string;
|
|
1801
|
+
/** Optional explicit unit ID */
|
|
1802
|
+
unitId?: string;
|
|
1803
|
+
/** Optional document name override */
|
|
1804
|
+
name?: string;
|
|
1805
|
+
/** Alias for `name` */
|
|
1806
|
+
title?: string;
|
|
1807
|
+
/** Optional source file name recorded on `sourceDocumentRef.fileName` */
|
|
1808
|
+
fileName?: string;
|
|
1809
|
+
/**
|
|
1810
|
+
* When `true`, also promotes extracted native text spans into editable `TEXT` elements
|
|
1811
|
+
* on pages that have no editable elements yet. Defaults to `false` (spans preserved in `nativeTextSpansByPage`).
|
|
1812
|
+
*/
|
|
1813
|
+
promoteNativeTextToElements?: boolean;
|
|
1814
|
+
}
|
|
1815
|
+
/**
|
|
1816
|
+
* Verifies & decrypts an input PDF binary (supporting Standard Security Handler RC4 encryption)
|
|
1817
|
+
* and imports pages, native text spans, AcroForm widgets, `/Outlines` bookmarks, and `/OCProperties` layers
|
|
1818
|
+
* into an editable `IPdfUnitData` snapshot.
|
|
1819
|
+
*/
|
|
1820
|
+
declare function importPdfBytesToUnit(pdfBytes: Uint8Array, options?: IPdfImportBytesOptions): Promise<IPdfUnitData>;
|
|
1821
|
+
|
|
1822
|
+
type PdfStandardStampPresetId = 'approved' | 'rejected' | 'confidential' | 'draft' | 'reviewed' | 'urgent' | 'void' | 'archived';
|
|
1823
|
+
type PdfApprovalStampShape = 'rect' | 'pill' | 'circle';
|
|
1824
|
+
interface IPdfStandardStampPreset {
|
|
1825
|
+
id: PdfStandardStampPresetId;
|
|
1826
|
+
title: string;
|
|
1827
|
+
subtitle: string;
|
|
1828
|
+
color: string;
|
|
1829
|
+
shape: PdfApprovalStampShape;
|
|
1830
|
+
}
|
|
1831
|
+
declare const PDF_STANDARD_STAMP_PRESETS: readonly IPdfStandardStampPreset[];
|
|
1832
|
+
declare const PDF_STANDARD_STAMP_PRESET_MAP: Record<PdfStandardStampPresetId, IPdfStandardStampPreset>;
|
|
1833
|
+
declare function getPdfStandardStampPreset(presetId?: string): IPdfStandardStampPreset | undefined;
|
|
1834
|
+
interface IBuildPdfApprovalStampOptions {
|
|
1835
|
+
preset?: PdfStandardStampPresetId | string;
|
|
1836
|
+
title?: string;
|
|
1837
|
+
subtitle?: string;
|
|
1838
|
+
signer?: string;
|
|
1839
|
+
dateText?: string;
|
|
1840
|
+
color?: string;
|
|
1841
|
+
shape?: PdfApprovalStampShape;
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
* Generates a crisp, self-contained vector `<svg>` approval stamp suitable for both browser rendering
|
|
1845
|
+
* and direct vector PDF export via `AddPdfElementCommand` (`PdfElementType.SVG` or `PdfElementType.STAMP`).
|
|
1846
|
+
*/
|
|
1847
|
+
declare function buildPdfApprovalStampSvg(options: IBuildPdfApprovalStampOptions): string;
|
|
1848
|
+
interface ISvgTextDrawDescriptor {
|
|
1849
|
+
text: string;
|
|
1850
|
+
leftPt: number;
|
|
1851
|
+
topPt: number;
|
|
1852
|
+
widthPt: number;
|
|
1853
|
+
heightPt: number;
|
|
1854
|
+
fontSizePt: number;
|
|
1855
|
+
bold: boolean;
|
|
1856
|
+
color: string;
|
|
1857
|
+
align: 'left' | 'center' | 'right';
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
* Extracts positioned `<text>` labels from a stamp/diagram `<svg>` scaled to `(boxWidthPt, boxHeightPt)`
|
|
1861
|
+
* so `exportPdfBytes` can emit crisp PDF text alongside vector SVG shapes.
|
|
1862
|
+
*/
|
|
1863
|
+
declare function extractSvgTextDescriptors(svgXml: string, boxWidthPt: number, boxHeightPt: number): ISvgTextDrawDescriptor[];
|
|
1864
|
+
/**
|
|
1865
|
+
* Builds a ready-to-insert vector `SVG` stamp element payload for `AddPdfElementCommand`.
|
|
1866
|
+
*/
|
|
1867
|
+
declare function createPdfApprovalStampSvgElement(options: IBuildPdfApprovalStampOptions & {
|
|
1868
|
+
left?: number;
|
|
1869
|
+
top?: number;
|
|
1870
|
+
angle?: number;
|
|
1871
|
+
}): Partial<IPdfSvgElement>;
|
|
1872
|
+
/**
|
|
1873
|
+
* Builds a `PdfElementType.STAMP` element enriched with dynamic SVG stamp vector content.
|
|
1874
|
+
*/
|
|
1875
|
+
declare function createPdfApprovalStampElement(options: IBuildPdfApprovalStampOptions & {
|
|
1876
|
+
left?: number;
|
|
1877
|
+
top?: number;
|
|
1878
|
+
angle?: number;
|
|
1879
|
+
}): Partial<IPdfStampElement>;
|
|
1880
|
+
|
|
1624
1881
|
interface IPdfImportWarning {
|
|
1625
1882
|
code: string;
|
|
1626
1883
|
message: string;
|
|
@@ -1994,6 +2251,21 @@ interface IPdfViewportRatio {
|
|
|
1994
2251
|
width: number;
|
|
1995
2252
|
height: number;
|
|
1996
2253
|
}
|
|
2254
|
+
interface IPdfSearchHighlight {
|
|
2255
|
+
pageId: string;
|
|
2256
|
+
left: number;
|
|
2257
|
+
top: number;
|
|
2258
|
+
width: number;
|
|
2259
|
+
height: number;
|
|
2260
|
+
elementId?: string;
|
|
2261
|
+
spanId?: string;
|
|
2262
|
+
query?: string;
|
|
2263
|
+
}
|
|
2264
|
+
interface IPdfScrollTarget {
|
|
2265
|
+
pageId?: string;
|
|
2266
|
+
topPt: number;
|
|
2267
|
+
seq: number;
|
|
2268
|
+
}
|
|
1997
2269
|
interface IPdfSelectionState {
|
|
1998
2270
|
unitId: string | null;
|
|
1999
2271
|
activePageId: string | null;
|
|
@@ -2013,6 +2285,10 @@ interface IPdfSelectionService {
|
|
|
2013
2285
|
readonly inkColor$: Observable<string>;
|
|
2014
2286
|
readonly viewportRatio$: Observable<IPdfViewportRatio>;
|
|
2015
2287
|
readonly previewOpen$: Observable<boolean>;
|
|
2288
|
+
readonly splitModalOpen$: Observable<boolean>;
|
|
2289
|
+
readonly findReplaceOpen$: Observable<boolean>;
|
|
2290
|
+
readonly searchHighlight$: Observable<IPdfSearchHighlight | null>;
|
|
2291
|
+
readonly scrollTarget$: Observable<IPdfScrollTarget | null>;
|
|
2016
2292
|
readonly clipboard$: Observable<IPdfPageElement[]>;
|
|
2017
2293
|
readonly versionsChange$: Observable<string>;
|
|
2018
2294
|
getState(): IPdfSelectionState;
|
|
@@ -2045,6 +2321,13 @@ interface IPdfSelectionService {
|
|
|
2045
2321
|
setInkColor(color: string): void;
|
|
2046
2322
|
setViewportRatio(ratio: IPdfViewportRatio): void;
|
|
2047
2323
|
setPreviewOpen(open: boolean): void;
|
|
2324
|
+
getSplitModalOpen(): boolean;
|
|
2325
|
+
setSplitModalOpen(open: boolean): void;
|
|
2326
|
+
getFindReplaceOpen(): boolean;
|
|
2327
|
+
setFindReplaceOpen(open: boolean): void;
|
|
2328
|
+
getSearchHighlight(): IPdfSearchHighlight | null;
|
|
2329
|
+
setSearchHighlight(highlight: IPdfSearchHighlight | null): void;
|
|
2330
|
+
requestScrollToTopPt(topPt: number, pageId?: string): void;
|
|
2048
2331
|
setClipboard(elements: IPdfPageElement[]): void;
|
|
2049
2332
|
getClipboard(): IPdfPageElement[];
|
|
2050
2333
|
getPasteStep(): number;
|
|
@@ -2087,6 +2370,15 @@ declare class PdfSelectionService extends Disposable implements IPdfSelectionSer
|
|
|
2087
2370
|
readonly viewportRatio$: Observable<IPdfViewportRatio>;
|
|
2088
2371
|
private readonly _previewOpen$;
|
|
2089
2372
|
readonly previewOpen$: Observable<boolean>;
|
|
2373
|
+
private readonly _splitModalOpen$;
|
|
2374
|
+
readonly splitModalOpen$: Observable<boolean>;
|
|
2375
|
+
private readonly _findReplaceOpen$;
|
|
2376
|
+
readonly findReplaceOpen$: Observable<boolean>;
|
|
2377
|
+
private readonly _searchHighlight$;
|
|
2378
|
+
readonly searchHighlight$: Observable<IPdfSearchHighlight | null>;
|
|
2379
|
+
private _scrollSeq;
|
|
2380
|
+
private readonly _scrollTarget$;
|
|
2381
|
+
readonly scrollTarget$: Observable<IPdfScrollTarget | null>;
|
|
2090
2382
|
private readonly _clipboard$;
|
|
2091
2383
|
readonly clipboard$: Observable<IPdfPageElement[]>;
|
|
2092
2384
|
constructor(_univerInstanceService: IUniverInstanceService);
|
|
@@ -2121,6 +2413,13 @@ declare class PdfSelectionService extends Disposable implements IPdfSelectionSer
|
|
|
2121
2413
|
setInkColor(color: string): void;
|
|
2122
2414
|
setViewportRatio(ratio: IPdfViewportRatio): void;
|
|
2123
2415
|
setPreviewOpen(open: boolean): void;
|
|
2416
|
+
getSplitModalOpen(): boolean;
|
|
2417
|
+
setSplitModalOpen(open: boolean): void;
|
|
2418
|
+
getFindReplaceOpen(): boolean;
|
|
2419
|
+
setFindReplaceOpen(open: boolean): void;
|
|
2420
|
+
getSearchHighlight(): IPdfSearchHighlight | null;
|
|
2421
|
+
setSearchHighlight(highlight: IPdfSearchHighlight | null): void;
|
|
2422
|
+
requestScrollToTopPt(topPt: number, pageId?: string): void;
|
|
2124
2423
|
setClipboard(elements: IPdfPageElement[]): void;
|
|
2125
2424
|
getClipboard(): IPdfPageElement[];
|
|
2126
2425
|
getPasteStep(): number;
|
|
@@ -2132,4 +2431,4 @@ declare class PdfSelectionService extends Disposable implements IPdfSelectionSer
|
|
|
2132
2431
|
getVersionSnapshot(unitId: string, versionId: string): IPdfVersionSnapshot | null;
|
|
2133
2432
|
}
|
|
2134
2433
|
|
|
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 };
|
|
2434
|
+
export { ASPECT_RATIO_LOCKED_BARCODE_TYPES, AddPdfAnnotationReplyCommand, AddPdfElementCommand, AddPdfElementMutation, AddPdfLayerCommand, AddPdfPageCommand, AddPdfPageMutation, AlignSelectedPdfElementsCommand, type AspectRatioLockedBarcodeType, AssignPdfElementLayerCommand, BARCODE_TYPES, CIRCLE_MARK_BEZIER_KAPPA, DeletePdfAnnotationReplyCommand, DeleteSelectedPdfElementsCommand, DistributeSelectedPdfElementsCommand, DuplicateSelectedPdfElementsCommand, FindAndReplacePdfTextCommand, type IAddPdfAnnotationReplyCommandParams, type IAddPdfElementCommandParams, type IAddPdfLayerCommandParams, type IAssignPdfElementLayerCommandParams, type IBarcodeBarRun, type IBarcodeLayoutBox, type IBeforePdfExportHookParams, type IBeforePdfPrintHookParams, type IBuildPdfApprovalStampOptions, type ICircleMarkBezierEllipse, type IComputeSmartSnapParams, type IConvertImagesToPdfOptions, type IConvertMarkdownToPdfOptions, type IDataMatrixEncodedResult, type IDeletePdfAnnotationReplyCommandParams, 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, IPdfAnnotationReply, 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, IPdfCropBoxInput, 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 IPdfParseRangeSpecOptions, 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 IPdfSplitBytesPart, type IPdfSplitUnitPart, IPdfStampElement, type IPdfStandardStampPreset, IPdfSvgElement, 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 ISetPdfAnnotationReviewStatusCommandParams, 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 ISvgTextDrawDescriptor, 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, PDF_STANDARD_STAMP_PRESETS, PDF_STANDARD_STAMP_PRESET_MAP, PPTX_EMU_PER_PT, type PdfAlignMode, PdfAnnotationReviewStatus, type PdfApprovalStampShape, 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, type PdfStandardStampPresetId, PdfUnitModel, RemovePdfElementsMutation, RemovePdfLayerCommand, RemovePdfPageCommand, RemovePdfPageMutation, ReorderPdfElementOrderMutation, ReorderPdfLayerCommand, ReorderPdfPagesCommand, ReorderPdfPagesMutation, ReplacePdfNativeTextCommand, ReplacePdfSnapshotCommand, RestorePdfVersionCommand, RotatePdfPageCommand, SavePdfVersionCommand, SetPdfAnnotationReviewStatusCommand, 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, buildPdfApprovalStampSvg, 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, convertPdfBytesToPptxBytes, convertPdfToSheetStructure, convertPdfToWordStructure, convertPdfUnitToCsv, convertPdfUnitToPptxBytes, createDefaultElement, createDefaultPdfUnitData, createHttpSilentPrintAdapter, createPdfAbortError, createPdfApprovalStampElement, createPdfApprovalStampSvgElement, 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, extractSvgTextDescriptors, formatGs1HumanReadable, formatPdfDateTimeValue, formatPdfPageIndicesLabel, generatePdfTemplateByPrompt, getDefaultDateTimeFormat, getPdfStandardStampPreset, 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, parsePdfPageRangeSpec, parseSafeKeyValueRecord, parseSvgToVectorCommands, parseSvgTransformAttr, ptToPptxEmu, 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, splitPdfBytesByRanges, splitPdfUnitByRanges, 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 { a1 as IJsxAbsoluteProps, aQ as IPdfJsxNode, a2 as IJsxBarcodeProps, a3 as IJsxBoxProps, a5 as IJsxDocumentProps, af as IJsxShapeProps, a6 as IJsxHeaderFooterProps, a7 as IJsxImageProps, a8 as IJsxLineProps, a9 as IJsxListProps, aa as IJsxMultiVariableTextProps, ac as IJsxPageProps, ab as IJsxPageBreakProps, ad as IJsxQrCodeProps, ae as IJsxRowProps, ag as IJsxSpacerProps, ah as IJsxStackProps, ai as IJsxStaticProps, aj as IJsxSvgProps, al as IJsxTableProps, am as IJsxTextProps, bD as PdfJsxComponent, $ as IExportJsxToPdfOptions, bi as IRenderJsxOptions, I as IPdfUnitData, bh as IPdfmeTemplate } from '../jsx-dev-runtime-B1jMa7VW.js';
|
|
2
|
+
export { V as Fragment, a4 as IJsxContainerStyleProps, ak as IJsxTableColumnSpec, bn as JSX, bp as PDF_JSX_ELEMENT_SYMBOL, bq as PDF_JSX_FRAGMENT_SYMBOL, bC as PdfJsxChild, bE as PdfJsxIntrinsicKind, bF as PdfJsxPaddingSpec, c3 as createPdfJsxNode, c9 as evaluatePdfJsxElement, cg as extractJsxTextContent, cj as flattenJsxChildrenToNodes, cs as isPdfJsxNode, ct as jsx, cu as jsxDEV, cv as jsxs, cF as resolvePaddingMm } from '../jsx-dev-runtime-B1jMa7VW.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 { V as Fragment, bn as JSX, ct as jsx, cu as jsxDEV, cv as jsxs } from '../jsx-dev-runtime-B1jMa7VW.js';
|
|
2
2
|
import '@univerjs/core';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { V as Fragment, bn as JSX, ct as jsx, cu as jsxDEV, cv as jsxs } from '../jsx-dev-runtime-B1jMa7VW.js';
|
|
2
2
|
import '@univerjs/core';
|