SVG conversion via Canvas API with foreignObject does not work properly.

Hi, I would like to publish my app on Apple devices as well. Unfortunately I have a problem with the "porting" that I just can't solve.

I have been offering my app on Android for a long time and everything runs great there.

The problem is I have an SVG which needs to be converted to an image. The starting point for the SVG is a mindmap with several nodes. Each node is a <foreignObject> and contains various data. Among other things this can also contain a small base64 encoded image. The SVG is displayed completely correctly in the browser. For exporting the mindmap I have to convert it to an image. For the conversion I use the Canvas API. This works great on Android but on Mac it always exports the mindmap without the images. I have tried everything possible. But can't get any further.

Who is rendering the graphics? Is it possible that the Canvas API on Safari is a different version and may not be able to do things that are supported in Chrome? Could it have problems with the base64 encoding? Because otherwise it shows everything but the images are missing.

Does anyone have an idea and could help me? It hangs really only on the one thing and I do not get it. :(

Thanks already. Tom

No idea? :(

For the way I want to implement this, are there any good alternatives to the Canvas API? Alternatives that work better with Safari?

Thanks a lot. Tom

SVG conversion via Canvas API with foreignObject does not work properly.
 
 
Q