简体   繁体   English

使用PDFJS以全屏模式查看PDF文件

[英]View PDF file in fullscreen mode using PDFJS

I am using pdfjs-dist module to display pdf file in a modal popup. 我正在使用pdfjs-dist模块在模态弹出窗口中显示pdf文件。 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: 我想以全屏或演示模式查看pdf文件,就像pdfjs的演示一样:

https://mozilla.github.io/pdf.js/web/viewer.html 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. 我查看了pdfjs源代码,但我不知道如何进入全屏/演示模式。

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

allowfullscreenwebkitallowfullscreen为演示模式做了一些技巧。

You can simply add page number to open pdf in full-screen in separate tab. 您只需添加页码即可在单独的选项卡中全屏打开pdf。 For Example 例如

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM