modern-pdf-lib 0.29.0 → 0.30.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 +4 -3
- package/dist/browser.cjs +15 -3
- package/dist/browser.d.cts +5 -5
- package/dist/browser.d.mts +5 -5
- package/dist/browser.mjs +4 -4
- package/dist/{compressionAnalysis-InMeGrqw.d.mts → compressionAnalysis-0m5jJG1_.d.mts} +2 -2
- package/dist/{compressionAnalysis-CyBVhRU5.d.cts.map → compressionAnalysis-0m5jJG1_.d.mts.map} +1 -1
- package/dist/{compressionAnalysis-CyBVhRU5.d.cts → compressionAnalysis-CSBcmi0_.d.cts} +2 -2
- package/dist/{compressionAnalysis-InMeGrqw.d.mts.map → compressionAnalysis-CSBcmi0_.d.cts.map} +1 -1
- package/dist/create.cjs +2 -2
- package/dist/create.d.cts +2 -2
- package/dist/create.d.mts +2 -2
- package/dist/create.mjs +2 -2
- package/dist/{fontEmbed-N-VWoZ0F.d.mts → fontEmbed-Bzv89wgp.d.mts} +2 -2
- package/dist/{fontEmbed-DxtdZxUj.d.cts.map → fontEmbed-Bzv89wgp.d.mts.map} +1 -1
- package/dist/{fontEmbed-DxtdZxUj.d.cts → fontEmbed-Dwl1XeEA.d.cts} +2 -2
- package/dist/{fontEmbed-N-VWoZ0F.d.mts.map → fontEmbed-Dwl1XeEA.d.cts.map} +1 -1
- package/dist/{index--7OpQy6B.d.cts → index-BJ4KxqDL.d.cts} +293 -61
- package/dist/index-BJ4KxqDL.d.cts.map +1 -0
- package/dist/{index-Cai7jC6u.d.mts → index-CERay5r2.d.mts} +293 -61
- package/dist/index-CERay5r2.d.mts.map +1 -0
- package/dist/index.cjs +15 -3
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +4 -4
- package/dist/{layout-DiO_3JLh.cjs → layout-BYXpcYtC.cjs} +2 -2
- package/dist/{layout-D035GpU8.mjs → layout-xOcesNCh.mjs} +2 -2
- package/dist/parse.cjs +1 -1
- package/dist/parse.d.cts +2 -2
- package/dist/parse.d.mts +2 -2
- package/dist/parse.mjs +1 -1
- package/dist/{pdfDocument-5Do0LKQh.d.cts → pdfDocument-B-8iPl_j.d.mts} +85 -3
- package/dist/pdfDocument-B-8iPl_j.d.mts.map +1 -0
- package/dist/{pdfDocument-B_0VSUHL.d.mts → pdfDocument-B8tQcZqj.d.cts} +85 -3
- package/dist/pdfDocument-B8tQcZqj.d.cts.map +1 -0
- package/dist/{pdfDocument-BaQlOkYr.cjs → pdfDocument-Bh4ebDqE.cjs} +41 -2
- package/dist/{pdfDocument-B6czyaVI.mjs → pdfDocument-Cgkkk8F8.mjs} +41 -2
- package/dist/{src-DQ63jYIR.cjs → src-Tb7wHOKz.cjs} +548 -6
- package/dist/{src-Ci9ZjqhP.mjs → src-s9zNsZAT.mjs} +477 -7
- package/package.json +1 -1
- package/dist/index--7OpQy6B.d.cts.map +0 -1
- package/dist/index-Cai7jC6u.d.mts.map +0 -1
- package/dist/pdfDocument-5Do0LKQh.d.cts.map +0 -1
- package/dist/pdfDocument-B_0VSUHL.d.mts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as encodeUTCTime, Br as rectangle, Bt as PageSizes, C as encodeInteger, E as encodeOctetString, F as parseDerTlv, Gr as setLineWidth, H as mergePdfs, I as toBuffer, Jr as beginText, Kn as applyFillColor, L as computeSignatureHash, M as extractIssuerAndSerial, N as extractSubjectPublicKeyInfo, O as encodeSequence, P as getSubtle, Pr as fill, Rn as restoreState, Rr as lineTo, S as encodeContextTag, Sn as formatPdfDate, T as encodeOID, Vn as saveState, Vr as setDashPattern, Xr as moveText, Yn as cmykToRgb, Yr as endText, at as sha256, b as detectKeyAlgorithm, ei as setFont, gn as buildAnnotationDict, gt as PdfParseError, k as encodeSet, mn as PdfAnnotation, n as StandardFonts, oi as setWordSpacing, qn as applyStrokeColor, qr as stroke, r as createPdf, s as setPageLabels, si as showText$1, t as PdfDocument, x as detectNamedCurve, y as decodeOidBytes, z as findSignatures, zr as moveTo } from "./pdfDocument-
|
|
1
|
+
import { A as encodeUTCTime, Br as rectangle, Bt as PageSizes, C as encodeInteger, E as encodeOctetString, F as parseDerTlv, Gr as setLineWidth, H as mergePdfs, I as toBuffer, Jr as beginText, Kn as applyFillColor, L as computeSignatureHash, M as extractIssuerAndSerial, N as extractSubjectPublicKeyInfo, O as encodeSequence, P as getSubtle, Pr as fill, Rn as restoreState, Rr as lineTo, S as encodeContextTag, Sn as formatPdfDate, T as encodeOID, Vn as saveState, Vr as setDashPattern, Xr as moveText, Yn as cmykToRgb, Yr as endText, at as sha256, b as detectKeyAlgorithm, ei as setFont, gn as buildAnnotationDict, gt as PdfParseError, k as encodeSet, mn as PdfAnnotation, n as StandardFonts, oi as setWordSpacing, qn as applyStrokeColor, qr as stroke, r as createPdf, s as setPageLabels, si as showText$1, t as PdfDocument, x as detectNamedCurve, y as decodeOidBytes, z as findSignatures, zr as moveTo } from "./pdfDocument-Cgkkk8F8.mjs";
|
|
2
2
|
import { c as PdfRef, i as PdfName, l as PdfStream, n as PdfBool, o as PdfNumber, r as PdfDict, t as PdfArray, u as PdfString } from "./pdfObjects-CB7TEdbW.mjs";
|
|
3
3
|
import { n as decodeStreamData, r as getStreamFilters } from "./streamDecode-DCpgTocN.mjs";
|
|
4
4
|
import { g as FieldFlags, v as numVal } from "./pdfForm-CfLnlsj-.mjs";
|
|
@@ -277,7 +277,7 @@ function compressStream(stream, level) {
|
|
|
277
277
|
* @returns The incremental save result.
|
|
278
278
|
*/
|
|
279
279
|
async function saveDocumentIncremental(originalBytes, doc, options) {
|
|
280
|
-
const { buildDocumentStructure } = await import("./pdfDocument-
|
|
280
|
+
const { buildDocumentStructure } = await import("./pdfDocument-Cgkkk8F8.mjs").then((n) => n.Cn);
|
|
281
281
|
const registry = doc.getRegistry();
|
|
282
282
|
const structure = buildDocumentStructure(doc.getInternalPages().map((p) => p.finalize()), {
|
|
283
283
|
producer: doc.getProducer(),
|
|
@@ -29946,6 +29946,476 @@ var RenderCache = class {
|
|
|
29946
29946
|
}
|
|
29947
29947
|
};
|
|
29948
29948
|
//#endregion
|
|
29949
|
+
//#region src/compliance/afAttach.ts
|
|
29950
|
+
/**
|
|
29951
|
+
* @module compliance/afAttach
|
|
29952
|
+
*
|
|
29953
|
+
* Attach embedded / associated files to any PDF object.
|
|
29954
|
+
*
|
|
29955
|
+
* The Associated Files mechanism (`/AF`) lets a PDF declare that one or more
|
|
29956
|
+
* embedded files are *associated* with a given object. ISO 32000-2 allows the
|
|
29957
|
+
* `/AF` key on the document catalog (§7.11.4) as well as on individual objects
|
|
29958
|
+
* — page dictionaries, annotation dictionaries, Form/Image XObject stream
|
|
29959
|
+
* dictionaries, and structure elements (§14.13). Because every one of those
|
|
29960
|
+
* targets is a plain {@link PdfDict}, the same helper attaches `/AF` uniformly.
|
|
29961
|
+
*
|
|
29962
|
+
* In addition, a *document-level* associated file must also be reachable
|
|
29963
|
+
* through the catalog's embedded-files name tree
|
|
29964
|
+
* (`/Names` → `/EmbeddedFiles` → `/Names`). {@link createAssociatedFile} (in
|
|
29965
|
+
* `associatedFiles.ts`) intentionally leaves that wiring to the caller;
|
|
29966
|
+
* {@link registerEmbeddedFile} completes it.
|
|
29967
|
+
*
|
|
29968
|
+
* These are pure builders: they mutate the supplied dictionaries in place and
|
|
29969
|
+
* return nothing. Object numbers / serialization remain the writer's concern.
|
|
29970
|
+
*
|
|
29971
|
+
* Reference: ISO 32000-2:2020, §7.11.4 (embedded file streams) and §14.13
|
|
29972
|
+
* (associated files).
|
|
29973
|
+
*/
|
|
29974
|
+
/**
|
|
29975
|
+
* Attach one or more associated files to any PDF object via its `/AF` key.
|
|
29976
|
+
*
|
|
29977
|
+
* Works uniformly for the document catalog, a page dictionary, an annotation
|
|
29978
|
+
* dictionary, a Form/Image XObject stream's dictionary, or a structure-element
|
|
29979
|
+
* dictionary — all of which are plain {@link PdfDict} instances.
|
|
29980
|
+
*
|
|
29981
|
+
* If `target` has no `/AF` yet, a fresh array (built with
|
|
29982
|
+
* {@link buildAfArray}) is set. If `/AF` is already a {@link PdfArray}, the
|
|
29983
|
+
* new refs are appended to it, preserving the existing entries and order. Any
|
|
29984
|
+
* other (malformed) `/AF` value is replaced with a fresh array.
|
|
29985
|
+
*
|
|
29986
|
+
* @param target The object dictionary to attach the files to.
|
|
29987
|
+
* @param fileSpecRefs Indirect references to file-specification dictionaries.
|
|
29988
|
+
*/
|
|
29989
|
+
function attachAssociatedFiles(target, fileSpecRefs) {
|
|
29990
|
+
const existing = target.get("/AF");
|
|
29991
|
+
if (existing instanceof PdfArray) {
|
|
29992
|
+
for (const ref of fileSpecRefs) existing.push(ref);
|
|
29993
|
+
return;
|
|
29994
|
+
}
|
|
29995
|
+
target.set("/AF", buildAfArray([...fileSpecRefs]));
|
|
29996
|
+
}
|
|
29997
|
+
/**
|
|
29998
|
+
* Locate the `/EmbeddedFiles` name-tree `/Names` array on the catalog,
|
|
29999
|
+
* creating the intermediate `/Names` and `/EmbeddedFiles` dictionaries (and
|
|
30000
|
+
* the leaf `/Names` array) if they do not yet exist. Existing dictionaries
|
|
30001
|
+
* are reused in place rather than replaced.
|
|
30002
|
+
*/
|
|
30003
|
+
function ensureEmbeddedFilesNames(catalog) {
|
|
30004
|
+
const namesEntry = catalog.get("/Names");
|
|
30005
|
+
const namesDict = namesEntry instanceof PdfDict ? namesEntry : new PdfDict();
|
|
30006
|
+
if (namesDict !== namesEntry) catalog.set("/Names", namesDict);
|
|
30007
|
+
const efEntry = namesDict.get("/EmbeddedFiles");
|
|
30008
|
+
const efDict = efEntry instanceof PdfDict ? efEntry : new PdfDict();
|
|
30009
|
+
if (efDict !== efEntry) namesDict.set("/EmbeddedFiles", efDict);
|
|
30010
|
+
const leafEntry = efDict.get("/Names");
|
|
30011
|
+
const leaf = leafEntry instanceof PdfArray ? leafEntry : new PdfArray();
|
|
30012
|
+
if (leaf !== leafEntry) efDict.set("/Names", leaf);
|
|
30013
|
+
return leaf;
|
|
30014
|
+
}
|
|
30015
|
+
/**
|
|
30016
|
+
* Insert a `[name, fileSpecRef]` pair into an embedded-files name-tree `/Names`
|
|
30017
|
+
* array, keeping the array sorted by name. The array is a flat sequence of
|
|
30018
|
+
* alternating key/value entries: `[ name0, ref0, name1, ref1, … ]`.
|
|
30019
|
+
*/
|
|
30020
|
+
function insertNamePairSorted(leaf, name, fileSpecRef) {
|
|
30021
|
+
const items = leaf.items;
|
|
30022
|
+
let insertAt = items.length;
|
|
30023
|
+
for (let i = 0; i < items.length; i += 2) {
|
|
30024
|
+
const entry = items[i];
|
|
30025
|
+
if ((entry instanceof PdfString ? entry.value : "") > name) {
|
|
30026
|
+
insertAt = i;
|
|
30027
|
+
break;
|
|
30028
|
+
}
|
|
30029
|
+
}
|
|
30030
|
+
items.splice(insertAt, 0, PdfString.literal(name), fileSpecRef);
|
|
30031
|
+
}
|
|
30032
|
+
/**
|
|
30033
|
+
* Complete {@link createAssociatedFile}'s "caller responsibility" by wiring a
|
|
30034
|
+
* file-specification reference into the document catalog at the *document
|
|
30035
|
+
* level*.
|
|
30036
|
+
*
|
|
30037
|
+
* Two things happen:
|
|
30038
|
+
* 1. The pair `[PdfString.literal(name), fileSpecRef]` is added to the
|
|
30039
|
+
* catalog's `/Names` → `/EmbeddedFiles` → `/Names` array, keeping the
|
|
30040
|
+
* array's name/value pairs sorted by name (as required for a name tree).
|
|
30041
|
+
* The intermediate dictionaries and the leaf array are created on demand
|
|
30042
|
+
* and reused if already present.
|
|
30043
|
+
* 2. `fileSpecRef` is added to the catalog's `/AF` array (via
|
|
30044
|
+
* {@link attachAssociatedFiles}).
|
|
30045
|
+
*
|
|
30046
|
+
* @param catalog The document catalog dictionary.
|
|
30047
|
+
* @param name The name under which the file is registered in the tree.
|
|
30048
|
+
* @param fileSpecRef Indirect reference to the file-specification dictionary.
|
|
30049
|
+
*/
|
|
30050
|
+
function registerEmbeddedFile(catalog, name, fileSpecRef) {
|
|
30051
|
+
insertNamePairSorted(ensureEmbeddedFilesNames(catalog), name, fileSpecRef);
|
|
30052
|
+
attachAssociatedFiles(catalog, [fileSpecRef]);
|
|
30053
|
+
}
|
|
30054
|
+
//#endregion
|
|
30055
|
+
//#region src/compliance/pageOutputIntent.ts
|
|
30056
|
+
/**
|
|
30057
|
+
* @module compliance/pageOutputIntent
|
|
30058
|
+
*
|
|
30059
|
+
* Per-page and per-stream output intents (ISO 32000-2 §14.11.5).
|
|
30060
|
+
*
|
|
30061
|
+
* In addition to the document-level `/OutputIntents` array carried on the
|
|
30062
|
+
* catalog, PDF 2.0 permits an `/OutputIntents` array on individual *page*
|
|
30063
|
+
* dictionaries and on *Form XObject* stream dictionaries. These narrower
|
|
30064
|
+
* intents override the document intent for the colour-managed content of that
|
|
30065
|
+
* page or form, which is essential for documents that mix output conditions
|
|
30066
|
+
* (for example, a PDF/X job whose individual pages target different print
|
|
30067
|
+
* presses).
|
|
30068
|
+
*
|
|
30069
|
+
* This module provides two pure builders:
|
|
30070
|
+
*
|
|
30071
|
+
* - {@link buildPageOutputIntent} constructs a single `/OutputIntent`
|
|
30072
|
+
* dictionary (reusing {@link buildOutputIntent} for the embedded ICC
|
|
30073
|
+
* `/DestOutputProfile`) and registers it as an indirect object.
|
|
30074
|
+
* - {@link attachOutputIntents} sets — or, when one already exists, appends
|
|
30075
|
+
* to — the `/OutputIntents` array on a target dictionary (a page dict for
|
|
30076
|
+
* per-page intents, or a Form XObject stream's dict for per-stream).
|
|
30077
|
+
*
|
|
30078
|
+
* Reference: ISO 32000-2:2020, §14.11.5 (Output intents).
|
|
30079
|
+
*/
|
|
30080
|
+
/**
|
|
30081
|
+
* Attach output-intent references to a target dictionary's `/OutputIntents`
|
|
30082
|
+
* array.
|
|
30083
|
+
*
|
|
30084
|
+
* If the target has no `/OutputIntents` entry, a fresh {@link PdfArray} is
|
|
30085
|
+
* created and populated with `intentRefs`. If one already exists (and is an
|
|
30086
|
+
* array), the references are appended to it in order, preserving the existing
|
|
30087
|
+
* array instance.
|
|
30088
|
+
*
|
|
30089
|
+
* The target may be a page dictionary (for per-page intents) or a Form
|
|
30090
|
+
* XObject stream's dictionary (for per-stream intents).
|
|
30091
|
+
*
|
|
30092
|
+
* @param target The page or Form XObject dictionary to mutate.
|
|
30093
|
+
* @param intentRefs Indirect references to `/OutputIntent` dictionaries.
|
|
30094
|
+
*/
|
|
30095
|
+
function attachOutputIntents(target, intentRefs) {
|
|
30096
|
+
const existing = target.get("/OutputIntents");
|
|
30097
|
+
const array = existing instanceof PdfArray ? existing : new PdfArray();
|
|
30098
|
+
for (const ref of intentRefs) array.push(ref);
|
|
30099
|
+
if (!(existing instanceof PdfArray)) target.set("/OutputIntents", array);
|
|
30100
|
+
}
|
|
30101
|
+
/**
|
|
30102
|
+
* Build a per-page / per-stream `/OutputIntent` dictionary and register it.
|
|
30103
|
+
*
|
|
30104
|
+
* The embedded ICC `/DestOutputProfile` is produced by reusing
|
|
30105
|
+
* {@link buildOutputIntent}; this builder then layers the per-page subtype
|
|
30106
|
+
* (`/S`), output-condition identifier and optional `/Info` string on top.
|
|
30107
|
+
* The resulting dictionary carries `/Type /OutputIntent` and may be attached
|
|
30108
|
+
* to a page or Form XObject dictionary via {@link attachOutputIntents}.
|
|
30109
|
+
*
|
|
30110
|
+
* @param registry The PDF object registry to register objects into.
|
|
30111
|
+
* @param options Output-intent configuration.
|
|
30112
|
+
* @returns An indirect reference to the `/OutputIntent` dictionary.
|
|
30113
|
+
*/
|
|
30114
|
+
function buildPageOutputIntent(registry, options = {}) {
|
|
30115
|
+
const intentRef = buildOutputIntent(registry, {
|
|
30116
|
+
subtype: options.subtype ?? "/GTS_PDFA1",
|
|
30117
|
+
...options.iccProfile !== void 0 ? { iccProfile: options.iccProfile } : {},
|
|
30118
|
+
...options.components !== void 0 ? { components: options.components } : {},
|
|
30119
|
+
...options.outputConditionIdentifier !== void 0 ? { outputConditionIdentifier: options.outputConditionIdentifier } : {}
|
|
30120
|
+
});
|
|
30121
|
+
const intentDict = registry.resolve(intentRef);
|
|
30122
|
+
if (intentDict !== void 0 && intentDict.kind === "dict") {
|
|
30123
|
+
intentDict.set("/Type", PdfName.of("OutputIntent"));
|
|
30124
|
+
if (options.outputConditionIdentifier !== void 0) intentDict.set("/OutputConditionIdentifier", PdfString.literal(options.outputConditionIdentifier));
|
|
30125
|
+
if (options.info !== void 0) intentDict.set("/Info", PdfString.literal(options.info));
|
|
30126
|
+
}
|
|
30127
|
+
return intentRef;
|
|
30128
|
+
}
|
|
30129
|
+
//#endregion
|
|
30130
|
+
//#region src/compliance/encryptedPayload.ts
|
|
30131
|
+
/**
|
|
30132
|
+
* @module compliance/encryptedPayload
|
|
30133
|
+
*
|
|
30134
|
+
* Unencrypted wrapper documents and encrypted payloads
|
|
30135
|
+
* (ISO 32000-2:2020 §7.6.7).
|
|
30136
|
+
*
|
|
30137
|
+
* A PDF 2.0 *unencrypted wrapper document* is an ordinary, viewable PDF that
|
|
30138
|
+
* carries an *encrypted payload* as an embedded file. The wrapper itself is
|
|
30139
|
+
* not encrypted (so any conforming reader can open it and show a cover page),
|
|
30140
|
+
* while the sensitive content lives in the embedded payload, which is
|
|
30141
|
+
* protected by an external/handler-specific crypto filter.
|
|
30142
|
+
*
|
|
30143
|
+
* The payload is declared through an *Encrypted Payload* dictionary
|
|
30144
|
+
* (`/Type /EncryptedPayload`). Its `/Subtype` names the crypto filter used to
|
|
30145
|
+
* protect the payload (for example `/AESV3`), and an optional `/Version`
|
|
30146
|
+
* records the version of that filter. The Encrypted Payload dictionary is
|
|
30147
|
+
* attached to the embedded file's *file specification* dictionary via the
|
|
30148
|
+
* `/EP` key, and that file specification is also marked with
|
|
30149
|
+
* `/AFRelationship /EncryptedPayload`.
|
|
30150
|
+
*
|
|
30151
|
+
* This module provides two pure builders:
|
|
30152
|
+
*
|
|
30153
|
+
* - {@link buildEncryptedPayload} — build the `/EncryptedPayload` dictionary.
|
|
30154
|
+
* - {@link buildUnencryptedWrapper} — embed the payload bytes as an
|
|
30155
|
+
* associated file and attach the `/EP` dictionary to its file
|
|
30156
|
+
* specification, returning the file-spec reference.
|
|
30157
|
+
*
|
|
30158
|
+
* The caller attaches the returned file-spec reference to the catalog `/AF`
|
|
30159
|
+
* array and to the `/Names /EmbeddedFiles` name tree (for example via
|
|
30160
|
+
* `afAttach`).
|
|
30161
|
+
*
|
|
30162
|
+
* Reference: ISO 32000-2:2020, §7.6.7 (Unencrypted wrapper document).
|
|
30163
|
+
*/
|
|
30164
|
+
/**
|
|
30165
|
+
* Build an `/EncryptedPayload` dictionary (ISO 32000-2 §7.6.7).
|
|
30166
|
+
*
|
|
30167
|
+
* The returned dictionary has:
|
|
30168
|
+
* - `/Type /EncryptedPayload`
|
|
30169
|
+
* - `/Subtype /<subtype>` — the crypto filter name
|
|
30170
|
+
* - `/Version /<version>` — only when {@link EncryptedPayloadOptions.version}
|
|
30171
|
+
* is supplied
|
|
30172
|
+
*
|
|
30173
|
+
* @param options - The crypto-filter subtype and optional version.
|
|
30174
|
+
* @returns A spec-shaped `/EncryptedPayload` {@link PdfDict}.
|
|
30175
|
+
*/
|
|
30176
|
+
function buildEncryptedPayload(options) {
|
|
30177
|
+
const dict = new PdfDict();
|
|
30178
|
+
dict.set("/Type", PdfName.of("EncryptedPayload"));
|
|
30179
|
+
dict.set("/Subtype", PdfName.of(options.subtype));
|
|
30180
|
+
if (options.version !== void 0) dict.set("/Version", PdfName.of(options.version));
|
|
30181
|
+
return dict;
|
|
30182
|
+
}
|
|
30183
|
+
/**
|
|
30184
|
+
* Build the embedded encrypted-payload file for an unencrypted wrapper
|
|
30185
|
+
* document and return its file-specification reference.
|
|
30186
|
+
*
|
|
30187
|
+
* The payload bytes are embedded via {@link createAssociatedFile} with an
|
|
30188
|
+
* `/AFRelationship` of `/EncryptedPayload` and an `application/octet-stream`
|
|
30189
|
+
* MIME type. The resolved file-specification dictionary then receives an
|
|
30190
|
+
* `/EP` entry holding the {@link buildEncryptedPayload} dictionary.
|
|
30191
|
+
*
|
|
30192
|
+
* The caller is responsible for attaching the returned file-spec reference to
|
|
30193
|
+
* the catalog `/AF` array and the `/Names /EmbeddedFiles` name tree.
|
|
30194
|
+
*
|
|
30195
|
+
* @param registry - The PDF object registry to register objects into.
|
|
30196
|
+
* @param options - The payload bytes, filename, crypto subtype/version, and
|
|
30197
|
+
* optional description.
|
|
30198
|
+
* @returns An indirect reference to the file-specification dictionary.
|
|
30199
|
+
*/
|
|
30200
|
+
function buildUnencryptedWrapper(registry, options) {
|
|
30201
|
+
const { fileSpecRef } = createAssociatedFile(registry, {
|
|
30202
|
+
data: options.data,
|
|
30203
|
+
filename: options.filename,
|
|
30204
|
+
mimeType: "application/octet-stream",
|
|
30205
|
+
relationship: "EncryptedPayload",
|
|
30206
|
+
description: options.description
|
|
30207
|
+
});
|
|
30208
|
+
const fileSpec = registry.resolve(fileSpecRef);
|
|
30209
|
+
if (fileSpec instanceof PdfDict) {
|
|
30210
|
+
const ep = buildEncryptedPayload({
|
|
30211
|
+
subtype: options.subtype,
|
|
30212
|
+
version: options.version
|
|
30213
|
+
});
|
|
30214
|
+
fileSpec.set("/EP", ep);
|
|
30215
|
+
}
|
|
30216
|
+
return fileSpecRef;
|
|
30217
|
+
}
|
|
30218
|
+
//#endregion
|
|
30219
|
+
//#region src/core/softMask.ts
|
|
30220
|
+
/**
|
|
30221
|
+
* @module core/softMask
|
|
30222
|
+
*
|
|
30223
|
+
* Soft-mask groups in graphics state (ISO 32000-1 §11.6.5.2).
|
|
30224
|
+
*
|
|
30225
|
+
* A *soft mask* defines a per-pixel shape/opacity for subsequent painting
|
|
30226
|
+
* operations. It is carried in an `ExtGState` dictionary under the `/SMask`
|
|
30227
|
+
* key. The mask is derived from a *transparency-group XObject* (a form
|
|
30228
|
+
* XObject whose `/Group` dictionary has `/S /Transparency`):
|
|
30229
|
+
*
|
|
30230
|
+
* - A **luminosity** mask (`/S /Luminosity`) computes the mask value from the
|
|
30231
|
+
* luminosity of the group's composited result. An optional `/BC` backdrop
|
|
30232
|
+
* color sets the colour against which the group is composited before the
|
|
30233
|
+
* luminosity is measured.
|
|
30234
|
+
* - An **alpha** mask (`/S /Alpha`) computes the mask value from the group's
|
|
30235
|
+
* accumulated alpha (shape/opacity). `/BC` is not meaningful and is omitted.
|
|
30236
|
+
*
|
|
30237
|
+
* An optional `/TR` *transfer function* remaps the computed mask values; it may
|
|
30238
|
+
* be an indirect reference to a function object or the name `/Identity`.
|
|
30239
|
+
*
|
|
30240
|
+
* These are pure builders: they return spec-shaped `ExtGState` dictionaries.
|
|
30241
|
+
* Registering the result and naming it in a page's `/Resources /ExtGState`
|
|
30242
|
+
* (e.g. via `page.registerExtGState(name, registry.register(extGState))`) is
|
|
30243
|
+
* the caller's concern.
|
|
30244
|
+
*
|
|
30245
|
+
* Reference: ISO 32000-1:2008, §11.6.5.2 (Mask shape and opacity);
|
|
30246
|
+
* ISO 32000-1:2008, §8.4.5 (Graphics state, `/SMask`).
|
|
30247
|
+
*/
|
|
30248
|
+
/**
|
|
30249
|
+
* Build an `ExtGState` dictionary that installs a soft-mask group.
|
|
30250
|
+
*
|
|
30251
|
+
* The returned dictionary has `/Type /ExtGState` and an `/SMask` mask
|
|
30252
|
+
* dictionary:
|
|
30253
|
+
*
|
|
30254
|
+
* - `/Type /Mask`
|
|
30255
|
+
* - `/S /Luminosity` or `/S /Alpha` (per {@link SoftMaskGroupOptions.type},
|
|
30256
|
+
* defaulting to `Luminosity`)
|
|
30257
|
+
* - `/G` → the supplied group XObject reference
|
|
30258
|
+
* - `/BC [ … ]` — backdrop colour, **only** for luminosity masks and only
|
|
30259
|
+
* when {@link SoftMaskGroupOptions.backdropColor} is provided
|
|
30260
|
+
* - `/TR` → the transfer function (indirect reference) or the name
|
|
30261
|
+
* `/Identity`, only when {@link SoftMaskGroupOptions.transferFunction} is
|
|
30262
|
+
* provided
|
|
30263
|
+
*
|
|
30264
|
+
* @param options - The soft-mask group description.
|
|
30265
|
+
* @returns A spec-shaped `ExtGState` {@link PdfDict}.
|
|
30266
|
+
*/
|
|
30267
|
+
function buildSoftMaskGroupExtGState(options) {
|
|
30268
|
+
const subtype = options.type ?? "Luminosity";
|
|
30269
|
+
const smask = new PdfDict();
|
|
30270
|
+
smask.set("/Type", PdfName.of("Mask"));
|
|
30271
|
+
smask.set("/S", PdfName.of(subtype));
|
|
30272
|
+
smask.set("/G", options.groupXObject);
|
|
30273
|
+
if (subtype === "Luminosity" && options.backdropColor !== void 0 && options.backdropColor.length > 0) smask.set("/BC", PdfArray.fromNumbers([...options.backdropColor]));
|
|
30274
|
+
if (options.transferFunction !== void 0) smask.set("/TR", options.transferFunction === "Identity" ? PdfName.of("Identity") : options.transferFunction);
|
|
30275
|
+
const extGState = new PdfDict();
|
|
30276
|
+
extGState.set("/Type", PdfName.of("ExtGState"));
|
|
30277
|
+
extGState.set("/SMask", smask);
|
|
30278
|
+
return extGState;
|
|
30279
|
+
}
|
|
30280
|
+
/**
|
|
30281
|
+
* Build an `ExtGState` dictionary that clears any active soft mask by setting
|
|
30282
|
+
* `/SMask /None`. Apply this after a masked region to restore unmasked
|
|
30283
|
+
* painting.
|
|
30284
|
+
*
|
|
30285
|
+
* @returns An `ExtGState` {@link PdfDict} with `/SMask /None`.
|
|
30286
|
+
*/
|
|
30287
|
+
function buildSoftMaskNone() {
|
|
30288
|
+
const extGState = new PdfDict();
|
|
30289
|
+
extGState.set("/Type", PdfName.of("ExtGState"));
|
|
30290
|
+
extGState.set("/SMask", PdfName.of("None"));
|
|
30291
|
+
return extGState;
|
|
30292
|
+
}
|
|
30293
|
+
//#endregion
|
|
30294
|
+
//#region src/core/imageMask.ts
|
|
30295
|
+
/**
|
|
30296
|
+
* @module core/imageMask
|
|
30297
|
+
*
|
|
30298
|
+
* Image masks and black-point compensation per ISO 32000-2 §8.9.6
|
|
30299
|
+
* (Masked images) and §8.6.5.9 (Black-point compensation).
|
|
30300
|
+
*
|
|
30301
|
+
* PDF supports three ways of masking an image XObject:
|
|
30302
|
+
*
|
|
30303
|
+
* - **Stencil mask** — a 1-bit-per-component `/ImageMask` image whose sample
|
|
30304
|
+
* values select which areas of the page are painted with the current fill
|
|
30305
|
+
* colour and which are left untouched (§8.9.6.2). The mask data is packed
|
|
30306
|
+
* one bit per sample, each row byte-aligned (`ceil(width / 8)` bytes per
|
|
30307
|
+
* row); the caller supplies the already-packed bytes.
|
|
30308
|
+
* - **Colour-key mask** — a `/Mask` array of `[min0 max0 min1 max1 …]`
|
|
30309
|
+
* integer ranges (two per colour component) that makes matching sample
|
|
30310
|
+
* colours transparent (§8.9.6.4).
|
|
30311
|
+
* - **Soft mask** — a separate DeviceGray image referenced from a base
|
|
30312
|
+
* image's `/SMask` entry, giving per-pixel opacity (§11.6.5.2).
|
|
30313
|
+
*
|
|
30314
|
+
* Black-point compensation (§8.6.5.9) is controlled through an ExtGState's
|
|
30315
|
+
* `/UseBlackPtComp` entry, which selects whether the conversion between
|
|
30316
|
+
* colour spaces maps source black to destination black.
|
|
30317
|
+
*
|
|
30318
|
+
* These are pure builders: they construct (and, for the stream variants,
|
|
30319
|
+
* register) PDF objects but do not wire them into a page or resource
|
|
30320
|
+
* dictionary — that is the caller's concern.
|
|
30321
|
+
*
|
|
30322
|
+
* Reference: ISO 32000-2:2020, §8.9.6 (Masked images), §8.6.5.9
|
|
30323
|
+
* (Black-point compensation).
|
|
30324
|
+
*/
|
|
30325
|
+
/**
|
|
30326
|
+
* Build a stencil mask: a 1-bit `/ImageMask` image XObject (§8.9.6.2).
|
|
30327
|
+
*
|
|
30328
|
+
* The returned stream has `/Type /XObject`, `/Subtype /Image`,
|
|
30329
|
+
* `/ImageMask true`, `/BitsPerComponent 1`, and the supplied `/Width` and
|
|
30330
|
+
* `/Height`. When a `decode` pair is given it is emitted as a `/Decode`
|
|
30331
|
+
* array, allowing the mask polarity to be inverted (`[1 0]`).
|
|
30332
|
+
*
|
|
30333
|
+
* The `bits` buffer must already be packed one bit per sample with each row
|
|
30334
|
+
* byte-aligned (`ceil(width / 8)` bytes per row); this builder stores it
|
|
30335
|
+
* verbatim and does not repack it.
|
|
30336
|
+
*
|
|
30337
|
+
* @param registry - Registry to register the stream into.
|
|
30338
|
+
* @param bits - Packed, byte-aligned 1-bpc mask data.
|
|
30339
|
+
* @param width - Image width in samples.
|
|
30340
|
+
* @param height - Image height in samples.
|
|
30341
|
+
* @param decode - Optional `[d0, d1]` decode pair.
|
|
30342
|
+
* @returns An indirect reference to the registered image XObject stream.
|
|
30343
|
+
*/
|
|
30344
|
+
function buildStencilMask(registry, bits, width, height, decode) {
|
|
30345
|
+
const dict = new PdfDict();
|
|
30346
|
+
dict.set("/Type", PdfName.of("XObject"));
|
|
30347
|
+
dict.set("/Subtype", PdfName.of("Image"));
|
|
30348
|
+
dict.set("/ImageMask", PdfBool.TRUE);
|
|
30349
|
+
dict.set("/BitsPerComponent", PdfNumber.of(1));
|
|
30350
|
+
dict.set("/Width", PdfNumber.of(width));
|
|
30351
|
+
dict.set("/Height", PdfNumber.of(height));
|
|
30352
|
+
if (decode !== void 0) dict.set("/Decode", PdfArray.fromNumbers([decode[0], decode[1]]));
|
|
30353
|
+
dict.set("/Length", PdfNumber.of(bits.length));
|
|
30354
|
+
return registry.register(new PdfStream(dict, bits));
|
|
30355
|
+
}
|
|
30356
|
+
/**
|
|
30357
|
+
* Build a colour-key masking array (§8.9.6.4).
|
|
30358
|
+
*
|
|
30359
|
+
* The `ranges` list holds two integers — a minimum and a maximum — per
|
|
30360
|
+
* colour component, laid out as `[min0 max0 min1 max1 …]`. Sample colours
|
|
30361
|
+
* whose every component falls within its range become transparent. The
|
|
30362
|
+
* returned {@link PdfArray} is assigned to a base image's `/Mask` entry.
|
|
30363
|
+
*
|
|
30364
|
+
* @param ranges - An even-length list of `[min, max]` integer pairs.
|
|
30365
|
+
* @returns A `/Mask` {@link PdfArray} of {@link PdfNumber}s.
|
|
30366
|
+
* @throws RangeError if `ranges` is empty or has an odd length.
|
|
30367
|
+
*/
|
|
30368
|
+
function buildColorKeyMask(ranges) {
|
|
30369
|
+
if (ranges.length === 0 || ranges.length % 2 !== 0) throw new RangeError(`colour-key mask requires a non-empty even number of values (min/max pairs); got ${ranges.length}`);
|
|
30370
|
+
return new PdfArray(ranges.map((v) => PdfNumber.of(v)));
|
|
30371
|
+
}
|
|
30372
|
+
/**
|
|
30373
|
+
* Build an image soft mask: a DeviceGray image XObject usable as a base
|
|
30374
|
+
* image's `/SMask` (§11.6.5.2).
|
|
30375
|
+
*
|
|
30376
|
+
* The returned stream has `/Type /XObject`, `/Subtype /Image`,
|
|
30377
|
+
* `/ColorSpace /DeviceGray`, the supplied `/Width` and `/Height`, and
|
|
30378
|
+
* `/BitsPerComponent` (defaulting to 8). Each grayscale sample provides the
|
|
30379
|
+
* opacity of the corresponding base-image pixel.
|
|
30380
|
+
*
|
|
30381
|
+
* @param registry - Registry to register the stream into.
|
|
30382
|
+
* @param gray - Grayscale opacity samples.
|
|
30383
|
+
* @param width - Image width in samples.
|
|
30384
|
+
* @param height - Image height in samples.
|
|
30385
|
+
* @param bitsPerComponent - Bits per sample; defaults to 8.
|
|
30386
|
+
* @returns An indirect reference to the registered soft-mask image XObject.
|
|
30387
|
+
*/
|
|
30388
|
+
function buildImageSoftMask(registry, gray, width, height, bitsPerComponent) {
|
|
30389
|
+
const dict = new PdfDict();
|
|
30390
|
+
dict.set("/Type", PdfName.of("XObject"));
|
|
30391
|
+
dict.set("/Subtype", PdfName.of("Image"));
|
|
30392
|
+
dict.set("/Width", PdfNumber.of(width));
|
|
30393
|
+
dict.set("/Height", PdfNumber.of(height));
|
|
30394
|
+
dict.set("/ColorSpace", PdfName.of("DeviceGray"));
|
|
30395
|
+
dict.set("/BitsPerComponent", PdfNumber.of(bitsPerComponent ?? 8));
|
|
30396
|
+
dict.set("/Length", PdfNumber.of(gray.length));
|
|
30397
|
+
return registry.register(new PdfStream(dict, gray));
|
|
30398
|
+
}
|
|
30399
|
+
/**
|
|
30400
|
+
* Build an ExtGState that controls black-point compensation (§8.6.5.9).
|
|
30401
|
+
*
|
|
30402
|
+
* The returned dictionary has `/Type /ExtGState` and `/UseBlackPtComp` set
|
|
30403
|
+
* to the requested mode:
|
|
30404
|
+
*
|
|
30405
|
+
* - `Default` — leave the choice to the conforming reader.
|
|
30406
|
+
* - `ON` — always apply black-point compensation.
|
|
30407
|
+
* - `OFF` — never apply black-point compensation.
|
|
30408
|
+
*
|
|
30409
|
+
* @param mode - The `/UseBlackPtComp` mode.
|
|
30410
|
+
* @returns An ExtGState {@link PdfDict}.
|
|
30411
|
+
*/
|
|
30412
|
+
function buildBlackPointCompensationExtGState(mode) {
|
|
30413
|
+
const gs = new PdfDict();
|
|
30414
|
+
gs.set("/Type", PdfName.of("ExtGState"));
|
|
30415
|
+
gs.set("/UseBlackPtComp", PdfName.of(mode));
|
|
30416
|
+
return gs;
|
|
30417
|
+
}
|
|
30418
|
+
//#endregion
|
|
29949
30419
|
//#region src/index.ts
|
|
29950
30420
|
/** Whether initWasm has already completed successfully. */
|
|
29951
30421
|
let wasmInitialized = false;
|
|
@@ -29972,15 +30442,15 @@ async function initWasm(options) {
|
|
|
29972
30442
|
if (wasmInitialized) return;
|
|
29973
30443
|
const inits = [];
|
|
29974
30444
|
if (options.deflate || options.deflateWasm) inits.push((async () => {
|
|
29975
|
-
const { initDeflateWasm } = await import("./pdfDocument-
|
|
30445
|
+
const { initDeflateWasm } = await import("./pdfDocument-Cgkkk8F8.mjs").then((n) => n.zt);
|
|
29976
30446
|
await initDeflateWasm(options.deflateWasm);
|
|
29977
30447
|
})());
|
|
29978
30448
|
if (options.png || options.pngWasm) inits.push((async () => {
|
|
29979
|
-
const { initPngWasm } = await import("./pdfDocument-
|
|
30449
|
+
const { initPngWasm } = await import("./pdfDocument-Cgkkk8F8.mjs").then((n) => n.At);
|
|
29980
30450
|
await initPngWasm(options.pngWasm);
|
|
29981
30451
|
})());
|
|
29982
30452
|
if (options.fonts || options.fontWasm) inits.push((async () => {
|
|
29983
|
-
const { initSubsetWasm } = await import("./pdfDocument-
|
|
30453
|
+
const { initSubsetWasm } = await import("./pdfDocument-Cgkkk8F8.mjs").then((n) => n.Pt);
|
|
29984
30454
|
await initSubsetWasm(options.fontWasm);
|
|
29985
30455
|
})());
|
|
29986
30456
|
if (options.jpeg || options.jpegWasm) inits.push((async () => {
|
|
@@ -29991,6 +30461,6 @@ async function initWasm(options) {
|
|
|
29991
30461
|
wasmInitialized = true;
|
|
29992
30462
|
}
|
|
29993
30463
|
//#endregion
|
|
29994
|
-
export {
|
|
30464
|
+
export { decodeTileRegion as $, ChangeTracker as $a, addCounterSignature as $i, InvalidColorError as $n, encodeCode128Values as $r, buildType5Halftone as $t, extractEmbeddedRevocationData as A, PdfSquareAnnotation as Aa, getSupportedLevels as Ai, timestampPlugin as An, readEan13 as Ar, h as At, layoutParagraph as B, generateLineAppearance as Ba, flattenTransparency as Bi, removeAllBookmarks as Bn, upcAToOperators as Br, sampleShadingColor as Bt, generateThumbnail as C, PdfRedactAnnotation as Ca, stripProhibitedFeatures as Ci, buildRequirements as Cn, borderedPreset as Cr, isWoff2 as Ct, renderPageToImage as D, PdfLineAnnotation as Da, parseXmpMetadata as Di, tableToJson as Dn, readBarcode as Dr, buildPdfVtDParts as Dt, rasterize as E, PdfCircleAnnotation as Ea, extractXmpMetadata as Ei, tableToCsv as En, stripedPreset as Er, createWorkerPool as Et, validateKeyUsage as F, PdfFreeTextAnnotation as Fa, getToUnicodeCmap as Fi, batchFlatten as Fn, pdf417ToOperators as Fr, generateOrderX as Ft, downscale16To8 as G, PdfLinkAnnotation as Ga, isLinearized as Gi, BatchProcessingError as Gn, encodeEan8 as Gr, buildBoxDict as Gt, buildPdfXOutputIntent as H, generateSquigglyAppearance as Ha, validatePdfA as Hi, flattenField as Hn, ean13ToOperators as Hr, levenshtein as Ht, buildCertificateChain as I, generateCircleAppearance as Ia, buildOutputIntent as Ii, batchMerge as In, dataMatrixToOperators as Ir, generateXRechnungCii as It, offsetSignedToUnsigned as J, createXmpStream as Ja, findChangedObjects as Ji, ExceededMaxLengthError as Jn, code39ToOperators as Jr, validateBoxGeometry as Jt, getComponentDepths as K, PdfTextAnnotation as Ka, linearizePdf as Ki, CombedTextLayoutError as Kn, encodeItf as Kr, buildGtsPdfxVersion as Kt, validateCertificateChain as L, generateFreeTextAppearance as La, SRGB_ICC_PROFILE as Li, processBatch as Ln, encodeDataMatrix as Lr, buildPdfA4Xmp as Lt, EKU_OIDS as M, PdfSquigglyAnnotation as Ma, generateSymbolToUnicodeCmap as Mi, PdfDocumentBuilder as Mn, calculateBarcodeDimensions as Mr, createRangeFetcher as Mt, validateCertificatePolicy as N, PdfStrikeOutAnnotation as Na, generateWinAnsiToUnicodeCmap as Ni, enforcePdfUa as Nn, renderStyledBarcode as Nr, resolveFallback as Nt, interpretContentStream as O, PdfPolyLineAnnotation as Oa, validateXmpMetadata as Oi, accessibilityPlugin as On, readCode128 as Or, buildVtDpm as Ot, validateExtendedKeyUsage as P, PdfUnderlineAnnotation as Pa, generateZapfDingbatsToUnicodeCmap as Pi, validatePdfUa as Pn, encodePdf417 as Pr, splitByScript as Pt, decodeTile as Q, buildSeparationColorSpace as Qa, hasLtvData as Qi, ForeignPageError as Qn, encodeCode128 as Qr, buildType1Halftone as Qt, findHyphenationPoints as R, generateHighlightAppearance as Ra, generateSrgbIccProfile as Ri, addBookmark as Rn, calculateUpcCheckDigit as Rr, pdfA4Rules as Rt, extractImages as S, PdfPopupAnnotation as Sa, countOccurrences as Si, buildRequirement as Sn, applyTablePreset as Sr, isWoff as St, renderPageToCanvas as T, PdfStampAnnotation as Ta, createAssociatedFile as Ti, extractTables as Tn, professionalPreset as Tr, signDeferred as Tt, enforcePdfX as U, generateStrikeOutAppearance as Ua, delinearizePdf as Ui, flattenFields as Un, ean8ToOperators as Ur, renderCodeFrame as Ut, layoutTextFlow as V, generateSquareAppearance as Va, enforcePdfA as Vi, removeBookmark as Vn, calculateEanCheckDigit as Vr, didYouMean as Vt, validatePdfX as W, generateUnderlineAppearance as Wa, getLinearizationInfo as Wi, flattenForm as Wn, encodeEan13 as Wr, generateCiiXml as Wt, upscale8To16 as X, PDFOperator as Xa, buildDssDictionary as Xi, FieldExistsAsNonTerminalError as Xn, encodeCode39 as Xr, buildSampledTransferFunction as Xt, summarizeBitDepth as Y, parseXmpMetadata$1 as Ya, optimizeIncrementalSave as Yi, FieldAlreadyExistsError as Yn, computeCode39CheckDigit as Yr, STANDARD_SPOT_FUNCTIONS as Yt, assembleTiles as Z, buildDeviceNColorSpace as Za, embedLtvData as Zi, FontNotEmbeddedError as Zn, code128ToOperators as Zr, buildThresholdHalftone as Zt, redactRegions as _, parseTimestampResponse as _a, recompressImage as _i, MATHML_NAMESPACE as _n, estimateTextWidth as _r, formatDate as _t, buildStencilMask as a, detectModifications as aa, recompressWebP as ai, reconstructLines as an, RemovePageFromEmptyDocumentError as ar, isCertificateRevoked as at, comparePages as b, PdfFileAttachmentAnnotation as ba, generatePdfAXmp as bi, buildNamespacesArray as bn, wrapText$2 as br, formatNumber$1 as bt, buildEncryptedPayload as c, getCertificationLevel as ca, convertTiffCmykToRgb as ci, buildDocTimeStampDict as cn, UnexpectedFieldTypeError as cr, createSandbox as ct, buildPageOutputIntent as d, appendIncrementalUpdate as da, extractJpegMetadata as di, buildLab as dn, formatDate$1 as dr, setFieldValue as dt, getCounterSignatures as ea, valuesToModules as ei, identityTransferFunction as en, saveDocumentIncremental as eo, InvalidFieldNamePartError as er, parseTileInfo as et, attachAssociatedFiles as f, findExistingSignatures as fa, injectJpegMetadata as fi, labToRgb as fn, replaceTemplateVariables as fr, addVisibilityAction as ft, renderPageTile as g, buildTimestampRequest as ga, optimizeImage as gi, toSarif as gn, ellipsisText as gr, AFDate_FormatEx as gt, computeTileGrid as h, validateByteRangeIntegrity as ha, estimateJpegQuality as hi, toJsonReport as hn, applyOverflow as hr, AFSpecial_Format as ht, buildImageSoftMask as i, getFieldLocks as ia, encodePngFromPixels as ii, buildCollection as in, PluginError as ir, extractCrlUrls as it, verifyOfflineRevocation as j, PdfHighlightAnnotation as ja, isValidLevel as ji, StreamingPdfParser as jn, readEan8 as jr, renderToPdf as jt, interpretPage as k, PdfPolygonAnnotation as ka, getProfile as ki, metadataPlugin as kn, readCode39 as kr, gtsPdfVtVersion as kt, buildUnencryptedWrapper as l, setCertificationLevel as la, embedTiffCmyk as li, buildCalGray as ln, applyHeaderFooter as lr, getFieldValue as lt, RenderCache as m, saveIncrementalWithSignaturePreservation as ma, downscaleImage as mi, SARIF_SCHEMA_URI as mn, toRoman as mr, validateFieldValue as mt, buildBlackPointCompensationExtGState as n, addFieldLock as na, canDirectEmbed as ni, evaluateFunction as nn, MissingOnValueCheckError as nr, TrustStore as nt, buildSoftMaskGroupExtGState as o, MdpPermission as oa, webpToJpeg as oi, reconstructParagraphs as on, RichTextFieldReadError as or, checkCertificateStatus as ot, registerEmbeddedFile as p, parseExistingTrailer as pa, analyzeJpegMarkers as pi, DEFAULT_SARIF_TOOL_NAME as pn, toAlpha as pr, setFieldVisibility as pt, normalizeComponentDepth as q, buildXmpMetadata as qa, computeObjectHash as qi, EncryptedPdfError as qn, itfToOperators as qr, buildPdfX6OutputIntent as qt, buildColorKeyMask as r, buildFieldLockDict as ra, embedTiffDirect as ri, markdownToPdf as rn, NoSuchFieldError as rr, downloadCrl as rt, buildSoftMaskNone as s, buildDocMdpReference as sa, webpToPng as si, DEFAULT_DOC_TIMESTAMP_CONTENTS_SIZE as sn, StreamingParseError as sr, extractOcspUrl as st, initWasm as t, diffSignedContent as ta, PdfWorker as ti, nameHalftone as tn, saveIncremental as to, InvalidPageSizeError as tr, verifySignatureDetailed as tt, attachOutputIntents as u, validateSignatureChain as ua, isCmykTiff as ui, buildCalRGB as un, applyHeaderFooterToPage as ur, resolveFieldReference as ut, applyOcr as v, requestTimestamp as va, applyRedaction as vi, PDF2_NAMESPACE as vn, shrinkFontSize as vr, parseAcrobatDate as vt, renderDisplayListToCanvas as w, PdfInkAnnotation as wa, buildAfArray as wi, buildDPartRoot as wn, minimalPreset as wr, readWoffHeader as wt, extractFonts as x, PdfCaretAnnotation as xa, generatePdfAXmpBytes as xi, buildPieceInfo as xn, applyPreset as xr, decodeWoff as xt, compareImages as y, searchTextItems as ya, enforcePdfAFull as yi, buildNamespace as yn, truncateText as yr, AFNumber_Format as yt, layoutColumns as z, generateInkAppearance as za, detectTransparency as zi, getBookmarks as zn, encodeUpcA as zr, buildFunctionShading as zt };
|
|
29995
30465
|
|
|
29996
|
-
//# sourceMappingURL=src-
|
|
30466
|
+
//# sourceMappingURL=src-s9zNsZAT.mjs.map
|
package/package.json
CHANGED