如何自定义PrimeFaces DocumentViewer工具栏?
我正在使用PrimeFaces documentViewer,该documentViewer基于 mozilla pdf.js:2.11.338
https://www.primefaces.org/showcase-ext/ext/views/documentviewer.jsf
,我想自定义查看器以控制哪些按钮出现在工具栏中,例如rotate rotate&amp&amp&印刷&仅下载。
我在PrimeFaces网站上找不到有关该指南的指南。
I am using primefaces documentViewer which is based on mozilla PDF.js: 2.11.338
https://www.primefaces.org/showcase-ext/views/documentViewer.jsf
and I want to customize the viewer to control which buttons to appear in the toolbar like rotate & print & download only.
I couldn't find any guides about that in primefaces website.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有用于文档查看器的JS小部件,但是使用这样的JS函数可以轻松完成。
注意:一些按钮(例如
presentationMode
)是特殊的,需要稍有不同的隐藏方式。然后,在您的页面上,将此代码添加到页面加载后基本上隐藏按钮。
There is no JS Widget for Document Viewer however this can be accomplished easily with a JS function like this.
Note: Some buttons like
presentationMode
are special and need to be hidden a little differently.Then on your page add this code to basically hide the buttons after the page loads.