Skip to content

Generated SVG not displaying correctly on some renderers like Confluence #1181

@RaimondB

Description

@RaimondB

jArchi Version

1.11.0

Archi Version

5.7.0

Operating System

Windows 11

Description

When using the renderViewToSVG model function, one can opt to set the viewbox automatically or manually.
This works, however not all tools are looking at the viewbox, but instead rely on the width and height attributes to be present. This is the case for confluence. This result is that when adding an attachment and choosing "original size" it will only show it in edit mode, but not in the view mode.

This incompatibility can be fixed by setting the Canvas size when generating the SVG, but this is hidden from the jArchi API.

The fix could be to either allow to set the canvas size explicitly, but it when setViewbox = true, it should set the width and height automatically accordingly.

This can be done via
svgGenerator.setSVGCanvasSize(new Dimension(width, height));

Steps to reproduce

  1. Generate SVG with "setViewBox" option = true
  2. Upload attachment in confluence, choose size "original" and save
  3. View the confluence page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions