EPS output format with Salt

+1 vote
asked Sep 13, 2014 in Bug by anonymous

With Salt the only available output format is PNG, one can request for EPS or whatever but the result will always be a PNG image even if file will be named .eps, see PSystemSalt.exportDiagram()  .

After a little investigation a solution could be an ImageBuilder in PSystemSalt then one can use:

        builder.addUDrawable(new UDrawable() {
            @Override
            public void drawU(UGraphic ug) {
                salt.drawU(ug, 0, new Dimension2DDouble(size.getWidth(), size.getHeight()));
                salt.drawU(ug, 1, new Dimension2DDouble(size.getWidth(), size.getHeight()));
            }
        });

or

        builder.addUDrawable(new UDrawable() {
            @Override
            public void drawU(UGraphic ug) {
                ug.draw(new UImage(im));
            }
        });

Or may be you guys have some better solution.
With the above solution there is a NPE in EpsGraphics and the result is not as high-quality as expected.

Minimal eps/pdf support is required to use PlantUML with Sphinx.

Regards,
Mar

1 Answer

+1 vote
answered Sep 13, 2014 by plantuml (294,660 points)
Sorry about that! We've been very lazzy when we have started Salt (we did not think it would be use some day!)

So PNG export was hardcoded at that time. Fortunatly, other exports are easy to add.

We've just uploaded version 8005beta2 that should work with SVG & EPS export.

https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

Very few tests have been done, so do not hesitate to feedback in case of issues.

Regards,
asked Sep 14, 2014 in Bug by anonymous Source code for beta version?
commented Feb 27, 2015 by rajendersaini (120 points)
Thanks new file works ..
...