ObeoNetwork / Capella-Extensions

Collection of plugins adding features to Capella (http://polarsys.org/capella/)
Eclipse Public License 1.0
6 stars 10 forks source link

M2Doc does not export images that were created with "Add Image" function in the editor #31

Closed jaspfl closed 2 years ago

jaspfl commented 3 years ago

This is an issue following the forum post here: https://forum.mbse-capella.org/t/embedded-images-have-133-size/5004 This is for capella 1.4.2 and M2Doc 3.1.1.

There are two ways of adding an image to the description of an object

Copy-pasting creates an image URI of style: data:image/png;base64,AAAAAAAAAAAAAAAAAAAA... Adding images creates an image URI of style: img/test_image.png The latter one corresponds to the relative file path.

Both images are displayed correctly in the editor. When exporting the description to a document with m:object.description.fromHTMLBodyString(), only the copy-pasted image is displayed. For the other image, the following error message is written in the document:

An I/O Problem occured while reading platform:/resource/ExampleProject/doc/img/test_image.png: Resource '/ExampleProject/doc/img/test_image.png' does not exist..

I created and attached a simple test case. ExampleProject.zip

ylussaud commented 2 years ago

I added a test for this issue but it seems to work with M2Doc 3.2.1 and the extensions for Capella 5.2.0.