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

How do you rasterise these SVG without using browser? #145

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

djinn
Copy link

@djinn djinn commented Feb 19, 2025

rsvg, CairoSVG and Inkscape produce black canvas with the produced visualisation. Admittedly, it works well on the browser and browser based SVG visualisation tools. I have a use case where I was embedding the output in PDF and I did not want to fire Selenium or web browser. Thus, I have modified the code to remove CSS vars thus producing viable output with CairoSVG.

Excellent Library.

…can't handle CSS variables well. Post processing for inlining these variables makes it usable both on browser frontend and backend application requiring PNG convertion
@g-battaglia
Copy link
Owner

Hi, thank you very much for you contribution! The integration looks great but I have 2 points:

  • To fully make it work there should be an adaptation of the synastry chart logic to remove the inline transform: translate(x%,y%) part. This breaks all the svg convertions.
  • I would prefer to not have a new hard dependency like bs4 for a specific feature like this. Do you some ideas on how to solve this? Maybe making it optional

@djinn
Copy link
Author

djinn commented Feb 20, 2025

The translate has not created problem for me on CairoSVG. I am updated the dependencies as optional

g-battaglia added a commit that referenced this pull request Feb 23, 2025
This allows #145, solving Synastry Chart problems
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

Successfully merging this pull request may close these issues.

2 participants