mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 23:58:07 +02:00
JS - Add a function in api to get the fields ids in AcroForm::CO
This commit is contained in:
parent
ff2631493e
commit
c30a3a94f0
4 changed files with 48 additions and 0 deletions
|
@ -159,5 +159,20 @@ describe("document", function () {
|
|||
hasFields: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("should get calculation order array or null", function () {
|
||||
const acroForm = new Dict();
|
||||
|
||||
let pdfDocument = getDocument(acroForm);
|
||||
expect(pdfDocument.calculationOrderIds).toEqual(null);
|
||||
|
||||
acroForm.set("CO", [Ref.get(1, 0), Ref.get(2, 0), Ref.get(3, 0)]);
|
||||
pdfDocument = getDocument(acroForm);
|
||||
expect(pdfDocument.calculationOrderIds).toEqual(["1R", "2R", "3R"]);
|
||||
|
||||
acroForm.set("CO", []);
|
||||
pdfDocument = getDocument(acroForm);
|
||||
expect(pdfDocument.calculationOrderIds).toEqual(null);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue