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.

html2canvas.js:373 Invalid value given for Length: "auto"

See original GitHub issue

Error: html2canvas.js:373 Invalid value given for Length: "auto" and Error2: localhost:8080/#!/Reports:1 Uncaught (in promise) invalid image, images dictionary should contain dataURL entries (or local file paths in node.js)

my controller contains

  $scope.export = function() {
        html2canvas(document.getElementById('balanceSheet')).then(function (canvas) {
            document.body.appendChild(canvas);
            var data = canvas.toDataURL();
            var docDefinition = {
                content: [{
                    image: data,
                    width: 500,
                }]
            };
            pdfMake.createPdf(docDefinition).download("test.pdf");
        });
    }

I already imported pdfmake.min.js and html2canvas.js

any help here?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:16

github_iconTop GitHub Comments

2reactions
berooneycommented, May 2, 2018

i also see the error 😦

0reactions
TingNLPcommented, Apr 11, 2022

Is there a complete solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'ownerDocument' of null at html2canvas ...
Saurabh Agrawal's answer is for the error html2canvas.js:373 Invalid value given for Length: "auto". that it should be ng-show not ng-if.
Read more >
Cannot read property 'ownerDocument' of null at html2canvas ...
html2canvas.js:373 Invalid value given for Length: "auto" :8080/#!/Reports:1 Uncaught (in promise) invalid image, images dictionary should contain dataURL ...
Read more >
A brand new website interface for an even better experience!
html2canvas.js:373 Invalid value given for Length: "auto"
Read more >
Options - html2canvas
Name Default Description logging true Enable logging for debug purposes width Element width The width of the canvas height Element height The height of the canvas...
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