Windows Metafile WMF/EMF Export is really wanted

+1 vote
asked Jul 24, 2018 in Wanted features by nAlAz117 (240 points)

Hallo,

i wish to revive a situation with WMF/EMF Export from plantuml. It is sufficient Information about WMF facilty in Java domain on internet

http://public.beuth-hochschule.de/~knabe/java/UmlDiagramsInText.shtml
https://stackoverflow.com/questions/38760961/creating-wmf-file-from-java-bufferedimage
http://java.freehep.org/
http://java.freehep.org/vectorgraphics/index.html
https://github.com/ttyangf/svg2emf/find/master
http://jdocs.nomagic.com/185/com/nomagic/magicdraw/export/image/ImageExporter.html

Lot of very popular apps such as MathMagic, MathType, Illustrator, Xara Designer, Corel apps etc. have a metafile feature. The biggest goal of metafile is a scalability! Additionaly it is possible to transfer 2D in 3D (for example Xara 3D Maker). I wrote Metafile handling in C/C++. It was really not so difficult.

Best regards
 

related to an answer for: Export to windows meta file

2 Answers

0 votes
answered Jul 26, 2018 by StefanDensow (280 points)

What about converting SVG to WMF? See: https://stackoverflow.com/questions/31748727/how-to-convert-an-svg-file-to-wmf-format

I suppose you can do that entirely on the command-line, without launching the Inkscape GUI.

commented Jul 26, 2018 by anonymous
It is a bad way. After implementation of hidden I/O pipe over clipboard (Text to BMP) and using of JNI in C++ parent app no more command-line or shellexecute needed! Instead 2 or more seconds for processing of some UML input and rendering inside of plantuml and transfer of image in parent app i have only 0.02 sec for the same!!! But for clear and nice representation of UML output in text processing systems a DPI feature can be used but in final documents it must be scaled to fit in the page width. And scaling of pixels brings always an aliasing problem. This is not necessary for metafiles. And finally not all text processing apps have a SVG facility. Until now the leading companies for Mathematical Formulas prefer to use metafile standard and not SVG!
0 votes
answered Jul 26, 2018 by plantuml (295,000 points)
We really need help here. Generating WMF/EMF files from Java is not that easy.

One issue with FreeHEP is that it's only available under LGPL, and it looks quite old (Last Published: 2013-04-05).

For EPS and SVG we have built our own generators (see https://github.com/plantuml/plantuml/blob/master/src/net/sourceforge/plantuml/eps/EpsGraphics.java or https://github.com/plantuml/plantuml/blob/master/src/net/sourceforge/plantuml/eps/EpsGraphics.java )

Let's start by something very simple : could someone provide us a Java code snipset that draw a simple rectangle and export it to WWF/EMF ?
commented Jul 28, 2018 by nAlAz117 (240 points)
Yea! No problem with this. I hope that brings nice results. May be i will take a look on converted java code. Anyway 30 years experience in programming...
commented Jul 28, 2018 by nAlAz117 (240 points)
Additionally i have compiled C# project just for check - is everything here? All is OK!
Take a look and test
https://www31.zippyshare.com/v/PT0kBisK/file.html
pass my nick
commented Jul 30, 2018 by plantuml (295,000 points)
Ok, thanks.
We have imported code here https://github.com/plantuml/wmf
The Java generated code is pretty well commented.

Maybe you could also convert/translate the following file:
https://github.com/papnkukn/wmf/blob/master/sample/Program.cs
and add it to the project.

Regards,
commented Aug 1, 2018 by nAlAz117 (240 points)
Program.java is here
https://www56.zippyshare.com/v/QmV1GNAc/file.html
Best wisches
commented May 7, 2019 by joe (100 points)
I got "File has expired and does not exist anymore on this server",  any other place could find it?
...