Open jeremygradisher opened 5 months ago
Can you verify that your HTML that gets converted has this in the <head>
, like is suggested here in the README?
<meta charset='utf-8' />
It does:
Ok, then it must not be a supported glyph in your system fonts (on the server that actually generates the PDF).
You may need to install system font packages on your linux servers with something like yum install freetype fontconfig
or specifically embed a font that you know has those glyphs as described here: https://github.com/mileszs/wicked_pdf/issues/830#issuecomment-487578079
I am working on embedding a font to keep this consistent across users and across dev, production and within the documents generated, but I do want to point out, within the PDF document calculations, that Alpha symbol "𝛼" is showing up. But then in the variables table it does not.
If you look at the way I am rendering this to string w render_to_string, you will see it is done with KaTex using \\alpha
within the calculation, and just using the symbol "𝛼" within the table.
Again, I am following up with embedding a font into my Rails application that I can prove supports the "𝛼" Alpha greek character to see if that resolves it. I will update once I have it resolved to state what the fix is.
Hey @jeremygradisher, I'm running into a similar issue with the pi symbol, any chance you found something that worked for you?
@clementf What I was getting here to print was coming from an API. We solved this by getting that symbol to be sent like this \u003Eα\u003C
from the API as opposed to \u003E𝛼\u003C
which unfortunately probably does not help you here.
Thanks @jeremygradisher for the help! In the end we're also going to solve it with a workaround for the time being.
I can get the Greek Character "𝛼" to show on a page:
But when I generate a doc using Wicked_PDF, it doesn't show up correctly.
Does anyone have an idea of how to resolve this? I have tried multiple fonts to troubleshoot if I were using one without font-support for the greek letters, but that does not appear to be the issue.
css
Further details
What gets sent through that render_to_string is this:
latex
Here,
\\alpha
is the LaTeX command for the alpha symbol. When rendered correctly, this should display the Greek letter alpha (𝛼).wicked_pdf gem version: wicked_pdf (2.7.0)
wkhtmltopdf version: wkhtmltopdf 0.12.6 (with patched qt)
platform/distribution and version: Ruby on Rails 7 -