alihassan143 / htmltopdfwidgets

Html To Pdf
https://pub.dev/packages/htmltopdfwidgets
Apache License 2.0
12 stars 18 forks source link

Can't manage to render colors #18

Closed Rodsevich closed 8 months ago

Rodsevich commented 10 months ago

Hi! I am not able to render any color on the PDF: HTML:

<span id="rojo" style="color: #F00;">rojo</span>
<span style="color: green;">verde</span>
<span class="azul" style="color: rgba(0, 0, 255, 255);">azul</span>
<b>bold</b>
<i>italica</i>

Code:

final widgets = await HTMLToPdf().convert(
    rendered,
    tagStyle: HtmlTagStyle(
      italicStyle: TextStyle(
        fontStyle: FontStyle.italic,
        color: PdfColors.pink,
        fontSize: 80,
      ),
    ),
);

Final output: image

alihassan143 commented 8 months ago

Screenshot 2024-01-06 at 3 56 49 PM issue fixed only rba and hex color currently supported