You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some kinds of SVG images cannot be drawn on a PDF page using creator.NewGraphicSVGFromFile.
Expected Behavior
The SVG image should be drawn on the page.
If the SVG image cannot be drawn for whatever reason (e.g., the particular structure used within the SVG file is not supported), calling creator.NewGraphicSVGFromFile should at least return an error instead of panicking.
Actual Behavior
We can observe the following two outcomes (depending on the SVG image input file):
creator.NewGraphicSVGFromFile does not return an error, but the image is not drawn on the page.
creator.NewGraphicSVGFromFile panics.
See the pflege-de/unipdf-issue-insert-svg repository for a full proof-of-concept program that can be used to reproduce the issue, including various example SVG files.
See the README of the repository for more information, including concrete reproduction steps.
The text was updated successfully, but these errors were encountered:
Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized, other issues go into our backlog where they are assessed and fitted into the roadmap when suitable. If you need to get this done, consider buying a license which also enables you to use it in your commercial products. More information can be found on https://unidoc.io/
@njkleiner Thanks for your test repo and data you've provided, that was very helpful to us.
We've done several enhancements related to SVG and they will be included into UniPDF release later this month, we will notify you when it will be available.
The enhancements include fixes for both panics you've found and processing of 'transform' attribute. For 2 files from your test set there is still a problem with displaying related to 'defs' attribute but this is already included into our roadmap for next releases.
Description
Some kinds of SVG images cannot be drawn on a PDF page using
creator.NewGraphicSVGFromFile
.Expected Behavior
The SVG image should be drawn on the page.
If the SVG image cannot be drawn for whatever reason (e.g., the particular structure used within the SVG file is not supported), calling
creator.NewGraphicSVGFromFile
should at least return an error instead of panicking.Actual Behavior
We can observe the following two outcomes (depending on the SVG image input file):
creator.NewGraphicSVGFromFile
does not return an error, but the image is not drawn on the page.creator.NewGraphicSVGFromFile
panics.See the pflege-de/unipdf-issue-insert-svg repository for a full proof-of-concept program that can be used to reproduce the issue, including various example SVG files.
See the README of the repository for more information, including concrete reproduction steps.
The text was updated successfully, but these errors were encountered: