Jspdf: HTML Content not scale to the A4 size. Content smaller than browser view.

Created on 20 Oct 2017  路  5Comments  路  Source: MrRio/jsPDF

When button onclick run the export_form() function, what I miss up? The content is not as like in the browser view. It's smaller from my browser.

untitled

function export_form(){
    console.log('export');

    var pdf = new jsPDF("p", "pt", "a4");
    pdf.addHTML($('#container_section'), 15, 15, function() {
        console.log('export');
      pdf.save('web.pdf');
    });
}

Most helpful comment

use particular size of a4 shit
var pdf = new jsPDF('l','mm',[297, 210]);

It will work

Sheet * not shit ;)

All 5 comments

Do you need help in webdesign?
SCNR.

May I know what is the problem?

The browserview is depending on your css etc.. So if your html-code or css is faulty, what do you expect you get in the pdf?

use particular size of a4 shit
var pdf = new jsPDF('l','mm',[297, 210]);

It will work

use particular size of a4 shit
var pdf = new jsPDF('l','mm',[297, 210]);

It will work

Sheet * not shit ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andmaltes picture andmaltes  路  4Comments

baluMallisetty picture baluMallisetty  路  4Comments

palmoni picture palmoni  路  4Comments

sayo96 picture sayo96  路  3Comments

mellisa0109 picture mellisa0109  路  3Comments