The problem was related to double buffering in JGraph. Export mode single file per element worked pretty smooth. Export the whole graph sucked in exporting images instead of svg markup. This was triggered by the JGraph double buffering. Now, double buffering is disabled during export, and everything is ok.