From 64aa28953d5d5cdf118d8df5f15646f5164a9367 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 30 Jun 2023 09:21:45 +0200 Subject: [PATCH] Fully remove the `canvasFactory` option from `PDFPageProxy.render` (PR 16242 follow-up) We've now been throwing an Error in *three* releases if the `canvasFactory` option is provided, hence it ought to be fine to stop doing that and simply ignore the option instead. --- src/display/api.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/display/api.js b/src/display/api.js index 002e164df..4d627dc0e 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -1424,16 +1424,6 @@ class PDFPageProxy { pageColors = null, printAnnotationStorage = null, }) { - if ( - (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) && - arguments[0]?.canvasFactory - ) { - throw new Error( - "render no longer accepts the `canvasFactory`-option, " + - "please pass it to the `getDocument`-function instead." - ); - } - this._stats?.time("Overall"); const intentArgs = this._transport.getRenderingIntent(