question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The jsPDF html module generates a blank page when the browser has Grammarly extension

See original GitHub issue

I am using jsPdf v2.5.0 to create pdf from html. use doc.html() method. doc.html(html).then(value => { doc.save(sample.pdf); });

I got the issue when i turn on the grammarly extension in chrome. the downloaded file is blank. if i turn it off. the download file works.

Can you please take a look at this issue.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
MarinaFernandescommented, Feb 11, 2022

I have the same problem in my project and it reflects on our users who are also using the Grammarly extension. We are using .html and 2.4.0 jspdf version.

0reactions
kakugikicommented, Apr 23, 2022

Hmm, it seems working fine to me. Chrome is up to date, Version 100.0.4896.127 (Official Build) (64-bit); Grammarly for Chrome 14.1057.0. I tried both regular and incognito modes, and I am using Grammarly to enter this comment. 😃 Both open and save worked.

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"
        integrity="sha512-BNaRQnYJYiPSqHHDb58B0yaPfCu+Wgds8Gp/gU33kqBtgNS4tSPHuGibyoeqMV/TJlSKda6FXzoEyYGjTe+vXA=="
        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    
    <script>
        window.jsPDF = window.jspdf.jsPDF;
        function download() {
            let pdf = new jsPDF('p', 'pt', 'a4');
    
            pdf.html(document.getElementById('toPDF'), {
                callback: function (pdf) {
                    window.open(pdf.output('bloburl'));
                }
            });
        }
    </script>
Read more comments on GitHub >

github_iconTop Results From Across the Web

JSPDF .html() function returning blank pdf page - Stack Overflow
After trying whole day came with following solution. I think we are getting blank page because of versions of html2canvas.
Read more >
Component generates PDF-file with one blank page. What's ...
I've got an issue with the PDF Generator (jsPDF) component, not with the PDF Viewer component. And i'm using the component in a...
Read more >
index2.idx - UNPKG
<::tags::> http://cssnano.co <::sif::> cssnano: A modular minifier based on ... http://davidwalsh.name/document-readystate <::sif::> Detect if a Page Has ...
Read more >
all documented artifacts — cljdoc
blank -angular-website/lein-template 0.1.0-SNAPSHOT ... clj-html-compressorGroup ID ... com.github.steffan-westcott/clj-otel-extension-aws 0.1.5.
Read more >
jsPDF blank page bug with compress: true - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found