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

[BUG]: The SVG format is incompatible with PDF files because it requires external sources #421

Open
Michallote opened this issue Oct 28, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Michallote
Copy link

Issue description

test_sample.json

Whenever we use the SVG download option the files are created requiring external sources:

In the content of the SVG file:

<foreignObject width="100%" height="100%" x="0" y="0" externalResourcesRequired="true"> ...
url(&quot;http://localhost:8888/assets/cursor.svg&quot;)

(Yes this was built from the docker container, but issues persist when done from the website.)

Most if not all tools for converting between SVG and PDF warn about improper SVG formats:

$ inkscape -D ATG.svg  -o AircraftTreeGraph.pdf --export-latex
WARNING: unknown type: svg:foreignObject
WARNING: unknown type: svg:foreignObject
** Message: 22:32:29.473: CairoRenderer: empty bounding box.
Failed to save PS/EPS/PDF to: AircraftTreeGraph.pdf

Also tried rsvg-convert -f pdf -o t.pdf ATG.svg but it produces unrenderable PDFs

The size of the SVGs is substantialy larger than it should be...

Media & Screenshots

image

Operating system

  • OS: [e.g. PopOs! 22.04]:

  • Browser [e.g. docker, brave]:

  • Any other details...

Priority this issue should have

Medium (should be fixed soon)

@Michallote Michallote added the bug Something isn't working label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants