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

PDF - SVG with embedded HTML tags #672

Open
ItayZiv opened this issue May 11, 2020 · 0 comments
Open

PDF - SVG with embedded HTML tags #672

ItayZiv opened this issue May 11, 2020 · 0 comments

Comments

@ItayZiv
Copy link
Contributor

ItayZiv commented May 11, 2020

This issue isn't quite urgent since its related only to PDF (and possibly IE), but anyways...
Being vector-graphics SVGs do not store data the same way as normal PNGs/JPEGs, this results in somewhat of an inconsistency between different programs that display SVGs. One of these inconsistencies comes in with HTML tags, which are used with more advanced programs that export to SVG, to format text, an example of a program that does this is draw.io (Which is the program the docs use for diagrams).
This is fine for all modern browsers, but for making PDFs we convert the SVG file to PNG for use in a PDF, the program used to convert (rsvg in our case, Inkscape suffers from this as well), does not support rendering HTML tags, in draw.io's case it causes a warning on all diagrams, but regardless any formatting that relies on HTML tags won't work.

Getting to the point, it's worth thinking about whether or not enforcing proper formatting is kept on PDF is important or not.
In draw.io, for example, any SVG can be exported without HTML tags (also removing the warning), by selecting everything and deselecting a checkbox when the diagram is done. If any formatting would break at PDF it would break when doing that as well, an example of formatting getting broken is as follows
The original diagram:
originaldiagram
After disabling formatting:
brokediagram
The same diagram broken in a PDF:
AcroRd32_03-05-2020_09_13_59_PM_de7e5c_1a5

Since this regards PDF support it's not urgent at all, but thinking of the way forward with this stuff is worth some thought. While this issue comes up currently with draw.io it has to do with SVGs in general. It is also possible that in the future rsvg or the like start supporting HTML tags, although it isn't something I would count on.
This could be ignored because of how minimal PDF support is, and diagrams still will appear, they just might have weird formatting issues.

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

No branches or pull requests

2 participants