Showing results for 
Search instead for 
Do you mean 
New Contributor
Posts: 3
Accepted Solution

Preview first 2 pages

I wanted to check if there is any API which I can use to display first 2 or 3 pages of document uploaded on box? it can be PDF or word or PPT. so originally it can have 10 pages but in preview i want to show first 2 or  pages only

Accepted by Howard (Community Manager)
Box Employee
Posts: 18

Re: Preview first 2 pages

This isn't supported at the moment. If you're using the Preview component (, you can fork the code and modify behavior yourself by adding something like:


Object.defineProperty(doc, 'numPages', { value: Math.min(doc.numPages, 2) });