最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - View PDF file in fullscreen mode using PDFJS - Stack Overflow

programmeradmin0浏览0评论

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:

.js/web/viewer.html

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

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.

Share Improve this question asked May 6, 2016 at 3:10 dangquang1020dangquang1020 5163 gold badges8 silver badges24 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5
<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.

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>
发布评论

评论列表(0)

  1. 暂无评论