mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Merge pull request #19289 from Snuffleupagus/issue-19281
Skip LinkAnnotations when collecting field objects (issue 19281)
This commit is contained in:
commit
4d4e1befeb
4 changed files with 37 additions and 3 deletions
1
test/pdfs/issue19281.pdf.link
Normal file
1
test/pdfs/issue19281.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://github.com/user-attachments/files/18304780/Antarctica-Grid.pdf
|
|
@ -11239,5 +11239,13 @@
|
|||
"link": true,
|
||||
"disableFontFace": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "issue19281",
|
||||
"file": "pdfs/issue19281.pdf",
|
||||
"md5": "c5db558965e4189cc6db2720cdaa3e55",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"type": "other"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1713,6 +1713,20 @@ describe("api", function () {
|
|||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("gets fieldObjects and skipping LinkAnnotations", async function () {
|
||||
if (isNodeJS) {
|
||||
pending("Linked test-cases are not supported in Node.js.");
|
||||
}
|
||||
|
||||
const loadingTask = getDocument(buildGetDocumentParams("issue19281.pdf"));
|
||||
const pdfDoc = await loadingTask.promise;
|
||||
const fieldObjects = await pdfDoc.getFieldObjects();
|
||||
|
||||
expect(fieldObjects).toEqual(null);
|
||||
|
||||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("gets non-existent calculationOrder", async function () {
|
||||
const calculationOrder = await pdfDocument.getCalculationOrderIds();
|
||||
expect(calculationOrder).toEqual(null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue