-
Notifications
You must be signed in to change notification settings - Fork 247
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
Bokeh SVG plot unsupported #480
Comments
Hi @LorenzoPeve! Thank you for reporting this. Could you provide the SVG file you tried to embed in the PDF, please? |
It looks like the fpdf SVG parser currently only supports HTML color names ( However, your example uses the CSS color format If that is actually a requirement in SVG (most likely, given that it is both produced and accepted by other software), then it should be fairly straightforward to implement. |
I'm working on implementing this in #481 |
This has been fixed on the
This fix will be part of the next release. |
This is great! Thank you so much for the promptness, as I was getting close to a deadline. |
Hello, I tried out the development version, and I am getting the following error. I just want to know if there is anything I can do on my end or if my SVG files don't work for some reason. I can make adjustments on my end to change the figures. I have a reproducible example of my SVG. This is the code I am using, and I created dummy data. Error:
|
@LorenzoPeve, as requested before, could you please upload a minimal SVG file demonstrating the error? It's rather inconvenient having to install several large third-party packages just to test something on our side, and I can't always tell what the problem is just by looking at the traceback. |
Ah thanks. Looks like we need to take into account that the path attribute 'stroke-dasharray' can be an empty string. Maybe we should generally expect that with all optional attributes, and essentially treat the empty ones as if they weren't there. |
I fixed this in 34ddf55 fpdf2 can now renders the SVG image provided by @LorenzoPeve |
This was released in v2.5.6 |
Hello,
I am creating .svg figures using Bokeh Python library. The figures render good in the browser but when I do
`pdf.image(filepath)' I get an error saying ValueError: unsupported color specification rgb(255,255,255)
I tried searching for a solution but didn't go far. I am not sure what the root cause of the issue is. Any pointers?
Full error details here
The text was updated successfully, but these errors were encountered: