@embedpdf/models 2.9.1 → 2.10.1
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -1
- package/dist/pdf.d.ts +262 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1216,9 +1216,21 @@ var PDF_FORM_FIELD_FLAG = /* @__PURE__ */ ((PDF_FORM_FIELD_FLAG2) => {
|
|
|
1216
1216
|
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["NOEXPORT"] = 4] = "NOEXPORT";
|
|
1217
1217
|
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["TEXT_MULTIPLINE"] = 4096] = "TEXT_MULTIPLINE";
|
|
1218
1218
|
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["TEXT_PASSWORD"] = 8192] = "TEXT_PASSWORD";
|
|
1219
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["TEXT_FILESELECT"] = 1048576] = "TEXT_FILESELECT";
|
|
1220
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["TEXT_DONOTSPELLCHECK"] = 4194304] = "TEXT_DONOTSPELLCHECK";
|
|
1221
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["TEXT_DONOTSCROLL"] = 8388608] = "TEXT_DONOTSCROLL";
|
|
1222
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["TEXT_COMB"] = 16777216] = "TEXT_COMB";
|
|
1223
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["TEXT_RICHTEXT"] = 33554432] = "TEXT_RICHTEXT";
|
|
1224
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["BUTTON_NOTOGGLETOOFF"] = 16384] = "BUTTON_NOTOGGLETOOFF";
|
|
1225
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["BUTTON_RADIO"] = 32768] = "BUTTON_RADIO";
|
|
1226
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["BUTTON_PUSHBUTTON"] = 65536] = "BUTTON_PUSHBUTTON";
|
|
1227
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["BUTTON_RADIOSINUNISON"] = 33554432] = "BUTTON_RADIOSINUNISON";
|
|
1219
1228
|
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["CHOICE_COMBO"] = 131072] = "CHOICE_COMBO";
|
|
1220
1229
|
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["CHOICE_EDIT"] = 262144] = "CHOICE_EDIT";
|
|
1230
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["CHOICE_SORT"] = 524288] = "CHOICE_SORT";
|
|
1221
1231
|
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["CHOICE_MULTL_SELECT"] = 2097152] = "CHOICE_MULTL_SELECT";
|
|
1232
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["CHOICE_DONOTSPELLCHECK"] = 4194304] = "CHOICE_DONOTSPELLCHECK";
|
|
1233
|
+
PDF_FORM_FIELD_FLAG2[PDF_FORM_FIELD_FLAG2["CHOICE_COMMITONSELCHANGE"] = 67108864] = "CHOICE_COMMITONSELCHANGE";
|
|
1222
1234
|
return PDF_FORM_FIELD_FLAG2;
|
|
1223
1235
|
})(PDF_FORM_FIELD_FLAG || {});
|
|
1224
1236
|
var PdfPageObjectType = /* @__PURE__ */ ((PdfPageObjectType2) => {
|
|
@@ -1287,6 +1299,31 @@ function namesToFlags(names) {
|
|
|
1287
1299
|
/* NONE */
|
|
1288
1300
|
);
|
|
1289
1301
|
}
|
|
1302
|
+
function isWidgetChecked(widget) {
|
|
1303
|
+
return widget.exportValue != null && widget.field.value === widget.exportValue;
|
|
1304
|
+
}
|
|
1305
|
+
var PDF_ANNOT_AACTION_EVENT = /* @__PURE__ */ ((PDF_ANNOT_AACTION_EVENT2) => {
|
|
1306
|
+
PDF_ANNOT_AACTION_EVENT2[PDF_ANNOT_AACTION_EVENT2["KEY_STROKE"] = 12] = "KEY_STROKE";
|
|
1307
|
+
PDF_ANNOT_AACTION_EVENT2[PDF_ANNOT_AACTION_EVENT2["FORMAT"] = 13] = "FORMAT";
|
|
1308
|
+
PDF_ANNOT_AACTION_EVENT2[PDF_ANNOT_AACTION_EVENT2["VALIDATE"] = 14] = "VALIDATE";
|
|
1309
|
+
PDF_ANNOT_AACTION_EVENT2[PDF_ANNOT_AACTION_EVENT2["CALCULATE"] = 15] = "CALCULATE";
|
|
1310
|
+
return PDF_ANNOT_AACTION_EVENT2;
|
|
1311
|
+
})(PDF_ANNOT_AACTION_EVENT || {});
|
|
1312
|
+
var PdfJavaScriptWidgetEventType = /* @__PURE__ */ ((PdfJavaScriptWidgetEventType2) => {
|
|
1313
|
+
PdfJavaScriptWidgetEventType2["Keystroke"] = "keystroke";
|
|
1314
|
+
PdfJavaScriptWidgetEventType2["Format"] = "format";
|
|
1315
|
+
PdfJavaScriptWidgetEventType2["Validate"] = "validate";
|
|
1316
|
+
PdfJavaScriptWidgetEventType2["Calculate"] = "calculate";
|
|
1317
|
+
return PdfJavaScriptWidgetEventType2;
|
|
1318
|
+
})(PdfJavaScriptWidgetEventType || {});
|
|
1319
|
+
var PdfJavaScriptActionTrigger = /* @__PURE__ */ ((PdfJavaScriptActionTrigger2) => {
|
|
1320
|
+
PdfJavaScriptActionTrigger2["DocumentNamed"] = "document_named";
|
|
1321
|
+
PdfJavaScriptActionTrigger2["WidgetKeystroke"] = "widget_keystroke";
|
|
1322
|
+
PdfJavaScriptActionTrigger2["WidgetFormat"] = "widget_format";
|
|
1323
|
+
PdfJavaScriptActionTrigger2["WidgetValidate"] = "widget_validate";
|
|
1324
|
+
PdfJavaScriptActionTrigger2["WidgetCalculate"] = "widget_calculate";
|
|
1325
|
+
return PdfJavaScriptActionTrigger2;
|
|
1326
|
+
})(PdfJavaScriptActionTrigger || {});
|
|
1290
1327
|
var PdfSegmentObjectType = /* @__PURE__ */ ((PdfSegmentObjectType2) => {
|
|
1291
1328
|
PdfSegmentObjectType2[PdfSegmentObjectType2["UNKNOWN"] = -1] = "UNKNOWN";
|
|
1292
1329
|
PdfSegmentObjectType2[PdfSegmentObjectType2["LINETO"] = 0] = "LINETO";
|
|
@@ -2216,6 +2253,7 @@ export {
|
|
|
2216
2253
|
MixedStandardFont,
|
|
2217
2254
|
MixedTextAlignment,
|
|
2218
2255
|
NoopLogger,
|
|
2256
|
+
PDF_ANNOT_AACTION_EVENT,
|
|
2219
2257
|
PDF_FORM_FIELD_FLAG,
|
|
2220
2258
|
PDF_FORM_FIELD_TYPE,
|
|
2221
2259
|
PdfActionType,
|
|
@@ -2236,6 +2274,8 @@ export {
|
|
|
2236
2274
|
PdfEngineFeature,
|
|
2237
2275
|
PdfEngineOperation,
|
|
2238
2276
|
PdfErrorCode,
|
|
2277
|
+
PdfJavaScriptActionTrigger,
|
|
2278
|
+
PdfJavaScriptWidgetEventType,
|
|
2239
2279
|
PdfNonCharacterFFFE,
|
|
2240
2280
|
PdfNonCharacterFFFF,
|
|
2241
2281
|
PdfPageFlattenFlag,
|
|
@@ -2296,6 +2336,7 @@ export {
|
|
|
2296
2336
|
ignore,
|
|
2297
2337
|
inferRotationCenterFromRects,
|
|
2298
2338
|
isUuidV4,
|
|
2339
|
+
isWidgetChecked,
|
|
2299
2340
|
makeStandardFont,
|
|
2300
2341
|
namesToFlags,
|
|
2301
2342
|
normalizeAngle,
|