Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序中有 pdf 文件。我需要在浏览器中显示 pdf。并且还需要为该页面提供打印选项以打印在servlet中如何可能。我正在生成pdf但如何为生成的pdf提供打印选项
我认为javascript应该帮助你。
javascript
利用window.print()
window.print()
参考:http ://www.w3schools.com/jsref/met_win_print.asp
我有两个带有路径的文件:
/reader.php /ebook/titlepage.xhtml
我计划让读者最终阅读电子书 toc.ncx 并能够将其显示在左侧窗格中以便于导航。但是现在,我要做的就是解决显示 xhtml 文件的问题。
电子书标题页的开头如下