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

Text from some nested html elements is not visible when background-color is specified #3306

Open
bangiev opened this issue Oct 28, 2021 · 2 comments
Labels

Comments

@bangiev
Copy link

bangiev commented Oct 28, 2021

I have read and understood the contribution guidelines.

When a pdf file is generated via the html method in certain setups (with nested html elements and background-color styling specified), some part of text is not visible. You can still select the text in the pdf file, however it seems that the text has the same color as its background which makes it impossible to see.

Since this is a bit difficult to reproduce, here is a jsfiddle example that generates a file and has the described issue:
https://jsfiddle.net/bangiev/w7t6d9v2/

Example screenshot:
image

This might be related to an issue with html2canvas as I observed such results when directly using html2canvas. This is the reported issue in html2canvas:
niklasvh/html2canvas#2739

@HackbrettXXX
Copy link
Collaborator

Thanks for the bug report. So I think this has to be fixed on html2canvas side, right?

@bangiev
Copy link
Author

bangiev commented Nov 3, 2021

Yes, this was my conclusion after doing some debugging - it requires a fix on html2canvas side.

I opened an issue here because I discovered the problem through our jsPDF library usage. So it's probably a good idea to keep the issue here as well for reference/awareness until it's clear that things work as expected after there's a fix for html2canvas.

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

No branches or pull requests

2 participants