-
Notifications
You must be signed in to change notification settings - Fork 109
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
Diagrams not generating text in pdf #398
Comments
Could you provide your input document (or an equivalent example) as well? I'm not sure what could cause this right away. The generated diagrams should be identical regardless of the asciidoctor backend that's being used. |
Thanks, I'm working with this repository: https://github.com/chaincodelabs/onboarding-to-bitcoin-core, the particular file that have the first diagram is https://github.com/chaincodelabs/onboarding-to-bitcoin-core/blob/master/02_architecture.adoc There is a {
"themeCSS": ".label foreignObject { font-size: 85%; overflow: visible; }"
} this is the
|
I tried generating the PDF locally and I'm seeing the same result. The generated SVG images look fine though. That leads me to believe that there isn't really anything going wrong in the diagram extension itself, but that something is getting lost when the SVG images get embedded in the PDF. That part of the document generation flow is handled by the https://github.com/asciidoctor/asciidoctor-pdf project. I'm not too familiar with that myself. Might be best to open an issue there referring to this one. |
If I understand it correctly, SVG files are converted to native PDF drawing instructions by https://github.com/mogest/prawn-svg. My hunch is that somethings going wrong in the font handling there. |
Here is the open issue in asciidoctor-pdf repository asciidoctor/asciidoctor-pdf#2384 |
It's not font handling. It's the fact that prawn-svg doesn't support foreignObject (which essentially just embedded HTML). |
@mojavelinux thanks for taking a look! Thanks to your |
If you can see a way to disable HTML labels for other diagrams besides flow charts, do let us know! As far as I can tell, that option only applies to the one specific chart type. |
I'm going to close this issue for now. The root cause of the problem is the fact that mermaid produces SVG with embedded HTML content. Fixing or improving that is out of scope for this project. |
I'm generating a pdf with diagrams using
asciidoctor-pdf -r asciidoctor-diagram index.adoc
but diagrams are generated without text.Here is my Gem list:
If I generate the HTML with
asciidoctor -r asciidoctor-diagram index.adoc
all diagrams are generated correctly.The text was updated successfully, but these errors were encountered: