dangquang1020
dangquang1020

Reputation: 516

View PDF file in fullscreen mode using PDFJS

I am using pdfjs-dist module to display pdf file in a modal popup. I can apply some features: change/ goto page, zoom, etc ...

I want to view pdf file in fullscreen or presentation mode just like the demo of pdfjs:

https://mozilla.github.io/pdf.js/web/viewer.html

I have looked into pdfjs source code but I do not know how to enter fullscreen/presentation mode.

Upvotes: 2

Views: 12623

Answers (2)

Tarek.Eladly
Tarek.Eladly

Reputation: 759

<iframe height='100%' width='100%' scrolling='no' allowfullscreen webkitallowfullscreen src='./viewer.html?file=./PDFFile.PDF'></iframe>

allowfullscreen and webkitallowfullscreen do the trick for presentation mode.

Upvotes: 5

Sagar Hirapara
Sagar Hirapara

Reputation: 1697

You can simply add page number to open pdf in full-screen in separate tab. For Example

<a href="your URL#page=2">Open yourpdf.pdf with PDF.js in new tab</a>

Upvotes: 0

Related Questions