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

Method getPopup

src/annotations/markup.ts:122–146  ·  view source on GitHub ↗

* Get the associated popup annotation, if any.

()

Source from the content-addressed store, hash-verified

120 * Get the associated popup annotation, if any.
121 */
122 getPopup(): PDFPopupAnnotation | null {
123 if (this._popup !== undefined) {
124 return this._popup;
125 }
126
127 const popupRef = this.popupRef;
128
129 if (!popupRef) {
130 this._popup = null;
131
132 return null;
133 }
134
135 const popupDict = this.registry.resolve(popupRef);
136
137 if (popupDict instanceof PdfDict) {
138 this._popup = new PDFPopupAnnotation(popupDict, popupRef, this.registry);
139
140 return this._popup;
141 }
142
143 this._popup = null;
144
145 return null;
146 }
147
148 /**
149 * Create a popup annotation associated with this annotation.

Callers

nothing calls this directly

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected