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

Uncaught Error: unsupported number: NaN when converting html with font-size:medium #235

Closed
Zkamoth opened this issue Jan 4, 2025 · 1 comment

Comments

@Zkamoth
Copy link

Zkamoth commented Jan 4, 2025

This error raise when I try to convert HTML like this one:

<div>
	<p style="text-align:center"><span><span style="font-size:medium"><strong>TEXTO DE PRUEBA</strong></span></span></p>
</div>

PDFMake throws an error Uncaught Error: unsupported number: NaN because the component translate style="font-size:medium" to "fontSize":"medium" and PDFMake waits for a number.

@Zkamoth Zkamoth changed the title Uncaught Error: unsupported number: NaN when converting html width font-size:medium Uncaught Error: unsupported number: NaN when converting html with font-size:medium Jan 4, 2025
@Aymkdn
Copy link
Owner

Aymkdn commented Jan 5, 2025

Indeed, medium is not a supported keyword. Please, use a number instead (like 14px)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants