mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Merge pull request #12525 from brendandahl/mark-info
[api-minor] Implement API to get MarkInfo from the catalog.
This commit is contained in:
commit
e341e6e542
5 changed files with 116 additions and 0 deletions
|
@ -805,6 +805,23 @@ class PDFDocumentProxy {
|
|||
return this._transport.getMetadata();
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {Object} MarkInfo
|
||||
* Properties correspond to Table 321 of the PDF 32000-1:2008 spec.
|
||||
* @property {boolean} Marked
|
||||
* @property {boolean} UserProperties
|
||||
* @property {boolean} Suspects
|
||||
*/
|
||||
|
||||
/**
|
||||
* @returns {Promise<MarkInfo | null>} A promise that is resolved with
|
||||
* a {MarkInfo} object that contains the MarkInfo flags for the PDF
|
||||
* document, or `null` when no MarkInfo values are present in the PDF file.
|
||||
*/
|
||||
getMarkInfo() {
|
||||
return this._transport.getMarkInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<TypedArray>} A promise that is resolved with a
|
||||
* {TypedArray} that has the raw data from the PDF.
|
||||
|
@ -2639,6 +2656,10 @@ class WorkerTransport {
|
|||
});
|
||||
}
|
||||
|
||||
getMarkInfo() {
|
||||
return this.messageHandler.sendWithPromise("GetMarkInfo", null);
|
||||
}
|
||||
|
||||
getStats() {
|
||||
return this.messageHandler.sendWithPromise("GetStats", null);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue