Skip to content

Generated PDF always cut the last line in the middle #753

@rodgramos

Description

@rodgramos

Hi, i'm trying to generate a PDF but the last line of text is always cut, I tried to generate a simple string just to see if the issue was the html itself but it seems to be a deeper issue

Image

my code is the following:
var opt = {
margin: [10,10,10,10],
filename: 'myfile.pdf',
html2canvas: { scale: 2 },
jsPDF: { unit: 'mm', format: 'A4', orientation: 'portrait' },
pagebreak: { mode: ["avoid-all", "css", "legacy"] }
};
html2pdf().set(opt).from("test", 'string' ).save();

Currently im at version 0.10.3 but I tried a few different versions and a few different options and had the same issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions