mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 23:58:07 +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
|
@ -1209,6 +1209,24 @@ describe("api", function () {
|
|||
.catch(done.fail);
|
||||
});
|
||||
|
||||
it("gets markInfo", function (done) {
|
||||
const loadingTask = getDocument(
|
||||
buildGetDocumentParams("annotation-line.pdf")
|
||||
);
|
||||
|
||||
loadingTask.promise
|
||||
.then(function (pdfDoc) {
|
||||
return pdfDoc.getMarkInfo();
|
||||
})
|
||||
.then(function (info) {
|
||||
expect(info.Marked).toEqual(true);
|
||||
expect(info.UserProperties).toEqual(false);
|
||||
expect(info.Suspects).toEqual(false);
|
||||
done();
|
||||
})
|
||||
.catch(done.fail);
|
||||
});
|
||||
|
||||
it("gets data", function (done) {
|
||||
const promise = pdfDocument.getData();
|
||||
promise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue