Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
HTML2PDF not possible load chart.googleapis.com qr code?

When I use html2pdf() function to download in PDF format, in that image is not displaying rendering from link. Below mentioned link used, it leaves blank space in PDF. Not displaying any image in PDF.


"https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=http://hellovcard.com/6160175f9b7f3&choe=UTF-8&chof=gif"

<img src="https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=http://hellovcard.com/6160175f9b7f3&choe=UTF-8&chof=gif" alt="qr code">

Code I have used:

 function saveAsPDF() {
            var element = document.getElementById('printableArea');
            var opt = {
                margin: 0.3,
                filename: 'download.pdf',
                image: {type: 'jpeg', quality: 1},
                html2canvas: {scale: 4, dpi: 72, letterRendering: true},
                jsPDF: {unit: 'in', format: 'A2'},
                html2canvas: {
                    onclone: (element) => {
                        const svgElements = Array.from(element.querySelectorAll('svg'));
                        svgElements.forEach(s => {
                            const bBox = s.getBBox();
                            s.setAttribute("x", bBox.x);
                            s.setAttribute("y", bBox.y);
                            s.setAttribute("width", bBox.width);
                            s.setAttribute("height", bBox.height);
                      })
                }
                },
            };
            html2pdf().set(opt).from(element).save();

        }

enter image description here

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!