1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 09:08:07 +02:00

[api-minor] Stop using the beginAnnotations/endAnnotations operators (PR 14998 follow-up)

After the changes in PR 14998, these operators are now no-ops in the `src/display/canvas.js` code and should no longer be necessary.
Given that `beginAnnotations`/`endAnnotations` are not in the PDF specification, but are rather *custom* PDF.js operators, it seems reasonable to stop using them now that they've become no-ops.
This commit is contained in:
Jonas Jenwald 2022-06-11 14:05:25 +02:00
parent b5fb6cdb96
commit bbf857d635
4 changed files with 6 additions and 11 deletions

View file

@ -2443,15 +2443,15 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
const opListAnnotEnable = await pdfPage.getOperatorList({
annotationMode: AnnotationMode.ENABLE,
});
expect(opListAnnotEnable.fnArray.length).toBeGreaterThan(150);
expect(opListAnnotEnable.argsArray.length).toBeGreaterThan(150);
expect(opListAnnotEnable.fnArray.length).toBeGreaterThan(140);
expect(opListAnnotEnable.argsArray.length).toBeGreaterThan(140);
expect(opListAnnotEnable.lastChunk).toEqual(true);
const opListAnnotEnableForms = await pdfPage.getOperatorList({
annotationMode: AnnotationMode.ENABLE_FORMS,
});
expect(opListAnnotEnableForms.fnArray.length).toBeGreaterThan(40);
expect(opListAnnotEnableForms.argsArray.length).toBeGreaterThan(40);
expect(opListAnnotEnableForms.fnArray.length).toBeGreaterThan(30);
expect(opListAnnotEnableForms.argsArray.length).toBeGreaterThan(30);
expect(opListAnnotEnableForms.lastChunk).toEqual(true);
const opListAnnotEnableStorage = await pdfPage.getOperatorList({