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

Enable cairo renderer in Graphviz #285

Open
septatrix opened this issue Nov 6, 2024 · 3 comments
Open

Enable cairo renderer in Graphviz #285

septatrix opened this issue Nov 6, 2024 · 3 comments

Comments

@septatrix
Copy link

The cairo renderer is very useful for PDF outputs. Something similar can be hacked together by using svg2pdf.js but that has several layout bugs where elements (especially text) end up in the wrong place.

@septatrix septatrix changed the title Enable cario renderer in Graphviz Enable cairo renderer in Graphviz Nov 8, 2024
@GordonSmith
Copy link
Member

I am not sure the effort needed to create a wasm version of cairo (and its dependencies) to create a pdf would be worth the effort?

In the past when I have needed to generate (quality) pdf files from a rendered web page I have stood up a headless chrome instance on the server and used the "Save as / Export to PDF" feature (that is built into the browser)...

I do have a generic widget that can host visualizations and download them to png from the browser?

@septatrix
Copy link
Author

The problem is that a chrome instance is pretty heavy. Our application is currently mostly a static web page with a few requests to a cheap VPS does not have the capacity to do rendering of its own. This is why we would like to push this to the client which would also improve latency and reduce bandwidth as we do not need to send PDFs over the network.

@GordonSmith
Copy link
Member

FYI - I have a POC of svg->pdf working (via wasm), but it requires loading the referenced font(s) manually into the wasm function, which is not very elegant.

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