pdfnative 1.0.4 → 1.1.0
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 +105 -14
- package/dist/index.cjs +778 -258
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +146 -4
- package/dist/index.d.ts +146 -4
- package/dist/index.js +772 -259
- package/dist/index.js.map +1 -1
- package/dist/worker/index.cjs +423 -187
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.js +423 -187
- package/dist/worker/index.js.map +1 -1
- package/fonts/noto-emoji-data.d.ts +27 -0
- package/fonts/noto-emoji-data.js +64 -0
- package/fonts/noto-sans-data.d.ts +22 -0
- package/fonts/noto-sans-data.js +64 -0
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -149,6 +149,20 @@ interface ColumnDef {
|
|
|
149
149
|
readonly mx: number;
|
|
150
150
|
/** Max characters for header cells. */
|
|
151
151
|
readonly mxH: number;
|
|
152
|
+
/**
|
|
153
|
+
* Minimum column width in points. When set, the resolved width is
|
|
154
|
+
* clamped to at least this value, redistributing the surplus across
|
|
155
|
+
* the remaining unconstrained columns (proportional to their `f`).
|
|
156
|
+
* @since 1.1.0
|
|
157
|
+
*/
|
|
158
|
+
readonly minWidth?: number;
|
|
159
|
+
/**
|
|
160
|
+
* Maximum column width in points. When set, the resolved width is
|
|
161
|
+
* clamped to at most this value, redistributing the surplus across
|
|
162
|
+
* the remaining unconstrained columns (proportional to their `f`).
|
|
163
|
+
* @since 1.1.0
|
|
164
|
+
*/
|
|
165
|
+
readonly maxWidth?: number;
|
|
152
166
|
}
|
|
153
167
|
/**
|
|
154
168
|
* Options for generating a PDF in a Web Worker via `generatePDFInWorker()`.
|
|
@@ -383,6 +397,15 @@ interface WatermarkText {
|
|
|
383
397
|
readonly opacity?: number;
|
|
384
398
|
/** Rotation angle in degrees (counterclockwise). Default: -45. */
|
|
385
399
|
readonly angle?: number;
|
|
400
|
+
/**
|
|
401
|
+
* Auto-fit: clamp `fontSize` so the rotated bounding box fits within the
|
|
402
|
+
* page minus a 24-pt safety margin. Default: `true` (added in v1.1.0).
|
|
403
|
+
*
|
|
404
|
+
* Set to `false` to preserve byte-stable output when callers depend on
|
|
405
|
+
* the exact `fontSize` even if it produces a watermark that overflows
|
|
406
|
+
* the page (legacy v1.0.x behaviour).
|
|
407
|
+
*/
|
|
408
|
+
readonly autoFit?: boolean;
|
|
386
409
|
}
|
|
387
410
|
/**
|
|
388
411
|
* Image watermark configuration.
|
|
@@ -752,6 +775,31 @@ interface TableBlock {
|
|
|
752
775
|
readonly headers: readonly string[];
|
|
753
776
|
readonly rows: readonly PdfRow[];
|
|
754
777
|
readonly columns?: readonly ColumnDef[];
|
|
778
|
+
/**
|
|
779
|
+
* Clip cell contents to column bounds using PDF clip-path operators.
|
|
780
|
+
* When `true`, each header/data cell is wrapped in `q <rect> re W n ... Q` so
|
|
781
|
+
* over-long text cannot escape the column rectangle visually.
|
|
782
|
+
*
|
|
783
|
+
* When `false`, cells rely solely on the existing `truncate()` character cap
|
|
784
|
+
* (ColumnDef.mx / mxH) — variable-width glyphs may still overflow visually.
|
|
785
|
+
*
|
|
786
|
+
* Default: `true` (recommended for PDF/A and visual safety).
|
|
787
|
+
* @since 1.1.0
|
|
788
|
+
*/
|
|
789
|
+
readonly clipCells?: boolean;
|
|
790
|
+
/**
|
|
791
|
+
* Auto-fit column widths to actual content widths, respecting per-column
|
|
792
|
+
* `minWidth` / `maxWidth` constraints. Surplus or deficit is redistributed
|
|
793
|
+
* across unconstrained columns proportional to their `f` fraction.
|
|
794
|
+
*
|
|
795
|
+
* When `false` (default), the explicit `f` fractions are used as-is.
|
|
796
|
+
*
|
|
797
|
+
* Note: byte-output is non-deterministic vs explicit widths because resolved
|
|
798
|
+
* widths depend on text content and font metrics. Use only when content-aware
|
|
799
|
+
* sizing is desired.
|
|
800
|
+
* @since 1.1.0
|
|
801
|
+
*/
|
|
802
|
+
readonly autoFitColumns?: boolean;
|
|
755
803
|
}
|
|
756
804
|
/** List block — bullet or numbered items. */
|
|
757
805
|
interface ListBlock {
|
|
@@ -1856,6 +1904,14 @@ declare const DEFAULT_COLORS: PdfColors;
|
|
|
1856
1904
|
declare const DEFAULT_COLUMNS: ColumnDef[];
|
|
1857
1905
|
/**
|
|
1858
1906
|
* Compute column X positions and widths given columns and content width.
|
|
1907
|
+
*
|
|
1908
|
+
* Honours optional `minWidth` / `maxWidth` constraints (in points) by clamping
|
|
1909
|
+
* each constrained column then redistributing the surplus or deficit across
|
|
1910
|
+
* the unconstrained columns proportional to their fractional weight `f`.
|
|
1911
|
+
* Falls back to a single uniform proration pass when all columns are
|
|
1912
|
+
* constrained or the unconstrained weights sum to zero.
|
|
1913
|
+
*
|
|
1914
|
+
* @since 1.1.0 — added support for `minWidth` / `maxWidth` (additive).
|
|
1859
1915
|
*/
|
|
1860
1916
|
declare function computeColumnPositions(columns: readonly ColumnDef[], marginLeft: number, contentWidth: number): {
|
|
1861
1917
|
cx: number[];
|
|
@@ -1922,8 +1978,28 @@ declare function toWinAnsi(str: string): string;
|
|
|
1922
1978
|
* Create a PDF string literal: encode to WinAnsi and escape (, ), \.
|
|
1923
1979
|
*/
|
|
1924
1980
|
declare function pdfString(str: string): string;
|
|
1925
|
-
/**
|
|
1981
|
+
/**
|
|
1982
|
+
* Truncate string to max characters, appending Unicode ellipsis (…, U+2026) if needed.
|
|
1983
|
+
*
|
|
1984
|
+
* The horizontal ellipsis is rendered correctly in both Latin/WinAnsi mode
|
|
1985
|
+
* (mapped to byte 0x85) and Unicode/CIDFont mode. This produces typographically
|
|
1986
|
+
* correct output and is ~50% narrower than ASCII "..." while remaining a single
|
|
1987
|
+
* grapheme cluster.
|
|
1988
|
+
*
|
|
1989
|
+
* @since 1.1.0 — the ellipsis character changed from `'..'` (two ASCII dots)
|
|
1990
|
+
* to `'…'` (U+2026). Output is one character shorter for the same `max`.
|
|
1991
|
+
*/
|
|
1926
1992
|
declare function truncate(str: string, max: number): string;
|
|
1993
|
+
/**
|
|
1994
|
+
* Truncate string so that its rendered width does not exceed `maxWidthPt`,
|
|
1995
|
+
* appending the Unicode ellipsis (…, U+2026) when truncation occurs.
|
|
1996
|
+
*
|
|
1997
|
+
* Unlike {@link truncate}, this measures actual glyph width using the encoding
|
|
1998
|
+
* context — appropriate for proportional fonts and Unicode text.
|
|
1999
|
+
*
|
|
2000
|
+
* @since 1.1.0
|
|
2001
|
+
*/
|
|
2002
|
+
declare function truncateToWidth(str: string, maxWidthPt: number, sz: number, enc: EncodingContext): string;
|
|
1927
2003
|
/**
|
|
1928
2004
|
* Approximate text width in points using Helvetica character metrics.
|
|
1929
2005
|
*/
|
|
@@ -1945,8 +2021,13 @@ declare function helveticaWidth(str: string, sz: number): number;
|
|
|
1945
2021
|
* Latin mode uses WinAnsi/Helvetica, Unicode mode uses CIDFont/Identity-H.
|
|
1946
2022
|
*
|
|
1947
2023
|
* @param fontEntries - Array of font entries (primary first). Empty = Latin mode.
|
|
2024
|
+
* @param pdfA - When true and at least one font entry is registered, disables
|
|
2025
|
+
* WinAnsi/Helvetica fallback in mixed-content runs (Helvetica is unembedded
|
|
2026
|
+
* standard-14, forbidden by ISO 19005). When pdfA is true with no fontEntries,
|
|
2027
|
+
* Latin mode is used as before — strict PDF/A conformance requires the caller
|
|
2028
|
+
* to register a Latin font (e.g. Noto Sans VF).
|
|
1948
2029
|
*/
|
|
1949
|
-
declare function createEncodingContext(fontEntries: FontEntry[]): EncodingContext;
|
|
2030
|
+
declare function createEncodingContext(fontEntries: FontEntry[], pdfA?: boolean): EncodingContext;
|
|
1950
2031
|
|
|
1951
2032
|
/**
|
|
1952
2033
|
* pdfnative — Font Loader
|
|
@@ -2173,7 +2254,7 @@ declare function detectFallbackLangs(texts: string[], primaryLang: string): Set<
|
|
|
2173
2254
|
* Returns the language code of the font most appropriate for rendering.
|
|
2174
2255
|
*
|
|
2175
2256
|
* @param cp - Unicode codepoint
|
|
2176
|
-
* @returns Language code ('el', 'hi', 'th', 'ja', 'ko', 'zh', 'vi', 'pl', 'tr', 'he', 'ar', 'ru', 'ka', 'hy') or null for Latin/common
|
|
2257
|
+
* @returns Language code ('el', 'hi', 'th', 'ja', 'ko', 'zh', 'vi', 'pl', 'tr', 'he', 'ar', 'ru', 'ka', 'hy', 'emoji') or null for Latin/common
|
|
2177
2258
|
*/
|
|
2178
2259
|
declare function detectCharLang(cp: number): string | null;
|
|
2179
2260
|
|
|
@@ -2208,6 +2289,11 @@ interface BidiRun {
|
|
|
2208
2289
|
/**
|
|
2209
2290
|
* Resolve bidirectional text into ordered runs with embedding levels.
|
|
2210
2291
|
*
|
|
2292
|
+
* Implements UAX #9 with isolate support (LRI/RLI/FSI ... PDI). When the
|
|
2293
|
+
* input contains matched isolate pairs, the inner content is resolved as
|
|
2294
|
+
* a sealed sub-paragraph with its own forced or auto-detected direction,
|
|
2295
|
+
* preventing the outer context from leaking into it (and vice versa).
|
|
2296
|
+
*
|
|
2211
2297
|
* @param text - Input text in logical order
|
|
2212
2298
|
* @returns Array of BidiRun objects in visual order
|
|
2213
2299
|
*/
|
|
@@ -2595,6 +2681,62 @@ declare function initNodeDecompression(): Promise<void>;
|
|
|
2595
2681
|
*/
|
|
2596
2682
|
declare function inflateSync(data: Uint8Array): Uint8Array;
|
|
2597
2683
|
|
|
2684
|
+
/**
|
|
2685
|
+
* pdfnative — PDF Stream Filter Decoders
|
|
2686
|
+
* ========================================
|
|
2687
|
+
* Pure, zero-dependency decoders for the standard PDF stream filters that
|
|
2688
|
+
* are not handled by {@link inflateSync} (FlateDecode).
|
|
2689
|
+
*
|
|
2690
|
+
* Implemented filters (ISO 32000-1 §7.4):
|
|
2691
|
+
* - ASCIIHexDecode (§7.4.2)
|
|
2692
|
+
* - ASCII85Decode (§7.4.3)
|
|
2693
|
+
* - LZWDecode (§7.4.4) — variable-width 9..12 bit codes
|
|
2694
|
+
* - RunLengthDecode (§7.4.5)
|
|
2695
|
+
*
|
|
2696
|
+
* @since 1.1.0
|
|
2697
|
+
*/
|
|
2698
|
+
/**
|
|
2699
|
+
* Decode an ASCIIHexDecode stream. Two hex digits encode one byte.
|
|
2700
|
+
* Whitespace is ignored; `>` terminates the stream. An odd trailing digit
|
|
2701
|
+
* is treated as if followed by `0` (per ISO 32000-1 §7.4.2).
|
|
2702
|
+
*/
|
|
2703
|
+
declare function decodeASCIIHex(data: Uint8Array): Uint8Array;
|
|
2704
|
+
/**
|
|
2705
|
+
* Decode an ASCII85Decode stream (Adobe variant).
|
|
2706
|
+
*
|
|
2707
|
+
* Five base-85 digits in the range `!`..`u` encode four bytes. The shorthand
|
|
2708
|
+
* `z` represents four zero bytes. The end-of-data marker is `~>`. Whitespace
|
|
2709
|
+
* is ignored. A short final group (1..4 digits) decodes to (count-1) bytes
|
|
2710
|
+
* with the missing digits taken as `u` (84) and the trailing bytes discarded.
|
|
2711
|
+
*/
|
|
2712
|
+
declare function decodeASCII85(data: Uint8Array): Uint8Array;
|
|
2713
|
+
/**
|
|
2714
|
+
* Decode an LZWDecode stream with variable-width codes (9–12 bits) and
|
|
2715
|
+
* automatic table reset on the CLEAR code (256). Terminates on the EOD
|
|
2716
|
+
* code (257) per ISO 32000-1 §7.4.4. EarlyChange is fixed to 1 (the PDF
|
|
2717
|
+
* default); callers that need a different value should pass it explicitly
|
|
2718
|
+
* via `DecodeParms`, which is currently not honoured here (rare in PDF).
|
|
2719
|
+
*/
|
|
2720
|
+
declare function decodeLZW(data: Uint8Array): Uint8Array;
|
|
2721
|
+
/**
|
|
2722
|
+
* Decode a RunLengthDecode stream. Each control byte `n`:
|
|
2723
|
+
* - 0..127: copy the next `n+1` bytes literally
|
|
2724
|
+
* - 128: EOD
|
|
2725
|
+
* - 129..255: repeat the next byte `257 - n` times
|
|
2726
|
+
*/
|
|
2727
|
+
declare function decodeRunLength(data: Uint8Array): Uint8Array;
|
|
2728
|
+
/**
|
|
2729
|
+
* Apply a single PDF stream filter by name. Returns the input unchanged
|
|
2730
|
+
* for unsupported filters (callers should detect this via the return
|
|
2731
|
+
* value being identical or by pre-checking against {@link KNOWN_FILTERS}).
|
|
2732
|
+
*
|
|
2733
|
+
* Supports: FlateDecode is NOT handled here (use `inflateSync` instead);
|
|
2734
|
+
* this function dispatches the non-deflate filter family.
|
|
2735
|
+
*/
|
|
2736
|
+
declare function applyDecodeFilter(name: string, data: Uint8Array): Uint8Array;
|
|
2737
|
+
/** Known non-Flate decode filter names (for membership checks). */
|
|
2738
|
+
declare const KNOWN_DECODE_FILTERS: Set<string>;
|
|
2739
|
+
|
|
2598
2740
|
/**
|
|
2599
2741
|
* pdfnative — Worker API
|
|
2600
2742
|
* ========================
|
|
@@ -2635,4 +2777,4 @@ declare function createPDF(pdfParams: PdfParams, options?: {
|
|
|
2635
2777
|
layoutOptions?: Partial<PdfLayoutOptions>;
|
|
2636
2778
|
}): Promise<Uint8Array>;
|
|
2637
2779
|
|
|
2638
|
-
export { type Annotation, type Asn1Node, BAL_H, type BarcodeBlock, type BarcodeFormat, type BidiRun, type CmsSignOptions, type ColumnDef, DEFAULT_COLORS, DEFAULT_COLUMNS, DEFAULT_CW, DEFAULT_FONT_SIZES, DEFAULT_MARGINS, DEFAULT_MAX_INFLATE_OUTPUT, type DocumentBlock, type DocumentMetadata, type DocumentParams, type EcPrivateKey, type EcPublicKey, type EmbeddedFilesResult, type EncodingContext, type EncryptionOptions, FT_H, type FontData, type FontEntry, type FontLoader, type FontMetrics, type FontRun, type FormField, type FormFieldBlock, type FormFieldType, type FormWidgetResult, HEADER_H, type HeadingBlock, INFO_LN, type ImageBlock, type InternalLink, type LinkAnnotation, type LinkBlock, type ListBlock, MAX_PARSE_DEPTH, MAX_XREF_CHAIN, PAGE_SIZES, PG_H, PG_W, type PageBreakBlock, type PageTemplate, type ParagraphBlock, type PdfArray as ParsedArray, type PdfDict as ParsedDict, type ParsedImage, type PdfAConfig, type PdfAttachment, type PdfAttachmentRelationship, type PdfColor, type PdfColors, type PdfIndirectObject, type PdfInfoItem, type PdfLayoutOptions, type PdfModifier, type PdfName, type PdfParams, type PdfReader, type PdfRef, type PdfRgbString, type PdfRgbTuple, type PdfRow, type PdfSignOptions, type PdfStream, type PdfToken, type PdfTokenizer, type PdfValue, type QRErrorLevel, ROW_H, type RadioGroupContext, type RsaPrivateKey, type RsaPublicKey, type ShapedGlyph, type SignatureAlgorithm, type SpacerBlock, type StreamOptions, type SvgBlock, type SvgRenderOptions, type SvgSegment, TH_H, TITLE_LN, type TableBlock, type TextRun, type TocBlock, type TokenType, WORKER_THRESHOLD, WORKER_TIMEOUT_MS, type WatermarkImage, type WatermarkOptions, type WatermarkState, type WatermarkText, type WorkerGenerationOptions, type WorkerInputMessage, type WorkerOutputMessage, type X509Certificate, type X509Name, type XrefEntry, type XrefTable, buildAcroFormDict, buildAppearanceStreamDict, buildCmsSignedData, buildDocumentPDF, buildDocumentPDFBytes, buildDocumentPDFStream, buildEmbeddedFiles, buildFormWidget, buildImageOperators, buildImageXObject, buildInternalLinkAnnotation, buildLinkAnnotation, buildPDF, buildPDFBytes, buildPDFStream, buildRadioGroupParent, buildSMaskXObject, buildSigDict, buildWatermarkState, chunkBinaryString, clearFontCache, computeColumnPositions, concatChunks, containsArabic, containsBengali, containsDevanagari, containsHebrew, containsRTL, containsTamil, containsThai, createEncodingContext, createModifier, createPDF, createTokenizer, decodeEcPublicKey, defaultFieldHeight, derBitString, derDecode, derInteger, derOctetString, derOid, derSequence, detectCharLang, detectFallbackLangs, detectImageFormat, dictGet, dictGetArray, dictGetDict, dictGetName, dictGetNum, dictGetRef, downloadBlob, ean13CheckDigit, ecPublicKeyFromPrivate, ecdsaSign, ecdsaVerify, encodeCode128, encodeEcPublicKey, encodePDF417, encodePdfTextString, estimateCmsSize, estimateContentsSize, findStartxref, generateDataMatrix, generatePDFInWorker, generatePDFMainThread, generateQR, getMaxInflateOutputSize, getRegisteredLangs, getTrailerRef, getTrailerValue, hasFontLoader, helveticaWidth, hmacSha256, inflateSync, initCrypto, initNodeCompression, initNodeDecompression as initNodeDecompression_parser, isArmenianCodepoint, isArray, isBengaliCodepoint, isCyrillicCodepoint, isDevanagariCodepoint, isDict, isGeorgianCodepoint, isLinkAnnotation, isName, isRef, isSelfSigned, isStream, isTamilCodepoint, isValidPdfRgb, loadFontData, nameValue, needsUnicodeFont, normalizeColors, openPdf, parseCertificate, parseColor, parseImage, parseIndirectObject, parseJPEG, parsePNG, parseRsaPrivateKey, parseRsaPublicKey, parseSvgPath, parseValue, parseXrefTable, pdfString, registerFont, registerFonts, renderBarcode, renderCode128, renderDataMatrix, renderEAN13, renderPDF417, renderQR, renderSvg, resetFontRegistry, resolveBidiRuns, resolveLayout, resolvePdfAConfig, resolveTemplate, rsaSign, rsaSignHash, rsaVerify, rsaVerifyHash, setDeflateImpl, setInflateImpl, setMaxInflateOutputSize, sha384, sha512, shapeArabicText, shapeBengaliText, shapeDevanagariText, shapeTamilText, shapeThaiText, signPdfBytes, slugify, splitTextByFont, streamByteLength, toBytes, toWinAnsi, truncate, validateAttachments, validateDocumentStreamable, validateTableStreamable, validateURL, validateWatermark, verifyCertSignature, wrapText };
|
|
2780
|
+
export { type Annotation, type Asn1Node, BAL_H, type BarcodeBlock, type BarcodeFormat, type BidiRun, type CmsSignOptions, type ColumnDef, DEFAULT_COLORS, DEFAULT_COLUMNS, DEFAULT_CW, DEFAULT_FONT_SIZES, DEFAULT_MARGINS, DEFAULT_MAX_INFLATE_OUTPUT, type DocumentBlock, type DocumentMetadata, type DocumentParams, type EcPrivateKey, type EcPublicKey, type EmbeddedFilesResult, type EncodingContext, type EncryptionOptions, FT_H, type FontData, type FontEntry, type FontLoader, type FontMetrics, type FontRun, type FormField, type FormFieldBlock, type FormFieldType, type FormWidgetResult, HEADER_H, type HeadingBlock, INFO_LN, type ImageBlock, type InternalLink, KNOWN_DECODE_FILTERS, type LinkAnnotation, type LinkBlock, type ListBlock, MAX_PARSE_DEPTH, MAX_XREF_CHAIN, PAGE_SIZES, PG_H, PG_W, type PageBreakBlock, type PageTemplate, type ParagraphBlock, type PdfArray as ParsedArray, type PdfDict as ParsedDict, type ParsedImage, type PdfAConfig, type PdfAttachment, type PdfAttachmentRelationship, type PdfColor, type PdfColors, type PdfIndirectObject, type PdfInfoItem, type PdfLayoutOptions, type PdfModifier, type PdfName, type PdfParams, type PdfReader, type PdfRef, type PdfRgbString, type PdfRgbTuple, type PdfRow, type PdfSignOptions, type PdfStream, type PdfToken, type PdfTokenizer, type PdfValue, type QRErrorLevel, ROW_H, type RadioGroupContext, type RsaPrivateKey, type RsaPublicKey, type ShapedGlyph, type SignatureAlgorithm, type SpacerBlock, type StreamOptions, type SvgBlock, type SvgRenderOptions, type SvgSegment, TH_H, TITLE_LN, type TableBlock, type TextRun, type TocBlock, type TokenType, WORKER_THRESHOLD, WORKER_TIMEOUT_MS, type WatermarkImage, type WatermarkOptions, type WatermarkState, type WatermarkText, type WorkerGenerationOptions, type WorkerInputMessage, type WorkerOutputMessage, type X509Certificate, type X509Name, type XrefEntry, type XrefTable, applyDecodeFilter, buildAcroFormDict, buildAppearanceStreamDict, buildCmsSignedData, buildDocumentPDF, buildDocumentPDFBytes, buildDocumentPDFStream, buildEmbeddedFiles, buildFormWidget, buildImageOperators, buildImageXObject, buildInternalLinkAnnotation, buildLinkAnnotation, buildPDF, buildPDFBytes, buildPDFStream, buildRadioGroupParent, buildSMaskXObject, buildSigDict, buildWatermarkState, chunkBinaryString, clearFontCache, computeColumnPositions, concatChunks, containsArabic, containsBengali, containsDevanagari, containsHebrew, containsRTL, containsTamil, containsThai, createEncodingContext, createModifier, createPDF, createTokenizer, decodeASCII85, decodeASCIIHex, decodeEcPublicKey, decodeLZW, decodeRunLength, defaultFieldHeight, derBitString, derDecode, derInteger, derOctetString, derOid, derSequence, detectCharLang, detectFallbackLangs, detectImageFormat, dictGet, dictGetArray, dictGetDict, dictGetName, dictGetNum, dictGetRef, downloadBlob, ean13CheckDigit, ecPublicKeyFromPrivate, ecdsaSign, ecdsaVerify, encodeCode128, encodeEcPublicKey, encodePDF417, encodePdfTextString, estimateCmsSize, estimateContentsSize, findStartxref, generateDataMatrix, generatePDFInWorker, generatePDFMainThread, generateQR, getMaxInflateOutputSize, getRegisteredLangs, getTrailerRef, getTrailerValue, hasFontLoader, helveticaWidth, hmacSha256, inflateSync, initCrypto, initNodeCompression, initNodeDecompression as initNodeDecompression_parser, isArmenianCodepoint, isArray, isBengaliCodepoint, isCyrillicCodepoint, isDevanagariCodepoint, isDict, isGeorgianCodepoint, isLinkAnnotation, isName, isRef, isSelfSigned, isStream, isTamilCodepoint, isValidPdfRgb, loadFontData, nameValue, needsUnicodeFont, normalizeColors, openPdf, parseCertificate, parseColor, parseImage, parseIndirectObject, parseJPEG, parsePNG, parseRsaPrivateKey, parseRsaPublicKey, parseSvgPath, parseValue, parseXrefTable, pdfString, registerFont, registerFonts, renderBarcode, renderCode128, renderDataMatrix, renderEAN13, renderPDF417, renderQR, renderSvg, resetFontRegistry, resolveBidiRuns, resolveLayout, resolvePdfAConfig, resolveTemplate, rsaSign, rsaSignHash, rsaVerify, rsaVerifyHash, setDeflateImpl, setInflateImpl, setMaxInflateOutputSize, sha384, sha512, shapeArabicText, shapeBengaliText, shapeDevanagariText, shapeTamilText, shapeThaiText, signPdfBytes, slugify, splitTextByFont, streamByteLength, toBytes, toWinAnsi, truncate, truncateToWidth, validateAttachments, validateDocumentStreamable, validateTableStreamable, validateURL, validateWatermark, verifyCertSignature, wrapText };
|
package/dist/index.d.ts
CHANGED
|
@@ -149,6 +149,20 @@ interface ColumnDef {
|
|
|
149
149
|
readonly mx: number;
|
|
150
150
|
/** Max characters for header cells. */
|
|
151
151
|
readonly mxH: number;
|
|
152
|
+
/**
|
|
153
|
+
* Minimum column width in points. When set, the resolved width is
|
|
154
|
+
* clamped to at least this value, redistributing the surplus across
|
|
155
|
+
* the remaining unconstrained columns (proportional to their `f`).
|
|
156
|
+
* @since 1.1.0
|
|
157
|
+
*/
|
|
158
|
+
readonly minWidth?: number;
|
|
159
|
+
/**
|
|
160
|
+
* Maximum column width in points. When set, the resolved width is
|
|
161
|
+
* clamped to at most this value, redistributing the surplus across
|
|
162
|
+
* the remaining unconstrained columns (proportional to their `f`).
|
|
163
|
+
* @since 1.1.0
|
|
164
|
+
*/
|
|
165
|
+
readonly maxWidth?: number;
|
|
152
166
|
}
|
|
153
167
|
/**
|
|
154
168
|
* Options for generating a PDF in a Web Worker via `generatePDFInWorker()`.
|
|
@@ -383,6 +397,15 @@ interface WatermarkText {
|
|
|
383
397
|
readonly opacity?: number;
|
|
384
398
|
/** Rotation angle in degrees (counterclockwise). Default: -45. */
|
|
385
399
|
readonly angle?: number;
|
|
400
|
+
/**
|
|
401
|
+
* Auto-fit: clamp `fontSize` so the rotated bounding box fits within the
|
|
402
|
+
* page minus a 24-pt safety margin. Default: `true` (added in v1.1.0).
|
|
403
|
+
*
|
|
404
|
+
* Set to `false` to preserve byte-stable output when callers depend on
|
|
405
|
+
* the exact `fontSize` even if it produces a watermark that overflows
|
|
406
|
+
* the page (legacy v1.0.x behaviour).
|
|
407
|
+
*/
|
|
408
|
+
readonly autoFit?: boolean;
|
|
386
409
|
}
|
|
387
410
|
/**
|
|
388
411
|
* Image watermark configuration.
|
|
@@ -752,6 +775,31 @@ interface TableBlock {
|
|
|
752
775
|
readonly headers: readonly string[];
|
|
753
776
|
readonly rows: readonly PdfRow[];
|
|
754
777
|
readonly columns?: readonly ColumnDef[];
|
|
778
|
+
/**
|
|
779
|
+
* Clip cell contents to column bounds using PDF clip-path operators.
|
|
780
|
+
* When `true`, each header/data cell is wrapped in `q <rect> re W n ... Q` so
|
|
781
|
+
* over-long text cannot escape the column rectangle visually.
|
|
782
|
+
*
|
|
783
|
+
* When `false`, cells rely solely on the existing `truncate()` character cap
|
|
784
|
+
* (ColumnDef.mx / mxH) — variable-width glyphs may still overflow visually.
|
|
785
|
+
*
|
|
786
|
+
* Default: `true` (recommended for PDF/A and visual safety).
|
|
787
|
+
* @since 1.1.0
|
|
788
|
+
*/
|
|
789
|
+
readonly clipCells?: boolean;
|
|
790
|
+
/**
|
|
791
|
+
* Auto-fit column widths to actual content widths, respecting per-column
|
|
792
|
+
* `minWidth` / `maxWidth` constraints. Surplus or deficit is redistributed
|
|
793
|
+
* across unconstrained columns proportional to their `f` fraction.
|
|
794
|
+
*
|
|
795
|
+
* When `false` (default), the explicit `f` fractions are used as-is.
|
|
796
|
+
*
|
|
797
|
+
* Note: byte-output is non-deterministic vs explicit widths because resolved
|
|
798
|
+
* widths depend on text content and font metrics. Use only when content-aware
|
|
799
|
+
* sizing is desired.
|
|
800
|
+
* @since 1.1.0
|
|
801
|
+
*/
|
|
802
|
+
readonly autoFitColumns?: boolean;
|
|
755
803
|
}
|
|
756
804
|
/** List block — bullet or numbered items. */
|
|
757
805
|
interface ListBlock {
|
|
@@ -1856,6 +1904,14 @@ declare const DEFAULT_COLORS: PdfColors;
|
|
|
1856
1904
|
declare const DEFAULT_COLUMNS: ColumnDef[];
|
|
1857
1905
|
/**
|
|
1858
1906
|
* Compute column X positions and widths given columns and content width.
|
|
1907
|
+
*
|
|
1908
|
+
* Honours optional `minWidth` / `maxWidth` constraints (in points) by clamping
|
|
1909
|
+
* each constrained column then redistributing the surplus or deficit across
|
|
1910
|
+
* the unconstrained columns proportional to their fractional weight `f`.
|
|
1911
|
+
* Falls back to a single uniform proration pass when all columns are
|
|
1912
|
+
* constrained or the unconstrained weights sum to zero.
|
|
1913
|
+
*
|
|
1914
|
+
* @since 1.1.0 — added support for `minWidth` / `maxWidth` (additive).
|
|
1859
1915
|
*/
|
|
1860
1916
|
declare function computeColumnPositions(columns: readonly ColumnDef[], marginLeft: number, contentWidth: number): {
|
|
1861
1917
|
cx: number[];
|
|
@@ -1922,8 +1978,28 @@ declare function toWinAnsi(str: string): string;
|
|
|
1922
1978
|
* Create a PDF string literal: encode to WinAnsi and escape (, ), \.
|
|
1923
1979
|
*/
|
|
1924
1980
|
declare function pdfString(str: string): string;
|
|
1925
|
-
/**
|
|
1981
|
+
/**
|
|
1982
|
+
* Truncate string to max characters, appending Unicode ellipsis (…, U+2026) if needed.
|
|
1983
|
+
*
|
|
1984
|
+
* The horizontal ellipsis is rendered correctly in both Latin/WinAnsi mode
|
|
1985
|
+
* (mapped to byte 0x85) and Unicode/CIDFont mode. This produces typographically
|
|
1986
|
+
* correct output and is ~50% narrower than ASCII "..." while remaining a single
|
|
1987
|
+
* grapheme cluster.
|
|
1988
|
+
*
|
|
1989
|
+
* @since 1.1.0 — the ellipsis character changed from `'..'` (two ASCII dots)
|
|
1990
|
+
* to `'…'` (U+2026). Output is one character shorter for the same `max`.
|
|
1991
|
+
*/
|
|
1926
1992
|
declare function truncate(str: string, max: number): string;
|
|
1993
|
+
/**
|
|
1994
|
+
* Truncate string so that its rendered width does not exceed `maxWidthPt`,
|
|
1995
|
+
* appending the Unicode ellipsis (…, U+2026) when truncation occurs.
|
|
1996
|
+
*
|
|
1997
|
+
* Unlike {@link truncate}, this measures actual glyph width using the encoding
|
|
1998
|
+
* context — appropriate for proportional fonts and Unicode text.
|
|
1999
|
+
*
|
|
2000
|
+
* @since 1.1.0
|
|
2001
|
+
*/
|
|
2002
|
+
declare function truncateToWidth(str: string, maxWidthPt: number, sz: number, enc: EncodingContext): string;
|
|
1927
2003
|
/**
|
|
1928
2004
|
* Approximate text width in points using Helvetica character metrics.
|
|
1929
2005
|
*/
|
|
@@ -1945,8 +2021,13 @@ declare function helveticaWidth(str: string, sz: number): number;
|
|
|
1945
2021
|
* Latin mode uses WinAnsi/Helvetica, Unicode mode uses CIDFont/Identity-H.
|
|
1946
2022
|
*
|
|
1947
2023
|
* @param fontEntries - Array of font entries (primary first). Empty = Latin mode.
|
|
2024
|
+
* @param pdfA - When true and at least one font entry is registered, disables
|
|
2025
|
+
* WinAnsi/Helvetica fallback in mixed-content runs (Helvetica is unembedded
|
|
2026
|
+
* standard-14, forbidden by ISO 19005). When pdfA is true with no fontEntries,
|
|
2027
|
+
* Latin mode is used as before — strict PDF/A conformance requires the caller
|
|
2028
|
+
* to register a Latin font (e.g. Noto Sans VF).
|
|
1948
2029
|
*/
|
|
1949
|
-
declare function createEncodingContext(fontEntries: FontEntry[]): EncodingContext;
|
|
2030
|
+
declare function createEncodingContext(fontEntries: FontEntry[], pdfA?: boolean): EncodingContext;
|
|
1950
2031
|
|
|
1951
2032
|
/**
|
|
1952
2033
|
* pdfnative — Font Loader
|
|
@@ -2173,7 +2254,7 @@ declare function detectFallbackLangs(texts: string[], primaryLang: string): Set<
|
|
|
2173
2254
|
* Returns the language code of the font most appropriate for rendering.
|
|
2174
2255
|
*
|
|
2175
2256
|
* @param cp - Unicode codepoint
|
|
2176
|
-
* @returns Language code ('el', 'hi', 'th', 'ja', 'ko', 'zh', 'vi', 'pl', 'tr', 'he', 'ar', 'ru', 'ka', 'hy') or null for Latin/common
|
|
2257
|
+
* @returns Language code ('el', 'hi', 'th', 'ja', 'ko', 'zh', 'vi', 'pl', 'tr', 'he', 'ar', 'ru', 'ka', 'hy', 'emoji') or null for Latin/common
|
|
2177
2258
|
*/
|
|
2178
2259
|
declare function detectCharLang(cp: number): string | null;
|
|
2179
2260
|
|
|
@@ -2208,6 +2289,11 @@ interface BidiRun {
|
|
|
2208
2289
|
/**
|
|
2209
2290
|
* Resolve bidirectional text into ordered runs with embedding levels.
|
|
2210
2291
|
*
|
|
2292
|
+
* Implements UAX #9 with isolate support (LRI/RLI/FSI ... PDI). When the
|
|
2293
|
+
* input contains matched isolate pairs, the inner content is resolved as
|
|
2294
|
+
* a sealed sub-paragraph with its own forced or auto-detected direction,
|
|
2295
|
+
* preventing the outer context from leaking into it (and vice versa).
|
|
2296
|
+
*
|
|
2211
2297
|
* @param text - Input text in logical order
|
|
2212
2298
|
* @returns Array of BidiRun objects in visual order
|
|
2213
2299
|
*/
|
|
@@ -2595,6 +2681,62 @@ declare function initNodeDecompression(): Promise<void>;
|
|
|
2595
2681
|
*/
|
|
2596
2682
|
declare function inflateSync(data: Uint8Array): Uint8Array;
|
|
2597
2683
|
|
|
2684
|
+
/**
|
|
2685
|
+
* pdfnative — PDF Stream Filter Decoders
|
|
2686
|
+
* ========================================
|
|
2687
|
+
* Pure, zero-dependency decoders for the standard PDF stream filters that
|
|
2688
|
+
* are not handled by {@link inflateSync} (FlateDecode).
|
|
2689
|
+
*
|
|
2690
|
+
* Implemented filters (ISO 32000-1 §7.4):
|
|
2691
|
+
* - ASCIIHexDecode (§7.4.2)
|
|
2692
|
+
* - ASCII85Decode (§7.4.3)
|
|
2693
|
+
* - LZWDecode (§7.4.4) — variable-width 9..12 bit codes
|
|
2694
|
+
* - RunLengthDecode (§7.4.5)
|
|
2695
|
+
*
|
|
2696
|
+
* @since 1.1.0
|
|
2697
|
+
*/
|
|
2698
|
+
/**
|
|
2699
|
+
* Decode an ASCIIHexDecode stream. Two hex digits encode one byte.
|
|
2700
|
+
* Whitespace is ignored; `>` terminates the stream. An odd trailing digit
|
|
2701
|
+
* is treated as if followed by `0` (per ISO 32000-1 §7.4.2).
|
|
2702
|
+
*/
|
|
2703
|
+
declare function decodeASCIIHex(data: Uint8Array): Uint8Array;
|
|
2704
|
+
/**
|
|
2705
|
+
* Decode an ASCII85Decode stream (Adobe variant).
|
|
2706
|
+
*
|
|
2707
|
+
* Five base-85 digits in the range `!`..`u` encode four bytes. The shorthand
|
|
2708
|
+
* `z` represents four zero bytes. The end-of-data marker is `~>`. Whitespace
|
|
2709
|
+
* is ignored. A short final group (1..4 digits) decodes to (count-1) bytes
|
|
2710
|
+
* with the missing digits taken as `u` (84) and the trailing bytes discarded.
|
|
2711
|
+
*/
|
|
2712
|
+
declare function decodeASCII85(data: Uint8Array): Uint8Array;
|
|
2713
|
+
/**
|
|
2714
|
+
* Decode an LZWDecode stream with variable-width codes (9–12 bits) and
|
|
2715
|
+
* automatic table reset on the CLEAR code (256). Terminates on the EOD
|
|
2716
|
+
* code (257) per ISO 32000-1 §7.4.4. EarlyChange is fixed to 1 (the PDF
|
|
2717
|
+
* default); callers that need a different value should pass it explicitly
|
|
2718
|
+
* via `DecodeParms`, which is currently not honoured here (rare in PDF).
|
|
2719
|
+
*/
|
|
2720
|
+
declare function decodeLZW(data: Uint8Array): Uint8Array;
|
|
2721
|
+
/**
|
|
2722
|
+
* Decode a RunLengthDecode stream. Each control byte `n`:
|
|
2723
|
+
* - 0..127: copy the next `n+1` bytes literally
|
|
2724
|
+
* - 128: EOD
|
|
2725
|
+
* - 129..255: repeat the next byte `257 - n` times
|
|
2726
|
+
*/
|
|
2727
|
+
declare function decodeRunLength(data: Uint8Array): Uint8Array;
|
|
2728
|
+
/**
|
|
2729
|
+
* Apply a single PDF stream filter by name. Returns the input unchanged
|
|
2730
|
+
* for unsupported filters (callers should detect this via the return
|
|
2731
|
+
* value being identical or by pre-checking against {@link KNOWN_FILTERS}).
|
|
2732
|
+
*
|
|
2733
|
+
* Supports: FlateDecode is NOT handled here (use `inflateSync` instead);
|
|
2734
|
+
* this function dispatches the non-deflate filter family.
|
|
2735
|
+
*/
|
|
2736
|
+
declare function applyDecodeFilter(name: string, data: Uint8Array): Uint8Array;
|
|
2737
|
+
/** Known non-Flate decode filter names (for membership checks). */
|
|
2738
|
+
declare const KNOWN_DECODE_FILTERS: Set<string>;
|
|
2739
|
+
|
|
2598
2740
|
/**
|
|
2599
2741
|
* pdfnative — Worker API
|
|
2600
2742
|
* ========================
|
|
@@ -2635,4 +2777,4 @@ declare function createPDF(pdfParams: PdfParams, options?: {
|
|
|
2635
2777
|
layoutOptions?: Partial<PdfLayoutOptions>;
|
|
2636
2778
|
}): Promise<Uint8Array>;
|
|
2637
2779
|
|
|
2638
|
-
export { type Annotation, type Asn1Node, BAL_H, type BarcodeBlock, type BarcodeFormat, type BidiRun, type CmsSignOptions, type ColumnDef, DEFAULT_COLORS, DEFAULT_COLUMNS, DEFAULT_CW, DEFAULT_FONT_SIZES, DEFAULT_MARGINS, DEFAULT_MAX_INFLATE_OUTPUT, type DocumentBlock, type DocumentMetadata, type DocumentParams, type EcPrivateKey, type EcPublicKey, type EmbeddedFilesResult, type EncodingContext, type EncryptionOptions, FT_H, type FontData, type FontEntry, type FontLoader, type FontMetrics, type FontRun, type FormField, type FormFieldBlock, type FormFieldType, type FormWidgetResult, HEADER_H, type HeadingBlock, INFO_LN, type ImageBlock, type InternalLink, type LinkAnnotation, type LinkBlock, type ListBlock, MAX_PARSE_DEPTH, MAX_XREF_CHAIN, PAGE_SIZES, PG_H, PG_W, type PageBreakBlock, type PageTemplate, type ParagraphBlock, type PdfArray as ParsedArray, type PdfDict as ParsedDict, type ParsedImage, type PdfAConfig, type PdfAttachment, type PdfAttachmentRelationship, type PdfColor, type PdfColors, type PdfIndirectObject, type PdfInfoItem, type PdfLayoutOptions, type PdfModifier, type PdfName, type PdfParams, type PdfReader, type PdfRef, type PdfRgbString, type PdfRgbTuple, type PdfRow, type PdfSignOptions, type PdfStream, type PdfToken, type PdfTokenizer, type PdfValue, type QRErrorLevel, ROW_H, type RadioGroupContext, type RsaPrivateKey, type RsaPublicKey, type ShapedGlyph, type SignatureAlgorithm, type SpacerBlock, type StreamOptions, type SvgBlock, type SvgRenderOptions, type SvgSegment, TH_H, TITLE_LN, type TableBlock, type TextRun, type TocBlock, type TokenType, WORKER_THRESHOLD, WORKER_TIMEOUT_MS, type WatermarkImage, type WatermarkOptions, type WatermarkState, type WatermarkText, type WorkerGenerationOptions, type WorkerInputMessage, type WorkerOutputMessage, type X509Certificate, type X509Name, type XrefEntry, type XrefTable, buildAcroFormDict, buildAppearanceStreamDict, buildCmsSignedData, buildDocumentPDF, buildDocumentPDFBytes, buildDocumentPDFStream, buildEmbeddedFiles, buildFormWidget, buildImageOperators, buildImageXObject, buildInternalLinkAnnotation, buildLinkAnnotation, buildPDF, buildPDFBytes, buildPDFStream, buildRadioGroupParent, buildSMaskXObject, buildSigDict, buildWatermarkState, chunkBinaryString, clearFontCache, computeColumnPositions, concatChunks, containsArabic, containsBengali, containsDevanagari, containsHebrew, containsRTL, containsTamil, containsThai, createEncodingContext, createModifier, createPDF, createTokenizer, decodeEcPublicKey, defaultFieldHeight, derBitString, derDecode, derInteger, derOctetString, derOid, derSequence, detectCharLang, detectFallbackLangs, detectImageFormat, dictGet, dictGetArray, dictGetDict, dictGetName, dictGetNum, dictGetRef, downloadBlob, ean13CheckDigit, ecPublicKeyFromPrivate, ecdsaSign, ecdsaVerify, encodeCode128, encodeEcPublicKey, encodePDF417, encodePdfTextString, estimateCmsSize, estimateContentsSize, findStartxref, generateDataMatrix, generatePDFInWorker, generatePDFMainThread, generateQR, getMaxInflateOutputSize, getRegisteredLangs, getTrailerRef, getTrailerValue, hasFontLoader, helveticaWidth, hmacSha256, inflateSync, initCrypto, initNodeCompression, initNodeDecompression as initNodeDecompression_parser, isArmenianCodepoint, isArray, isBengaliCodepoint, isCyrillicCodepoint, isDevanagariCodepoint, isDict, isGeorgianCodepoint, isLinkAnnotation, isName, isRef, isSelfSigned, isStream, isTamilCodepoint, isValidPdfRgb, loadFontData, nameValue, needsUnicodeFont, normalizeColors, openPdf, parseCertificate, parseColor, parseImage, parseIndirectObject, parseJPEG, parsePNG, parseRsaPrivateKey, parseRsaPublicKey, parseSvgPath, parseValue, parseXrefTable, pdfString, registerFont, registerFonts, renderBarcode, renderCode128, renderDataMatrix, renderEAN13, renderPDF417, renderQR, renderSvg, resetFontRegistry, resolveBidiRuns, resolveLayout, resolvePdfAConfig, resolveTemplate, rsaSign, rsaSignHash, rsaVerify, rsaVerifyHash, setDeflateImpl, setInflateImpl, setMaxInflateOutputSize, sha384, sha512, shapeArabicText, shapeBengaliText, shapeDevanagariText, shapeTamilText, shapeThaiText, signPdfBytes, slugify, splitTextByFont, streamByteLength, toBytes, toWinAnsi, truncate, validateAttachments, validateDocumentStreamable, validateTableStreamable, validateURL, validateWatermark, verifyCertSignature, wrapText };
|
|
2780
|
+
export { type Annotation, type Asn1Node, BAL_H, type BarcodeBlock, type BarcodeFormat, type BidiRun, type CmsSignOptions, type ColumnDef, DEFAULT_COLORS, DEFAULT_COLUMNS, DEFAULT_CW, DEFAULT_FONT_SIZES, DEFAULT_MARGINS, DEFAULT_MAX_INFLATE_OUTPUT, type DocumentBlock, type DocumentMetadata, type DocumentParams, type EcPrivateKey, type EcPublicKey, type EmbeddedFilesResult, type EncodingContext, type EncryptionOptions, FT_H, type FontData, type FontEntry, type FontLoader, type FontMetrics, type FontRun, type FormField, type FormFieldBlock, type FormFieldType, type FormWidgetResult, HEADER_H, type HeadingBlock, INFO_LN, type ImageBlock, type InternalLink, KNOWN_DECODE_FILTERS, type LinkAnnotation, type LinkBlock, type ListBlock, MAX_PARSE_DEPTH, MAX_XREF_CHAIN, PAGE_SIZES, PG_H, PG_W, type PageBreakBlock, type PageTemplate, type ParagraphBlock, type PdfArray as ParsedArray, type PdfDict as ParsedDict, type ParsedImage, type PdfAConfig, type PdfAttachment, type PdfAttachmentRelationship, type PdfColor, type PdfColors, type PdfIndirectObject, type PdfInfoItem, type PdfLayoutOptions, type PdfModifier, type PdfName, type PdfParams, type PdfReader, type PdfRef, type PdfRgbString, type PdfRgbTuple, type PdfRow, type PdfSignOptions, type PdfStream, type PdfToken, type PdfTokenizer, type PdfValue, type QRErrorLevel, ROW_H, type RadioGroupContext, type RsaPrivateKey, type RsaPublicKey, type ShapedGlyph, type SignatureAlgorithm, type SpacerBlock, type StreamOptions, type SvgBlock, type SvgRenderOptions, type SvgSegment, TH_H, TITLE_LN, type TableBlock, type TextRun, type TocBlock, type TokenType, WORKER_THRESHOLD, WORKER_TIMEOUT_MS, type WatermarkImage, type WatermarkOptions, type WatermarkState, type WatermarkText, type WorkerGenerationOptions, type WorkerInputMessage, type WorkerOutputMessage, type X509Certificate, type X509Name, type XrefEntry, type XrefTable, applyDecodeFilter, buildAcroFormDict, buildAppearanceStreamDict, buildCmsSignedData, buildDocumentPDF, buildDocumentPDFBytes, buildDocumentPDFStream, buildEmbeddedFiles, buildFormWidget, buildImageOperators, buildImageXObject, buildInternalLinkAnnotation, buildLinkAnnotation, buildPDF, buildPDFBytes, buildPDFStream, buildRadioGroupParent, buildSMaskXObject, buildSigDict, buildWatermarkState, chunkBinaryString, clearFontCache, computeColumnPositions, concatChunks, containsArabic, containsBengali, containsDevanagari, containsHebrew, containsRTL, containsTamil, containsThai, createEncodingContext, createModifier, createPDF, createTokenizer, decodeASCII85, decodeASCIIHex, decodeEcPublicKey, decodeLZW, decodeRunLength, defaultFieldHeight, derBitString, derDecode, derInteger, derOctetString, derOid, derSequence, detectCharLang, detectFallbackLangs, detectImageFormat, dictGet, dictGetArray, dictGetDict, dictGetName, dictGetNum, dictGetRef, downloadBlob, ean13CheckDigit, ecPublicKeyFromPrivate, ecdsaSign, ecdsaVerify, encodeCode128, encodeEcPublicKey, encodePDF417, encodePdfTextString, estimateCmsSize, estimateContentsSize, findStartxref, generateDataMatrix, generatePDFInWorker, generatePDFMainThread, generateQR, getMaxInflateOutputSize, getRegisteredLangs, getTrailerRef, getTrailerValue, hasFontLoader, helveticaWidth, hmacSha256, inflateSync, initCrypto, initNodeCompression, initNodeDecompression as initNodeDecompression_parser, isArmenianCodepoint, isArray, isBengaliCodepoint, isCyrillicCodepoint, isDevanagariCodepoint, isDict, isGeorgianCodepoint, isLinkAnnotation, isName, isRef, isSelfSigned, isStream, isTamilCodepoint, isValidPdfRgb, loadFontData, nameValue, needsUnicodeFont, normalizeColors, openPdf, parseCertificate, parseColor, parseImage, parseIndirectObject, parseJPEG, parsePNG, parseRsaPrivateKey, parseRsaPublicKey, parseSvgPath, parseValue, parseXrefTable, pdfString, registerFont, registerFonts, renderBarcode, renderCode128, renderDataMatrix, renderEAN13, renderPDF417, renderQR, renderSvg, resetFontRegistry, resolveBidiRuns, resolveLayout, resolvePdfAConfig, resolveTemplate, rsaSign, rsaSignHash, rsaVerify, rsaVerifyHash, setDeflateImpl, setInflateImpl, setMaxInflateOutputSize, sha384, sha512, shapeArabicText, shapeBengaliText, shapeDevanagariText, shapeTamilText, shapeThaiText, signPdfBytes, slugify, splitTextByFont, streamByteLength, toBytes, toWinAnsi, truncate, truncateToWidth, validateAttachments, validateDocumentStreamable, validateTableStreamable, validateURL, validateWatermark, verifyCertSignature, wrapText };
|