archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
914 stars 267 forks source link

Fail to export HTML report or image #1002

Closed LvJianting closed 7 months ago

LvJianting commented 7 months ago

Version of Archi

5.2.0

Archi Plug-ins

  1. coArchi
  2. jArchi image

Operating System

Windows 10

Expected Behaviour

Export a big view to HTML report or image.

Actual Behaviour

  1. When export HTML report(works well in 4.10.0): image

  2. When export PNG image(works well in 4.10.0): image

  3. When export SVG image, max width only can be 10000, which is not enough for my big view(may 50000 is enough). image

Error Log & .archimate file

error_log.txt

example.zip

Steps to Reproduce the Behaviour

  1. Select a big view to report html report or image.
  2. Then it will report an error.
Phillipus commented 7 months ago

When exporting the image as PNG format, the Eclipse SWT framework tries to allocate a data array:

https://github.com/eclipse-platform/eclipse.platform.swt/blob/02c8a22116599a507db2dd424dd20cc778db64d4/bundles/org.eclipse.swt/Eclipse%20SWT/common/org/eclipse/swt/graphics/ImageData.java#L451

If the size of the image is too big then then this number can overflow and become negative.

This can only happen if your computer display is at 100% scaling (not high DPI) and you have checked the Archi Preference under General -> Other -> Export images at double scale. Try turning this off. (If, your display is at 200%, leave it on.)

If that does not work then the only option is to reduce the size of your diagram.

When export SVG image, max width only can be 10000

I will increase this to 50000 in the next version of Archi.

Phillipus commented 7 months ago

When export SVG image, max width only can be 10000, which is not enough for my big view

For now you can edit the SVG file in a text editor and change the value from 10000 to 30000:

viewBox="0 0 10000 5986"

LvJianting commented 7 months ago

When export SVG image, max width only can be 10000, which is not enough for my big view

For now you can edit the SVG file in a text editor and change the value from 10000 to 30000:

viewBox="0 0 10000 5986"

Thanks very much~