Giter VIP home page Giter VIP logo

Comments (9)

sayanee avatar sayanee commented on June 13, 2024

wow! thanks - yes please send a PDF 👍

from angularjs-pdf.

RobbieTheWagner avatar RobbieTheWagner commented on June 13, 2024

I assume by PDF you mean PR? 😛

I will try to clean it up and submit something this week.

from angularjs-pdf.

sayanee avatar sayanee commented on June 13, 2024

LOL yes, please send a pull request 😝

from angularjs-pdf.

RobbieTheWagner avatar RobbieTheWagner commented on June 13, 2024

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.

ElRoberto538 avatar ElRoberto538 commented on June 13, 2024

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.

sayanee avatar sayanee commented on June 13, 2024

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.

ElRoberto538 avatar ElRoberto538 commented on June 13, 2024

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.

RobbieTheWagner avatar RobbieTheWagner commented on June 13, 2024

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.

sayanee avatar sayanee commented on June 13, 2024

@rwwagner90 - it's here: #56

thanks everyone 🌟

from angularjs-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.