Comments (12)
We have added the following script you mentioned regarding bootstrap in style.scss but did not work in a blank project.
@media screen {
@import './../node_modules/bootstrap/scss/bootstrap';
}
´´´
from ngx-extended-pdf-viewer.
"Blank project" meaning a demo project using both Bootstrap and ngx-extended-pdf-viewer, I assume? Can you share the project with me, so I can have a look myself?
from ngx-extended-pdf-viewer.
At the moment I can't recall the details, and I don't have access to my old source code. What I recall from memory is that somewhere in the Bootstrap library, there's a statement reducing the font size. Or the general zoom level. As a result, everything is rendered a little smaller. You won't mind on a web page, but you'll notice immediately when printing a page.
To solve the problem, you have to find the CSS statement downscaling everything.
That proved to be a bit tedious, so I simply deactivated Bootstrap when printing a page. That's what the @media screen
query does. It imports Bootstrap if and only if you're viewing the page on a screen.
Alternatively, you can add a media query acting as a counter-poison like so:
@media print {
font-size: 133%;
}
Does this help you? If so, please report back so I know when I can close the ticket.
Thanks in advance,
Stephan
from ngx-extended-pdf-viewer.
from ngx-extended-pdf-viewer.
I believe I've managed to reproduce your bug. However, it looks more like a 85% reduction (or rather, a reduction by 15% :) ). Does it look similar to my screenshot on your machine?
from ngx-extended-pdf-viewer.
from ngx-extended-pdf-viewer.
Oops - it turned out to be simple. I guess I should improve my documentation. :)
Adding the media query to the global styles.css
replaces the import in the Angular.json
file:
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.css", <<< remove this line!
"src/styles.scss"
],
from ngx-extended-pdf-viewer.
improved documentation published with version 0.9.17 just a minute ago
from ngx-extended-pdf-viewer.
the suggested solution:
@media screen {
@import './../node_modules/bootstrap/scss/bootstrap';
}
is causing an scss error:
You may not @extend selectors across media queries.
Is there a workaround for this?
from ngx-extended-pdf-viewer.
Instead of this
@media screen {
@import './../node_modules/bootstrap/scss/bootstrap';
}
You can use this
@media print {
body {
min-width: auto !important;
}
}
from ngx-extended-pdf-viewer.
Whow, is it really that simple? I've added it to the documentation. Thanks for the hint!
Best regards,
Stephan
from ngx-extended-pdf-viewer.
I've went over the print CSS again. When you update to version 9.0.0, I don't know what happens to your bugfix. I hope you won't need it, but I can't predict this.
from ngx-extended-pdf-viewer.
Related Issues (20)
- Error Loading PDF Viewer on Azure App Service HOT 8
- The maxZoom and minZoom does not work if i set the values to "page-fit". It works fine with decimal values HOT 2
- Work around the strict checks of the AppOptions in pdf.js 4.5 HOT 1
- Arrow keys should only trigger pagination if the focus is in the PDF viewer HOT 1
- Deactivate the zoom buttons when reaching the maximum/minimum zoom level
- Zooming with CTRL+wheel is reported to be unstable HOT 2
- Fix responsive design HOT 2
- Update to canvas-size 2.0 and improve the calculation of the maximum canvas size HOT 1
- [enableDragAndDrop] is broken HOT 1
- showTextEditor showDrawEditor how to revert changes before save? HOT 1
- Support for Angular 18 HOT 1
- Form Field Calculation Triggering Unexpectedly in ngx-extended-pdf-viewer HOT 1
- PDF Viewer loaded in web but not loaded in Windows HOT 3
- Printing is broken in version 21.0.0 (light mode only) HOT 1
- Turn off the auto jump-to-page when a phrase is found HOT 8
- The button class changes all buttons default padding, top and bottom in the project HOT 2
- Missing icon: assets/images/annotation-paperclip.svg HOT 6
- Search for word/phrase in TextLayer and return the relevant HTMLSpanElements HOT 2
- PDF Search Results based on words HOT 1
- Leaking styles break app-layout HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-extended-pdf-viewer.