Skip to content

Commit b7d71eb

Browse files
committed
Don't throw when printing with pdfBug enabled
It fixes #20847.
1 parent 394727a commit b7d71eb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/display/api.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,8 +1540,11 @@ class PDFPageProxy {
15401540
this._pdfBug && globalThis.StepperManager?.enabled
15411541
);
15421542
const shouldRecordOperations =
1543-
!this.recordedBBoxes && (recordOperations || recordForDebugger);
1544-
const shouldRecordImages = !this.imageCoordinates && recordImages;
1543+
!!canvas &&
1544+
!this.recordedBBoxes &&
1545+
(recordOperations || recordForDebugger);
1546+
const shouldRecordImages =
1547+
!!canvas && !this.imageCoordinates && recordImages;
15451548

15461549
const complete = error => {
15471550
intentState.renderTasks.delete(internalRenderTask);

0 commit comments

Comments
 (0)