Camunda-modeler: Exporting to PNG/JPG does not work

Created on 29 Sep 2016  路  19Comments  路  Source: camunda/camunda-modeler

Hi,

when I export BMPN model to image, the program creates always 300x150 blank (white) img, no matter how big was the model.

  • CamudaModeler v.1.3
  • Windows 7

I downloaded .exe file, didn't build it by myself.


See also SUPPORT-2751, SUPPORT-2789.

bug support needs discussion

Most helpful comment

@kriskot I've tried with your file and indeed it doesn't work. Therefore I've added a "Bug" label, we'll take a look into it.

All 19 comments

It works for me in Linux. Please try downloading this diagram and export it as an image.

Yep, your example works fine but when you edit both your and my files you can see the namespaces are different.

Pls have a look at this example produced on my machine:
MFA2.bpmn.txt

Hi,

i have the same problem. It works for some models, but others (all created within the last 3 month) produce a white empty image. SVG works.

On multiple PCs, also downloaded:
1) Windows 10, Modeler v1.3
2) Windows 10, Modeler v1.3.2.

For me SVG generates file with content but it looks like not a proper .svg format, at least for IE and VSCode...

@kriskot I've tried with your file and indeed it doesn't work. Therefore I've added a "Bug" label, we'll take a look into it.

Same problem here on Win/Mac with models created/saved with CamudaModeler >= v.1.3. Exports only blank images.

@341bms If possible, please share the diagram that yields this behavior.

Able to reproduce the problem. Attached are to models. "diagram_non_exportable.bpmn" exports a blank image. In "diagram_exportable.bpmn" the gateway name is changed an now the image export works. Something regarding special chars or char encoding?

Archiv.zip

Hi,

I am seeing the same problem on an Ubuntu 14.04 machine. I presume this is not just specific to windows machines.

Same issue on v1.3.2 for Mac OS Sierra. It did work to begin with a few times for PNG at least. At some point along the way it stopped working.

I have tried the following:

  1. Upgrading to v1.4
  2. Copying the BPMN diagram to a fresh diagram canvas, saving and then retrying the export.
  3. Saving the diagram as a new name and then retrying the export.

None of these troubleshooting steps generate a PNG or jpg.

Workaround I am using at the moment is screenshot.

Hey together,

i ran into this lately in a customer project. I tried to build a minimum reproducable example.
First i thought the issue may be related to using a german "umlaut" in process element names. This doesn't seem to be the case. However, i think it is caused by trailing whitespaces.

See my files for reference:
I got the following sample process diagram:
running version

Minimum reproducable bpmn example files:

Looking at the difference between those two files i found out that the CallActivity in the corrupted file looks like <bpmn:callActivity id="ServiceTask_0qcbs4y" name="Bonit盲tspr眉fung聽">, removing the trailing whitespace (<bpmn:callActivity id="ServiceTask_0qcbs4y" name="Bonit盲tspr眉fung"> ) leads to the running version that will export my process model to PNG.

This is reproducable with every bpmn-element (events, activities, sequence Flows) i tried.
A trailing whitespace always leads to a situation where the export is not possible at all.

Any chance to dive into this? Maybe "trim" whitespaces before exporting as a workaround?

Kind regards,
Matthias

The space at the end was a good hint, but did not fix all of my models. I then digged deeper and found the reason why it wasn't working for me:

A normal space is 0x20 in HEX, but if the name contains an non-breaking space (0xC2 0xA0), the model breaks.
special whitespaces
In the screenshot you can see, that Git Extensions does not mark the spaces between sec, after and handleEnd as space because its a non-breaking-space (red line). After replacing the spaces, export works (green line, the slight change in text is not relevant)

Update:

  • found the same non-breaking Whitespace in the example MFA2.bpmn.txt from kriskot.

I experienced the same problem with blank .png/.jpeg exports.
On Ubuntu 16 a workaround is to export an .svg first and then to convert it with convert NAME.svg NAME.png to pgn.

experiencing on Mac

I was able to resolve the issue while inspecting with Firefox the SVG.

I have a annotation with the following text:

Reviews Request.  Reviews avalibility and purpose.  If approved, selects time slot and provides comments/text.  If denied, provides reasons for denial.  Can offer another time slot.

Was getting an error when rendering the SVG in the Browser:

This page contains the following errors:

error on line 4 at column 41910: Entity 'nbsp' not defined

Firefox identifies the location:

</tspan><tspan x="5" y="93">denial. &nbsp;Can offer another time slot. </tspan></text></g>

CMD+C the annotation text, and then deleted the annotation. Then readied the annotation and pasted the exact text back in. And the problem was resolved. I made zero edits the formatting or text content.

The annotation was on a User Task

OSX Latest: 10.12.1
Camunda Modeler: 1.4.0(1476979505)

Few other notes.
This exact notation was in another BPMN file and there was no issues with export. I had saved a copy of the original BPMN file and made edits (but did not edit the Annotation), and had problems with the new BPMN.

I can no longer reproduce this bug with the provided diagrams in Linux or macOS. I used the upcoming version 1.5 to test.

@ricardomatias
Many thanks. When will that version be fully released?

You can download it from here.

Many thanks @ricardomatias.
The export works fine again.

Was this page helpful?
0 / 5 - 0 ratings