Extracting pages from Document

Which product are you using?
PDF.js Express Viewer v. 8.2.1

Developer console log:
|UI version|‘8.2.0’|
|Core version|‘8.2.1’|
|WebViewer Server|false|
|Full API|false|

Detailed description of issue
Trying to extract the selected pages from my Document through the Core.Document.extractPages function mentioned in the documentation, but the promise throws undefined no matter what I do.

Expected behaviour
Expected to have the pages that I fill in the input extracted to continue working with them.

Does your issue happen with every document, or just one?
All documents

Link to document
Any document can be used - not any specific, its a general issue for all documents.

Code snippet

#1 try

const {Core} = getInstance();      
const document = Core.documentViewer.getDocument();
const pages = await document.extractPages([1]);

#2 try

const {Core} = getInstance();
const pages = await Core.document.extractPages([1]);

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hi there,

PDF.js Express does not support extracting pages or any document manipulation.

We share an API with our sister produce, PDFTron WebViewer, which is why some documentation that we don’t support exists (sometimes they slip through the cracks)

Sorry for the confusion,