modern-pdf-lib 0.26.0 → 0.28.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 +16 -3
- package/dist/{batchOptimize-C1W3O68Q.cjs → batchOptimize-CXC9gNqD.cjs} +55 -55
- package/dist/{batchOptimize-BCJEEN8J.mjs → batchOptimize-CjLGD5ie.mjs} +25 -25
- package/dist/{bridge-DMEuGtfn.cjs → bridge-ByvzPu5h.cjs} +29 -31
- package/dist/{bridge-DaS-gzEd.mjs → bridge-ZD6O6QQa.mjs} +4 -5
- package/dist/browser.cjs +245 -154
- package/dist/browser.d.cts +166 -166
- package/dist/browser.d.cts.map +1 -1
- package/dist/browser.d.mts +166 -166
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.mjs +15 -19
- package/dist/cli/index.cjs +7 -7
- package/dist/cli/index.mjs +8 -8
- package/dist/{compressionAnalysis-CwknBtqx.mjs → compressionAnalysis-BgKy45pA.mjs} +55 -69
- package/dist/{compressionAnalysis-Ch7t-HXn.d.mts → compressionAnalysis-CDOp_vPr.d.mts} +136 -136
- package/dist/compressionAnalysis-CDOp_vPr.d.mts.map +1 -0
- package/dist/{compressionAnalysis-B-FPzgzw.cjs → compressionAnalysis-Djv-Zvcd.cjs} +85 -99
- package/dist/{compressionAnalysis-Dgv1TtHJ.d.cts → compressionAnalysis-UfmonqbM.d.cts} +136 -136
- package/dist/compressionAnalysis-UfmonqbM.d.cts.map +1 -0
- package/dist/create.cjs +21 -23
- package/dist/create.d.cts +2 -2
- package/dist/create.d.mts +2 -2
- package/dist/create.mjs +3 -5
- package/dist/{deduplicateImages-DIon68zB.mjs → deduplicateImages-BTCyAPfJ.mjs} +4 -5
- package/dist/{deduplicateImages-cKsnD6Ep.cjs → deduplicateImages-CaGgaqyS.cjs} +14 -15
- package/dist/{fieldAppearance-C8PoLFSc.d.mts → fieldAppearance-Df1262CT.d.cts} +44 -44
- package/dist/fieldAppearance-Df1262CT.d.cts.map +1 -0
- package/dist/{fieldAppearance-CdiGFG5e.d.cts → fieldAppearance-_CZdoUCD.d.mts} +44 -44
- package/dist/fieldAppearance-_CZdoUCD.d.mts.map +1 -0
- package/dist/fontEmbed-DGiZS0h2.d.cts +677 -0
- package/dist/fontEmbed-DGiZS0h2.d.cts.map +1 -0
- package/dist/fontEmbed-DtA_riGC.d.mts +677 -0
- package/dist/fontEmbed-DtA_riGC.d.mts.map +1 -0
- package/dist/forms.cjs +3 -4
- package/dist/forms.d.cts +2 -2
- package/dist/forms.d.mts +2 -2
- package/dist/forms.mjs +2 -3
- package/dist/{grayscaleDetect-C6kFF3dk.mjs → grayscaleDetect-6GJrgBRT.mjs} +3 -3
- package/dist/{grayscaleDetect-C2m-eEXR.cjs → grayscaleDetect-DAUqxjgR.cjs} +13 -14
- package/dist/{imageExtract-zEb1gnkb.cjs → imageExtract-DT50Hp_g.cjs} +13 -14
- package/dist/{imageExtract-Dnk_Ssv7.mjs → imageExtract-Dapir-ux.mjs} +3 -4
- package/dist/index-C1lZe66f.d.mts +8682 -0
- package/dist/index-C1lZe66f.d.mts.map +1 -0
- package/dist/index-D1SvXWSI.d.cts +8682 -0
- package/dist/index-D1SvXWSI.d.cts.map +1 -0
- package/dist/index.cjs +245 -153
- package/dist/index.d.cts +7 -7
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +14 -17
- package/dist/{layout-DQh05VP-.cjs → layout-C4vbTlBW.cjs} +184 -134
- package/dist/{layout-CrqeJBMI.mjs → layout-lO4x64kY.mjs} +50 -12
- package/dist/{loader-CVB-c_3Z.mjs → loader-B1Ix7ozU.mjs} +248 -12
- package/dist/{loader-DYCH3n7d.cjs → loader-DR7H0XOf.cjs} +332 -66
- package/dist/parse.cjs +7 -8
- package/dist/parse.d.cts +3 -3
- package/dist/parse.d.mts +3 -3
- package/dist/parse.mjs +6 -7
- package/dist/pdfDocument-CH2E4UCc.d.mts +5160 -0
- package/dist/pdfDocument-CH2E4UCc.d.mts.map +1 -0
- package/dist/{pdfDocument-D9uYNSb-.cjs → pdfDocument-C_7mrBCL.cjs} +22409 -11624
- package/dist/pdfDocument-CzOipXnw.d.cts +5160 -0
- package/dist/pdfDocument-CzOipXnw.d.cts.map +1 -0
- package/dist/{pdfDocument-D7aFSQEY.mjs → pdfDocument-DRbT6HZw.mjs} +10830 -855
- package/dist/{pdfForm-BpqDGp29.cjs → pdfForm-BVS_do95.cjs} +112 -107
- package/dist/pdfForm-Ca86NDWn.d.cts +897 -0
- package/dist/pdfForm-Ca86NDWn.d.cts.map +1 -0
- package/dist/pdfForm-Ca86NDWn.d.mts +897 -0
- package/dist/pdfForm-Ca86NDWn.d.mts.map +1 -0
- package/dist/{pdfForm-C3mC9FoQ.mjs → pdfForm-CfLnlsj-.mjs} +22 -17
- package/dist/{pdfObjects-1veop1_d.cjs → pdfObjects-BcPlSI0a.cjs} +62 -53
- package/dist/{pdfObjects-uEsWlfzU.mjs → pdfObjects-CB7TEdbW.mjs} +12 -2
- package/dist/rolldown-runtime-ak5kbic3.cjs +18 -0
- package/dist/{src-lFqJHb1C.cjs → src-C-IDXuvi.cjs} +8692 -1916
- package/dist/{src-QZWP21qF.mjs → src-DJaD-bJ2.mjs} +7278 -982
- package/dist/{streamDecode-Bj568Nc9.mjs → streamDecode-BamENT3k.mjs} +129 -150
- package/dist/{streamDecode-CvgErkFu.cjs → streamDecode-DcaZz309.cjs} +139 -160
- package/package.json +25 -22
- package/dist/compressionAnalysis-Ch7t-HXn.d.mts.map +0 -1
- package/dist/compressionAnalysis-Dgv1TtHJ.d.cts.map +0 -1
- package/dist/fflateAdapter-DuNiByKx.mjs +0 -196
- package/dist/fflateAdapter-LTAeAhaD.cjs +0 -207
- package/dist/fieldAppearance-C8PoLFSc.d.mts.map +0 -1
- package/dist/fieldAppearance-CdiGFG5e.d.cts.map +0 -1
- package/dist/fontEmbed-3YhUPLFj.d.cts +0 -659
- package/dist/fontEmbed-3YhUPLFj.d.cts.map +0 -1
- package/dist/fontEmbed-DlVnVCZU.d.mts +0 -659
- package/dist/fontEmbed-DlVnVCZU.d.mts.map +0 -1
- package/dist/fontSubset-5SLWMmEw.cjs +0 -518
- package/dist/fontSubset-BGFDIMmT.mjs +0 -495
- package/dist/index-B4S61WjK.d.mts +0 -6507
- package/dist/index-B4S61WjK.d.mts.map +0 -1
- package/dist/index-xfJP6Ycm.d.cts +0 -6507
- package/dist/index-xfJP6Ycm.d.cts.map +0 -1
- package/dist/libdeflateWasm-CcA1W04G.mjs +0 -220
- package/dist/libdeflateWasm-DLw-I1CY.cjs +0 -237
- package/dist/pdfCatalog-Bqq4FiLn.cjs +0 -174
- package/dist/pdfCatalog-CnKMAtIo.mjs +0 -139
- package/dist/pdfDocument-Bc_vAO74.d.cts +0 -4758
- package/dist/pdfDocument-Bc_vAO74.d.cts.map +0 -1
- package/dist/pdfDocument-Bi-NoyXv.d.mts +0 -4758
- package/dist/pdfDocument-Bi-NoyXv.d.mts.map +0 -1
- package/dist/pdfForm-BiyNtYem.d.mts +0 -905
- package/dist/pdfForm-BiyNtYem.d.mts.map +0 -1
- package/dist/pdfForm-SOXJ72LW.d.cts +0 -905
- package/dist/pdfForm-SOXJ72LW.d.cts.map +0 -1
- package/dist/pdfPage-BJIE5hc6.mjs +0 -8180
- package/dist/pdfPage-C_tjEjj1.cjs +0 -8893
- package/dist/pngEmbed-CGi7cym7.mjs +0 -552
- package/dist/pngEmbed-CTn9IeNB.cjs +0 -563
- package/dist/rolldown-runtime-CKhH4XqG.cjs +0 -24
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { d as FieldType, w as PdfStream } from "./pdfForm-
|
|
1
|
+
import { d as FieldType, w as PdfStream } from "./pdfForm-Ca86NDWn.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/form/fieldAppearance.d.ts
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type AppearanceProviderFor<T extends FieldType> = T extends
|
|
5
|
+
* A typed function that generates an appearance stream for a specific
|
|
6
|
+
* field type. Use this as a callback type when providing custom
|
|
7
|
+
* appearance generators.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* const myTextProvider: AppearanceProviderFor<'text'> = (opts) => {
|
|
11
|
+
* // custom rendering logic
|
|
12
|
+
* return myStream;
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
type AppearanceProviderFor<T extends FieldType> = T extends "text" ? (options: TextAppearanceOptions) => PdfStream : T extends "checkbox" ? (options: CheckboxAppearanceOptions) => PdfStream : T extends "radio" ? (options: RadioAppearanceOptions) => PdfStream : T extends "dropdown" ? (options: DropdownAppearanceOptions) => PdfStream : T extends "listbox" ? (options: ListboxAppearanceOptions) => PdfStream : T extends "button" ? (options: ButtonAppearanceOptions) => PdfStream : T extends "signature" ? (options: SignatureAppearanceOptions) => PdfStream : never;
|
|
17
17
|
/** Options for generating a text field appearance. */
|
|
18
18
|
interface TextAppearanceOptions {
|
|
19
19
|
/** The text value to render. */
|
|
@@ -32,12 +32,12 @@ interface TextAppearanceOptions {
|
|
|
32
32
|
borderWidth?: number | undefined;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
* Generate the appearance stream for a text field.
|
|
36
|
+
*
|
|
37
|
+
* The stream renders the text value within the widget rectangle,
|
|
38
|
+
* using Tf/Td/Tj operators. Handles single-line and multiline,
|
|
39
|
+
* alignment (quadding), and auto font-size calculation.
|
|
40
|
+
*/
|
|
41
41
|
declare function generateTextAppearance(options: TextAppearanceOptions): PdfStream;
|
|
42
42
|
/** Options for generating a checkbox appearance. */
|
|
43
43
|
interface CheckboxAppearanceOptions {
|
|
@@ -47,11 +47,11 @@ interface CheckboxAppearanceOptions {
|
|
|
47
47
|
rect: [number, number, number, number];
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
* Generate the appearance stream for a checkbox — checked state.
|
|
51
|
+
*
|
|
52
|
+
* Renders a checkmark (a simple cross/tick path) inside the widget
|
|
53
|
+
* rectangle when checked, or an empty box when unchecked.
|
|
54
|
+
*/
|
|
55
55
|
declare function generateCheckboxAppearance(options: CheckboxAppearanceOptions): PdfStream;
|
|
56
56
|
/** Options for generating a radio button appearance. */
|
|
57
57
|
interface RadioAppearanceOptions {
|
|
@@ -61,11 +61,11 @@ interface RadioAppearanceOptions {
|
|
|
61
61
|
rect: [number, number, number, number];
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
* Generate the appearance stream for a radio button option.
|
|
65
|
+
*
|
|
66
|
+
* Selected: filled circle inside the widget.
|
|
67
|
+
* Unselected: empty circle (border only).
|
|
68
|
+
*/
|
|
69
69
|
declare function generateRadioAppearance(options: RadioAppearanceOptions): PdfStream;
|
|
70
70
|
/** Options for generating a dropdown field appearance. */
|
|
71
71
|
interface DropdownAppearanceOptions {
|
|
@@ -79,9 +79,9 @@ interface DropdownAppearanceOptions {
|
|
|
79
79
|
fontSize?: number | undefined;
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
* Generate the appearance stream for a dropdown (combo box).
|
|
83
|
+
* Renders the selected value text, similar to a text field.
|
|
84
|
+
*/
|
|
85
85
|
declare function generateDropdownAppearance(options: DropdownAppearanceOptions): PdfStream;
|
|
86
86
|
/** Options for generating a listbox field appearance. */
|
|
87
87
|
interface ListboxAppearanceOptions {
|
|
@@ -97,9 +97,9 @@ interface ListboxAppearanceOptions {
|
|
|
97
97
|
fontSize?: number | undefined;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
* Generate the appearance stream for a listbox.
|
|
101
|
+
* Renders visible options with highlighting for selected items.
|
|
102
|
+
*/
|
|
103
103
|
declare function generateListboxAppearance(options: ListboxAppearanceOptions): PdfStream;
|
|
104
104
|
/** Options for generating a button field appearance. */
|
|
105
105
|
interface ButtonAppearanceOptions {
|
|
@@ -113,9 +113,9 @@ interface ButtonAppearanceOptions {
|
|
|
113
113
|
fontSize?: number | undefined;
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
* Generate the appearance stream for a pushbutton.
|
|
117
|
+
* Renders a 3D-ish raised button with centered caption text.
|
|
118
|
+
*/
|
|
119
119
|
declare function generateButtonAppearance(options: ButtonAppearanceOptions): PdfStream;
|
|
120
120
|
/** Options for generating a signature field appearance. */
|
|
121
121
|
interface SignatureAppearanceOptions {
|
|
@@ -125,12 +125,12 @@ interface SignatureAppearanceOptions {
|
|
|
125
125
|
rect: [number, number, number, number];
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
* Generate the appearance stream for a signature field.
|
|
129
|
+
*
|
|
130
|
+
* Unsigned: dashed border rectangle.
|
|
131
|
+
* Signed: "Signed" text with a line through it.
|
|
132
|
+
*/
|
|
133
133
|
declare function generateSignatureAppearance(options: SignatureAppearanceOptions): PdfStream;
|
|
134
134
|
//#endregion
|
|
135
135
|
export { ListboxAppearanceOptions as a, TextAppearanceOptions as c, generateDropdownAppearance as d, generateListboxAppearance as f, generateTextAppearance as h, DropdownAppearanceOptions as i, generateButtonAppearance as l, generateSignatureAppearance as m, ButtonAppearanceOptions as n, RadioAppearanceOptions as o, generateRadioAppearance as p, CheckboxAppearanceOptions as r, SignatureAppearanceOptions as s, AppearanceProviderFor as t, generateCheckboxAppearance as u };
|
|
136
|
-
//# sourceMappingURL=fieldAppearance-
|
|
136
|
+
//# sourceMappingURL=fieldAppearance-Df1262CT.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldAppearance-Df1262CT.d.cts","names":[],"sources":["../src/form/fieldAppearance.ts"],"mappings":";;;;;;;;;;;;;;;KAoCY,qBAAA,WAAgC,SAAA,IAC1C,CAAA,mBAAoB,OAAA,EAAS,qBAAA,KAA0B,SAAA,GACrD,CAAA,uBAAwB,OAAA,EAAS,yBAAA,KAA8B,SAAA,GAC/D,CAAA,oBAAqB,OAAA,EAAS,sBAAA,KAA2B,SAAA,GACzD,CAAA,uBAAwB,OAAA,EAAS,yBAAA,KAA8B,SAAA,GAC/D,CAAA,sBAAuB,OAAA,EAAS,wBAAA,KAA6B,SAAA,GAC7D,CAAA,qBAAsB,OAAA,EAAS,uBAAA,KAA4B,SAAA,GAC3D,CAAA,wBAAyB,OAAA,EAAS,0BAAA,KAA+B,SAAA;;UA6BpD,qBAAA;EA7BoD;EA+BnE,KAAA;;EAEA,IAAA;;EAEA,QAAA;;EAEA,QAAA;;EAEA,SAAA;;EAEA,SAAA;;EAEA,WAAA;AAAA;;;;;;;;iBAUc,sBAAA,CAAuB,OAAA,EAAS,qBAAA,GAAwB,SAAA;;UAoGvD,yBAAA;;EAEf,OAAA;;EAEA,IAAA;AAAA;;;;AA7JmE;AA6BrE;;iBAyIgB,0BAAA,CAA2B,OAAA,EAAS,yBAAA,GAA4B,SAAA;;UAqC/D,sBAAA;;EAEf,QAAA;;EAEA,IAAA;AAAA;;;AApKA;AAUF;;;iBAmKgB,uBAAA,CAAwB,OAAA,EAAS,sBAAA,GAAyB,SAAA;;UAqCzD,yBAAA;;EAEf,KAAA;EA1MsE;EA4MtE,IAAA;EAxGe;EA0Gf,QAAA;EA1Ge;EA4Gf,QAAA;AAAA;;;;;iBAOc,0BAAA,CAA2B,OAAA,EAAS,yBAAA,GAA4B,SAAA;;UAgB/D,wBAAA;EAtH+D;EAwH9E,OAAA;EAnFe;EAqFf,QAAA;EArFe;EAuFf,IAAA;EA1EF;EA4EE,QAAA;;EAEA,QAAA;AAAA;;;;AA9EwE;iBAqF1D,yBAAA,CAA0B,OAAA,EAAS,wBAAA,GAA2B,SAAA;;UAyD7D,uBAAA;EAzGA;EA2Gf,OAAA;;EAEA,IAAA;;EAEA,QAAA;EAvGA;EAyGA,QAAA;AAAA;;;;;iBAOc,wBAAA,CAAyB,OAAA,EAAS,uBAAA,GAA0B,SAAA;;UA6C3D,0BAAA;EAtIjB;EAwIE,MAAA;;EAEA,IAAA;AAAA;;;;;;AAhIA;iBAyIc,2BAAA,CAA4B,OAAA,EAAS,0BAAA,GAA6B,SAAA"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { d as FieldType, w as PdfStream } from "./pdfForm-
|
|
1
|
+
import { d as FieldType, w as PdfStream } from "./pdfForm-Ca86NDWn.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/form/fieldAppearance.d.ts
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type AppearanceProviderFor<T extends FieldType> = T extends
|
|
5
|
+
* A typed function that generates an appearance stream for a specific
|
|
6
|
+
* field type. Use this as a callback type when providing custom
|
|
7
|
+
* appearance generators.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* const myTextProvider: AppearanceProviderFor<'text'> = (opts) => {
|
|
11
|
+
* // custom rendering logic
|
|
12
|
+
* return myStream;
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
type AppearanceProviderFor<T extends FieldType> = T extends "text" ? (options: TextAppearanceOptions) => PdfStream : T extends "checkbox" ? (options: CheckboxAppearanceOptions) => PdfStream : T extends "radio" ? (options: RadioAppearanceOptions) => PdfStream : T extends "dropdown" ? (options: DropdownAppearanceOptions) => PdfStream : T extends "listbox" ? (options: ListboxAppearanceOptions) => PdfStream : T extends "button" ? (options: ButtonAppearanceOptions) => PdfStream : T extends "signature" ? (options: SignatureAppearanceOptions) => PdfStream : never;
|
|
17
17
|
/** Options for generating a text field appearance. */
|
|
18
18
|
interface TextAppearanceOptions {
|
|
19
19
|
/** The text value to render. */
|
|
@@ -32,12 +32,12 @@ interface TextAppearanceOptions {
|
|
|
32
32
|
borderWidth?: number | undefined;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
* Generate the appearance stream for a text field.
|
|
36
|
+
*
|
|
37
|
+
* The stream renders the text value within the widget rectangle,
|
|
38
|
+
* using Tf/Td/Tj operators. Handles single-line and multiline,
|
|
39
|
+
* alignment (quadding), and auto font-size calculation.
|
|
40
|
+
*/
|
|
41
41
|
declare function generateTextAppearance(options: TextAppearanceOptions): PdfStream;
|
|
42
42
|
/** Options for generating a checkbox appearance. */
|
|
43
43
|
interface CheckboxAppearanceOptions {
|
|
@@ -47,11 +47,11 @@ interface CheckboxAppearanceOptions {
|
|
|
47
47
|
rect: [number, number, number, number];
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
* Generate the appearance stream for a checkbox — checked state.
|
|
51
|
+
*
|
|
52
|
+
* Renders a checkmark (a simple cross/tick path) inside the widget
|
|
53
|
+
* rectangle when checked, or an empty box when unchecked.
|
|
54
|
+
*/
|
|
55
55
|
declare function generateCheckboxAppearance(options: CheckboxAppearanceOptions): PdfStream;
|
|
56
56
|
/** Options for generating a radio button appearance. */
|
|
57
57
|
interface RadioAppearanceOptions {
|
|
@@ -61,11 +61,11 @@ interface RadioAppearanceOptions {
|
|
|
61
61
|
rect: [number, number, number, number];
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
* Generate the appearance stream for a radio button option.
|
|
65
|
+
*
|
|
66
|
+
* Selected: filled circle inside the widget.
|
|
67
|
+
* Unselected: empty circle (border only).
|
|
68
|
+
*/
|
|
69
69
|
declare function generateRadioAppearance(options: RadioAppearanceOptions): PdfStream;
|
|
70
70
|
/** Options for generating a dropdown field appearance. */
|
|
71
71
|
interface DropdownAppearanceOptions {
|
|
@@ -79,9 +79,9 @@ interface DropdownAppearanceOptions {
|
|
|
79
79
|
fontSize?: number | undefined;
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
* Generate the appearance stream for a dropdown (combo box).
|
|
83
|
+
* Renders the selected value text, similar to a text field.
|
|
84
|
+
*/
|
|
85
85
|
declare function generateDropdownAppearance(options: DropdownAppearanceOptions): PdfStream;
|
|
86
86
|
/** Options for generating a listbox field appearance. */
|
|
87
87
|
interface ListboxAppearanceOptions {
|
|
@@ -97,9 +97,9 @@ interface ListboxAppearanceOptions {
|
|
|
97
97
|
fontSize?: number | undefined;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
* Generate the appearance stream for a listbox.
|
|
101
|
+
* Renders visible options with highlighting for selected items.
|
|
102
|
+
*/
|
|
103
103
|
declare function generateListboxAppearance(options: ListboxAppearanceOptions): PdfStream;
|
|
104
104
|
/** Options for generating a button field appearance. */
|
|
105
105
|
interface ButtonAppearanceOptions {
|
|
@@ -113,9 +113,9 @@ interface ButtonAppearanceOptions {
|
|
|
113
113
|
fontSize?: number | undefined;
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
* Generate the appearance stream for a pushbutton.
|
|
117
|
+
* Renders a 3D-ish raised button with centered caption text.
|
|
118
|
+
*/
|
|
119
119
|
declare function generateButtonAppearance(options: ButtonAppearanceOptions): PdfStream;
|
|
120
120
|
/** Options for generating a signature field appearance. */
|
|
121
121
|
interface SignatureAppearanceOptions {
|
|
@@ -125,12 +125,12 @@ interface SignatureAppearanceOptions {
|
|
|
125
125
|
rect: [number, number, number, number];
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
* Generate the appearance stream for a signature field.
|
|
129
|
+
*
|
|
130
|
+
* Unsigned: dashed border rectangle.
|
|
131
|
+
* Signed: "Signed" text with a line through it.
|
|
132
|
+
*/
|
|
133
133
|
declare function generateSignatureAppearance(options: SignatureAppearanceOptions): PdfStream;
|
|
134
134
|
//#endregion
|
|
135
135
|
export { ListboxAppearanceOptions as a, TextAppearanceOptions as c, generateDropdownAppearance as d, generateListboxAppearance as f, generateTextAppearance as h, DropdownAppearanceOptions as i, generateButtonAppearance as l, generateSignatureAppearance as m, ButtonAppearanceOptions as n, RadioAppearanceOptions as o, generateRadioAppearance as p, CheckboxAppearanceOptions as r, SignatureAppearanceOptions as s, AppearanceProviderFor as t, generateCheckboxAppearance as u };
|
|
136
|
-
//# sourceMappingURL=fieldAppearance-
|
|
136
|
+
//# sourceMappingURL=fieldAppearance-_CZdoUCD.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldAppearance-_CZdoUCD.d.mts","names":[],"sources":["../src/form/fieldAppearance.ts"],"mappings":";;;;;;;;;;;;;;;KAoCY,qBAAA,WAAgC,SAAA,IAC1C,CAAA,mBAAoB,OAAA,EAAS,qBAAA,KAA0B,SAAA,GACrD,CAAA,uBAAwB,OAAA,EAAS,yBAAA,KAA8B,SAAA,GAC/D,CAAA,oBAAqB,OAAA,EAAS,sBAAA,KAA2B,SAAA,GACzD,CAAA,uBAAwB,OAAA,EAAS,yBAAA,KAA8B,SAAA,GAC/D,CAAA,sBAAuB,OAAA,EAAS,wBAAA,KAA6B,SAAA,GAC7D,CAAA,qBAAsB,OAAA,EAAS,uBAAA,KAA4B,SAAA,GAC3D,CAAA,wBAAyB,OAAA,EAAS,0BAAA,KAA+B,SAAA;;UA6BpD,qBAAA;EA7BoD;EA+BnE,KAAA;;EAEA,IAAA;;EAEA,QAAA;;EAEA,QAAA;;EAEA,SAAA;;EAEA,SAAA;;EAEA,WAAA;AAAA;;;;;;;;iBAUc,sBAAA,CAAuB,OAAA,EAAS,qBAAA,GAAwB,SAAA;;UAoGvD,yBAAA;;EAEf,OAAA;;EAEA,IAAA;AAAA;;;;AA7JmE;AA6BrE;;iBAyIgB,0BAAA,CAA2B,OAAA,EAAS,yBAAA,GAA4B,SAAA;;UAqC/D,sBAAA;;EAEf,QAAA;;EAEA,IAAA;AAAA;;;AApKA;AAUF;;;iBAmKgB,uBAAA,CAAwB,OAAA,EAAS,sBAAA,GAAyB,SAAA;;UAqCzD,yBAAA;;EAEf,KAAA;EA1MsE;EA4MtE,IAAA;EAxGe;EA0Gf,QAAA;EA1Ge;EA4Gf,QAAA;AAAA;;;;;iBAOc,0BAAA,CAA2B,OAAA,EAAS,yBAAA,GAA4B,SAAA;;UAgB/D,wBAAA;EAtH+D;EAwH9E,OAAA;EAnFe;EAqFf,QAAA;EArFe;EAuFf,IAAA;EA1EF;EA4EE,QAAA;;EAEA,QAAA;AAAA;;;;AA9EwE;iBAqF1D,yBAAA,CAA0B,OAAA,EAAS,wBAAA,GAA2B,SAAA;;UAyD7D,uBAAA;EAzGA;EA2Gf,OAAA;;EAEA,IAAA;;EAEA,QAAA;EAvGA;EAyGA,QAAA;AAAA;;;;;iBAOc,wBAAA,CAAyB,OAAA,EAAS,uBAAA,GAA0B,SAAA;;UA6C3D,0BAAA;EAtIjB;EAwIE,MAAA;;EAEA,IAAA;AAAA;;;;;;AAhIA;iBAyIc,2BAAA,CAA4B,OAAA,EAAS,0BAAA,GAA6B,SAAA"}
|