1
0
Fork 0
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:
Tim van der Meij 2020-10-31 00:05:19 +01:00 committed by GitHub
commit e341e6e542
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 116 additions and 0 deletions

View file

@ -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