Skip to content

Unexpected Behavior when rendering the same Svg-image on two different Pdf-pages #166

@FHoffmannSopra

Description

@FHoffmannSopra

Hey guys,

I tried to render the same SVG image in my pdf with the svg2pdf tool on two different pages in the document.

For most of the Svg-files I have that works perfectly.

But for some Svg's I get the following behavior:

  • all Svg's are rendered perfecly on a single page
  • most of them are rendered on two or more pages
  • some are throwing the error below when they are rendered on two different pages
  • it doesnt matter if I delete the critical Svg on the 1st or 2nd page, as long as there is not two of them it works perfecly.

jsPdf-Error

Unfortunately I could not isolate the problem better,
except for the fact that when I remove all xlink:href attributes it works fine.
Since xlink:href is deprecated in the Svg-standard, I did also try href instead, but got no positive effects.
Not to use href is not an option for me.

I have seen that the error is thrown by the jsPdf library, but I am not sure if its a problem with the preprocessing of svg2pdf or indeed a problem with jsPdf.

If I can provide more information just let me know.

The Svg's are created with InkScape.

I am using svg2pdf 2.0.0 and jsPdf 2.0.0.

Thanks for your help
Frederic

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions