Skip to content

Commit

Permalink
Slightly extend the "creates pdf doc from PDF file with bad XRef tabl…
Browse files Browse the repository at this point in the history
…e" unit-test (PR 14304 follow-up)

Given that we're able to "render" this document, let's extend the unit-test to actually check that we're able to obtain the operatorList; although given the overall issues in the document it'll be empty.
  • Loading branch information
Snuffleupagus committed Nov 29, 2021
1 parent 53bc6a0 commit cf0c32b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/api_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,14 @@ describe("api", function () {
const pdfDocument = await loadingTask.promise;
expect(pdfDocument.numPages).toEqual(1);

const page = await pdfDocument.getPage(1);
expect(page instanceof PDFPageProxy).toEqual(true);

const opList = await page.getOperatorList();
expect(opList.fnArray.length).toEqual(0);
expect(opList.argsArray.length).toEqual(0);
expect(opList.lastChunk).toEqual(true);

await loadingTask.destroy();
});

Expand Down

0 comments on commit cf0c32b

Please sign in to comment.