Aymkdn / html-to-pdfmake

This module permits to convert HTML to the PDFMake format
https://aymkdn.github.io/html-to-pdfmake/index.html
MIT License
545 stars 88 forks source link

lineHeight property handling #201

Closed lcgiry closed 8 months ago

lcgiry commented 8 months ago

Hello,

First of all, thank you for your very helpful work.

I noticed that pdfmake offers a lineHeight style property. Are you planning to handle it as well by any chance?

Thanks

Aymkdn commented 8 months ago

Maybe. I need to investigate how I can convert the CSS values to a value that would render similar with PDFMake.

Aymkdn commented 8 months ago

I think I'll restrict it to a number (unitless) only. It seems to be the preferred way to do it based on MDN.

Then a line-height:normal will be ignored, but any other number will be just passed to lineHeight in PDFMake.

Aymkdn commented 8 months ago

Actually, I went through my code, and lineHeight is already supported :-)

lcgiry commented 8 months ago

Oh great thanks.

I don't think I saw it in your npmjs documentation but never mind, I'll try it !

Aymkdn commented 8 months ago

Indeed, it was missing on the README page. I've just added it (but it will only be visible on the NPM page when I'll publish a new version).