我嘗試制作一個僅顯示嵌入式 PDF 的非常簡單的網站。PDF 查看器的大小應與瀏覽器視窗相同。但是,我未能顯示完整的 PDF 高度:
<!DOCTYPE html>
<html height="100vh" margin="0">
<body height="100vh" margin="0">
<embed src="http://infolab.stanford.edu/pub/papers/google.pdf#toolbar=0&navpanes=0&scrollbar=0" width="100%" height="100vh"
type="application/pdf">
</body>
</html>
在我嘗試過的不同瀏覽器(Safari、Chrome、Firefox - 都在 macOS Ventura 上)中,輸出看起來像這樣:
將滾動條設定為 zer0 通常會被忽略,工具列和側窗格的設定大致相同,它們會在用戶界面需要時出現。
<!DOCTYPE html><head><style>
html, body, embed, iframe, object { margin: 0!important; border: 0; width: 99vw; height: 97vh; }
</style></head><body><center>
<embed src="http://infolab.stanford.edu/pub/papers/google.pdf#toolbar=0&navpanes=0" type="application/pdf" />
</center></body></html>

瀏覽器的剖析是一個用戶界面,他們可以完全控制

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/529991.html
標籤:htmlpdf嵌入
上一篇:將資料從一個表拆分到另一個表
