/
var
/
www
/
greso.tech
/
server
/
nsm
/
node_modules
/
pdf-lib
/
es
/
api
/
form
/
/var/www/greso.tech/server/nsm/node_modules/pdf-lib/es/api/form
mkdir
upload
Name
Size
Mode
Actions
appearances.d.ts
3097
0644
edit
dl
rm
appearances.d.ts.map
2226
0644
edit
dl
rm
appearances.js
20737
0644
edit
dl
rm
appearances.js.map
16541
0644
edit
dl
rm
index.d.ts
564
0644
edit
dl
rm
index.d.ts.map
625
0644
edit
dl
rm
index.js
562
0644
edit
dl
rm
index.js.map
618
0644
edit
dl
rm
PDFButton.d.ts
5970
0644
edit
dl
rm
PDFButton.d.ts.map
1042
0644
edit
dl
rm
PDFButton.js
10659
0644
edit
dl
rm
PDFButton.js.map
4647
0644
edit
dl
rm
PDFCheckBox.d.ts
6024
0644
edit
dl
rm
PDFCheckBox.d.ts.map
879
0644
edit
dl
rm
PDFCheckBox.js
10118
0644
edit
dl
rm
PDFCheckBox.js.map
4348
0644
edit
dl
rm
PDFDropdown.d.ts
17378
0644
edit
dl
rm
PDFDropdown.d.ts.map
1756
0644
edit
dl
rm
PDFDropdown.js
25567
0644
edit
dl
rm
PDFDropdown.js.map
9064
0644
edit
dl
rm
PDFField.d.ts
8026
0644
edit
dl
rm
PDFField.d.ts.map
2609
0644
edit
dl
rm
PDFField.js
17158
0644
edit
dl
rm
PDFField.js.map
10076
0644
edit
dl
rm
PDFForm.d.ts
16061
0644
edit
dl
rm
PDFForm.d.ts.map
2322
0644
edit
dl
rm
PDFForm.js
30163
0644
edit
dl
rm
PDFForm.js.map
16184
0644
edit
dl
rm
PDFOptionList.d.ts
14660
0644
edit
dl
rm
PDFOptionList.d.ts.map
1570
0644
edit
dl
rm
PDFOptionList.js
22221
0644
edit
dl
rm
PDFOptionList.js.map
8345
0644
edit
dl
rm
PDFRadioGroup.d.ts
11463
0644
edit
dl
rm
PDFRadioGroup.d.ts.map
1204
0644
edit
dl
rm
PDFRadioGroup.js
19510
0644
edit
dl
rm
PDFRadioGroup.js.map
7161
0644
edit
dl
rm
PDFSignature.d.ts
1309
0644
edit
dl
rm
PDFSignature.d.ts.map
440
0644
edit
dl
rm
PDFSignature.js
1678
0644
edit
dl
rm
PDFSignature.js.map
724
0644
edit
dl
rm
PDFTextField.d.ts
23255
0644
edit
dl
rm
PDFTextField.d.ts.map
2120
0644
edit
dl
rm
PDFTextField.js
32353
0644
edit
dl
rm
PDFTextField.js.map
9902
0644
edit
dl
rm
Edit:
/var/www/greso.tech/server/nsm/node_modules/pdf-lib/es/api/form/PDFCheckBox.d.ts
(6024B)
import PDFDocument from "../PDFDocument"; import PDFPage from "../PDFPage"; import { AppearanceProviderFor } from "./appearances"; import PDFField, { FieldAppearanceOptions } from "./PDFField"; import { PDFRef, PDFAcroCheckBox } from "../../core"; /** * Represents a check box field of a [[PDFForm]]. * * [[PDFCheckBox]] fields are interactive boxes that users can click with their * mouse. This type of [[PDFField]] has two states: `on` and `off`. The purpose * of a check box is to enable users to select from one or more options, where * each option is represented by a single check box. Check boxes are typically * square in shape and display a check mark when they are in the `on` state. */ export default class PDFCheckBox extends PDFField { /** * > **NOTE:** You probably don't want to call this method directly. Instead, * > consider using the [[PDFForm.getCheckBox]] method, which will create an * > instance of [[PDFCheckBox]] for you. * * Create an instance of [[PDFCheckBox]] from an existing acroCheckBox and ref * * @param acroCheckBox The underlying `PDFAcroCheckBox` for this check box. * @param ref The unique reference for this check box. * @param doc The document to which this check box will belong. */ static of: (acroCheckBox: PDFAcroCheckBox, ref: PDFRef, doc: PDFDocument) => PDFCheckBox; /** The low-level PDFAcroCheckBox wrapped by this check box. */ readonly acroField: PDFAcroCheckBox; private constructor(); /** * Mark this check box. This operation is analogous to a human user clicking * a check box to fill it in a PDF reader. This method will update the * underlying state of the check box field to indicate it has been selected. * PDF libraries and readers will be able to extract this value from the * saved document and determine that it was selected. * * For example: * ```js * const checkBox = form.getCheckBox('some.checkBox.field') * checkBox.check() * ``` * * This method will mark this check box as dirty, causing its appearance * streams to be updated when either [[PDFDocument.save]] or * [[PDFForm.updateFieldAppearances]] is called. The updated appearance * streams will display a check mark inside the widgets of this check box * field. */ check(): void; /** * Clears this check box. This operation is analogous to a human user clicking * a check box to unmark it in a PDF reader. This method will update the * underlying state of the check box field to indicate it has been deselected. * PDF libraries and readers will be able to extract this value from the * saved document and determine that it was not selected. * * For example: * ```js * const checkBox = form.getCheckBox('some.checkBox.field') * checkBox.uncheck() * ``` * * This method will mark this check box as dirty. See [[PDFCheckBox.check]] * for more details about what this means. */ uncheck(): void; /** * Returns `true` if this check box is selected (either by a human user via * a PDF reader, or else programmatically via software). For example: * ```js * const checkBox = form.getCheckBox('some.checkBox.field') * if (checkBox.isChecked()) console.log('check box is selected') * ``` * @returns Whether or not this check box is selected. */ isChecked(): boolean; /** * Show this check box on the specified page. For example: * ```js * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica) * const page = pdfDoc.addPage() * * const form = pdfDoc.getForm() * const checkBox = form.createCheckBox('some.checkBox.field') * * checkBox.addToPage(page, { * x: 50, * y: 75, * width: 25, * height: 25, * textColor: rgb(1, 0, 0), * backgroundColor: rgb(0, 1, 0), * borderColor: rgb(0, 0, 1), * borderWidth: 2, * rotate: degrees(90), * }) * ``` * This will create a new widget for this check box field. * @param page The page to which this check box widget should be added. * @param options The options to be used when adding this check box widget. */ addToPage(page: PDFPage, options?: FieldAppearanceOptions): void; /** * Returns `true` if any of this check box's widgets do not have an * appearance stream for its current state. For example: * ```js * const checkBox = form.getCheckBox('some.checkBox.field') * if (checkBox.needsAppearancesUpdate()) console.log('Needs update') * ``` * @returns Whether or not this check box needs an appearance update. */ needsAppearancesUpdate(): boolean; /** * Update the appearance streams for each of this check box's widgets using * the default appearance provider for check boxes. For example: * ```js * const checkBox = form.getCheckBox('some.checkBox.field') * checkBox.defaultUpdateAppearances() * ``` */ defaultUpdateAppearances(): void; /** * Update the appearance streams for each of this check box's widgets using * the given appearance provider. If no `provider` is passed, the default * appearance provider for check boxs will be used. For example: * ```js * const checkBox = form.getCheckBox('some.checkBox.field') * checkBox.updateAppearances((field, widget) => { * ... * return { * normal: { on: drawCheckBox(...), off: drawCheckBox(...) }, * down: { on: drawCheckBox(...), off: drawCheckBox(...) }, * } * }) * ``` * @param provider Optionally, the appearance provider to be used for * generating the contents of the appearance streams. */ updateAppearances(provider?: AppearanceProviderFor<PDFCheckBox>): void; private updateWidgetAppearance; } //# sourceMappingURL=PDFCheckBox.d.ts.map
Save
cmd:
run