Using UI.printInBackground produces extra blank page in print preview

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version
8.7

Detailed description of issue
When rendering the pdf in the viewer, all pages are correct (without a blank page at the end). When utilizing the instance.UI.printInBackground function, the print preview in Chrome (latest version) shows the document plus a blank page added to the end. It will also print that page if it goes unnoticed.

Expected behaviour
Document rendered to the viewer and in the print preview should have the same number of pages and not have a blank page added to the end.

Does your issue happen with every document, or just one?
Happens on all documents

Link to document
Not possible at the moment.

Code snippet
UI.setHeaderItems(header => {
header.push({
type: ‘actionButton’,
img: ‘icon-header-print-line’,
onClick: () => {
printCurrentDocument();
}
});
});

function printCurrentDocument() {
instance.UI.printInBackground({
includeComments: false,
includeAnnotations: false,
maintainPageOrientation: true
});
}

For a better description:

This happens when using Chrome and Brave.

This does not happen when using Edge or Firefox.

Hi @goetzcj,

We are currently working on this and will let you know when it is fixed.

Best Regards,
Zach Serviss
Platform Support Engineer
PDFTron Systems, Inc.