1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-21 23:58:07 +02:00

[api-minor] Implement API to get MarkInfo from the catalog.

This commit is contained in:
Brendan Dahl 2020-10-23 16:30:36 -07:00
parent 8cf27494b3
commit f5c821e9c3
4 changed files with 84 additions and 0 deletions

View file

@ -1192,6 +1192,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) {
var promise = pdfDocument.getData();
promise