Comments (9)
wow! thanks - yes please send a PDF 👍
from angularjs-pdf.
I assume by PDF you mean PR? 😛
I will try to clean it up and submit something this week.
from angularjs-pdf.
LOL yes, please send a pull request 😝
from angularjs-pdf.
I actually looked at my retina support commit, and it might be good as is. I submitted a PR. Please let me know your thoughts and I'll be glad to make any necessary changes.
from angularjs-pdf.
Hi guys, I have noticed that this PR results in a blurry canvas due to the dimensions being set to decimal values e.g. 1024.3456. When both the canvas dimensions and the style dimensions are set to this value the canvas dimensions appear to be truncated but the style dimensions will stay as a number containing decimals and so they won't match - this results in blurring (tested on 1080p monitor in Chrome and Firefox).
I have patched this locally by changing the following lines within the new setCanvasDimensions()
method:
canvas.style.width = w + 'px';
canvas.style.height = h + 'px';
to:
canvas.style.width = Math.floor(w) + 'px';
canvas.style.height = Math.floor(h) + 'px';
With this patch the canvas appears normally - note I haven't tested on a retina screen as I don't have one with me at the moment.
from angularjs-pdf.
Thanks @ElRoberto538! Could you send us a pull request to the changes in this file example/js/directives/angular-pdf.js
? Also do you have a sample pdf page?
I have a retina screen that I can test on.
from angularjs-pdf.
No problem, I will create a pull request later today - I will also find a suitable sample PDF to demonstrate the fix.
from angularjs-pdf.
Good catch @ElRoberto538. I have a retina screen, I'd be glad to check it out. Let me know when a PR is up.
from angularjs-pdf.
@rwwagner90 - it's here: #56
thanks everyone 🌟
from angularjs-pdf.
Related Issues (20)
- How can i use image data instead of URL, how i need show in pdf viewer? HOT 11
- pageCount is not getting refresh when i open second pdf. HOT 5
- pdf viewer is not loading pdf file in case of all librbaries bundles into one lib.js HOT 1
- multiple pdf in same page HOT 1
- Canvas Id HOT 3
- How to enable caching? HOT 2
- control toolbar on directive HOT 3
- show all individual pages just beside viewer in tiny size HOT 1
- resize of canvas not working, width and height styles will be overwritten by angular-pdf code HOT 1
- Show all the pages HOT 1
- Zoom Issue HOT 1
- Zoom level 0%
- Prod question HOT 2
- can we add/delete specific pdf page? HOT 1
- IE issue - No PDFJS.workerSrc specified HOT 1
- rendering all page when loaded
- Browser zoom 80% causes PDF background not to be complete HOT 1
- how to use dynamic template-url HOT 2
- Is this compatible with angular js 1.3 version? HOT 2
- Showing all pdf pages simultaneously HOT 1
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 angularjs-pdf.