Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using <br><br> in an element of type html crashes the PDF generation #326

Closed
JauresC opened this issue Jul 22, 2024 · 1 comment
Closed
Assignees
Labels
user issue An issue or bug reported by users.

Comments

@JauresC
Copy link

JauresC commented Jul 22, 2024

When i use multiple <br><br> in an element of type HTML, the generation of the PDF will fail.

Here's a simple exemple showing the bug :
https://plnkr.co/edit/HDXSf31SNTLwsCCn

@JauresC JauresC changed the title Using <br><br> in an html question crashes the PDF generation Using <br><br> in an element of type html crashes the PDF generation Jul 22, 2024
@JaneSjs JaneSjs self-assigned this Aug 12, 2024
@JaneSjs
Copy link
Contributor

JaneSjs commented Aug 12, 2024

Hello @JauresC,
It's a known issue caused by the way the jsPDF library processes a duplicated <br> tag. Unfortunately, </br></br> tags are not supported by the jsPDF's from_html method. Please either remove an extra <br> tag or use the image HTML rendering option (htmlRenderAs: "image").

@JaneSjs JaneSjs closed this as completed Aug 12, 2024
@JaneSjs JaneSjs added the user issue An issue or bug reported by users. label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user issue An issue or bug reported by users.
Projects
None yet
Development

No branches or pull requests

2 participants