Fix printing behaviour in Chrome
Two major issues:
1. Border/shadow around every page. Removed by adding "border:none".
2. Added "overflow:visible" (overrides "overflow:auto") in #viewContainer.
This solves two problems:
- It prevents scrollbars from appearing.
- Every "page" is automatically resized to fit on a printed page,
just like the Firefox.
To see what's wrong, here's a picture of how PDF.js rendered the pdf in
Chrome (using "Print to PDF" feature of Chrome):
https://robwu.nl/pdfjs/pdfjs-print-with-chromium-28.pdf
Successfully tested with Chrome 28 and Firefox 22.
Solves #3445
This commit is contained in:
parent
6c6719efeb
commit
066dffde3c
@ -1332,6 +1332,9 @@ canvas {
|
||||
#sidebarContainer, .toolbar, #loadingBox, #errorWrapper, .textLayer {
|
||||
display: none;
|
||||
}
|
||||
#viewerContainer {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#mainContainer, #viewerContainer, .page, .page canvas {
|
||||
position: static;
|
||||
@ -1342,6 +1345,7 @@ canvas {
|
||||
.page {
|
||||
float: left;
|
||||
display: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user