Merge pull request #16242 from Snuffleupagus/rm-render-canvasFactory
[api-minor] Remove the `canvasFactory` option from `PDFPageProxy.render` (PR 16100 follow-up)
This commit is contained in:
commit
be0f6ee080
@ -1202,8 +1202,6 @@ class PDFDocumentProxy {
|
||||
* The default value is `AnnotationMode.ENABLE`.
|
||||
* @property {Array<any>} [transform] - Additional transform, applied just
|
||||
* before viewport transform.
|
||||
* @property {Object} [canvasFactory] - The factory instance that will be used
|
||||
* when creating canvases. The default value is {new DOMCanvasFactory()}.
|
||||
* @property {CanvasGradient | CanvasPattern | string} [background] - Background
|
||||
* to use for the canvas.
|
||||
* Any valid `canvas.fillStyle` can be used: a `DOMString` parsed as CSS
|
||||
@ -1408,7 +1406,6 @@ class PDFPageProxy {
|
||||
intent = "display",
|
||||
annotationMode = AnnotationMode.ENABLE,
|
||||
transform = null,
|
||||
canvasFactory = null,
|
||||
background = null,
|
||||
optionalContentConfigPromise = null,
|
||||
annotationCanvasMap = null,
|
||||
@ -1417,9 +1414,9 @@ class PDFPageProxy {
|
||||
}) {
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
|
||||
canvasFactory
|
||||
arguments[0]?.canvasFactory
|
||||
) {
|
||||
deprecated(
|
||||
throw new Error(
|
||||
"render no longer accepts the `canvasFactory`-option, " +
|
||||
"please pass it to the `getDocument`-function instead."
|
||||
);
|
||||
@ -1512,7 +1509,7 @@ class PDFPageProxy {
|
||||
annotationCanvasMap,
|
||||
operatorList: intentState.operatorList,
|
||||
pageIndex: this._pageIndex,
|
||||
canvasFactory: canvasFactory || this._transport.canvasFactory,
|
||||
canvasFactory: this._transport.canvasFactory,
|
||||
filterFactory: this._transport.filterFactory,
|
||||
useRequestAnimationFrame: !intentPrint,
|
||||
pdfBug: this._pdfBug,
|
||||
|
Loading…
x
Reference in New Issue
Block a user