Skip to content

html() method creates blank pages or strange spaces #2756

@mightymietz

Description

@mightymietz

When I create a pdf like this:

var pdf = new jsPDF('l', 'mm', 'a4');
var rendererDiv = document.createElement("div");
rendererDiv.textContent = "test text";
    pdf.html(rendererDiv, {
            callback: function()
            {
                //            pdf.save("test.pdf");

                window.open(pdf.output('bloburl')); // to debug
            },
        });

I get a the attached output.
49d38aa4-0f6d-4581-ae76-5ff7c8b0ad37.pdf

No matter what I put in there (ul, li, etc.) it will generate strange blank pages or paddings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions