MCPcopy Create free account
hub / github.com/LibPDF-js/core / setFlag

Method setFlag

src/annotations/base.ts:202–213  ·  view source on GitHub ↗

* Set or clear a specific flag.

(flag: AnnotationFlags, value: boolean)

Source from the content-addressed store, hash-verified

200 * Set or clear a specific flag.
201 */
202 setFlag(flag: AnnotationFlags, value: boolean): void {
203 let flags = this.flags;
204
205 if (value) {
206 flags |= flag;
207 } else {
208 flags &= ~flag;
209 }
210
211 this.dict.set("F", PdfNumber.of(flags));
212 this.markModified();
213 }
214
215 /**
216 * Whether the annotation is hidden.

Callers 2

setHiddenMethod · 0.95
setPrintableMethod · 0.95

Calls 3

markModifiedMethod · 0.95
setMethod · 0.45
ofMethod · 0.45

Tested by

no test coverage detected