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

PDFmake does not support the rgba format, so black text displayed as a blue text #221

Closed
fahmi-nugroho opened this issue Jul 15, 2024 · 3 comments

Comments

@fahmi-nugroho
Copy link

Provide the HTML code
<ul><li><span style=\"background-color:rgb(255,255,255);color:rgba(0,0,0,0.87);\">Sampel AGD curiga darah vena, jika tidak sesuai klinis mohon sampel ulang.</span></li></ul>

Describe the bug
Result:
[ { "nodeName": "UL", "marginBottom": 5, "marginLeft": 5, "style": [ "html-ul" ], "ul": [ { "text": [ { "text": "Sampel AGD curiga darah vena, jika tidak sesuai klinis mohon sampel ulang.", "nodeName": "SPAN", "background": "#ffffff", "color": "rgba(0,0,0,0.87)", "style": [ "html-span", "html-li", "html-ul" ] } ], "nodeName": "LI", "style": [ "html-li", "html-ul" ] } ] } ]
image

@Aymkdn
Copy link
Owner

Aymkdn commented Jul 15, 2024

This is odd. The rgba is supported... I'll check later.

@Aymkdn
Copy link
Owner

Aymkdn commented Jul 16, 2024

The code was correctly providing the hexadecimal reference to PDFMake, but it looks like PDFMake doesn't support RGBA.

I made changes: the rgba value will be converted to a rgb color + the opacity of the text. It should work this way.

The v2.5.12 has just been released with the patch.

@Aymkdn Aymkdn closed this as completed Jul 16, 2024
@fahmi-nugroho
Copy link
Author

thank you, for the update

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