To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.
ProM Command Line Interface CLI : export JComponent to PDF or Image (PNG/JPEG)
Hello
We are using the ProM command line interface (CLI) to execute batch tasks. We have set it up on a Linux Server. We see that a number of the APIs return a JComponent, for example, _1_log_summary(XLog, XLogInfo) -> JComponent.
We want to know if this JComponent can be exported to a PDF or an image (JPG/PNG). Basically we want the information that is shown on the screen to be obtained without actually displaying it on the screen as ProM is running on a server without a windowing environment.
We tried checking if a JComponent object can be serialized etc but these do not help. Also, most of the
returned JComponents are added to a JPanel and displayed and here there is an "export ..." button in the rendered GUI,
is it possible to access this export functionality directly without rendering the JComponent on the screen?
There are certain export* methods, but not for all. For instance, in the above example, _1_log_summary, there is no "export summary to pdf" or "export bpmn diagram to pdf" and so on.
Thanks.
Comments
-
Hi,
I have implemented such functionality in the Inductive visual Miner as follows:
- create a BufferedImage
- get a Graphics2D object from it using img.createGraphics()
- give this Graphics2D object to your JComponent: component.paint(graphics2d)
That's the basic idea. Hope it helps
Sander
Ps. example code can be found in org.processmining.plugins.inductiveVisualMiner.export.ExportAnimation
Sander Leemans
Assistant Processor (Lecturer) at Queensland University of Technology
Author of the visual Miner and Inductive Miner
Howdy, Stranger!
Categories
- 1.6K All Categories
- 45 Announcements / News
- 225 Process Mining
- 6 - BPI Challenge 2020
- 9 - BPI Challenge 2019
- 24 - BPI Challenge 2018
- 27 - BPI Challenge 2017
- 8 - BPI Challenge 2016
- 68 Research
- 1K ProM 6
- 394 - Usage
- 288 - Development
- 9 RapidProM
- 1 - Usage
- 7 - Development
- 54 ProM5
- 19 - Usage
- 187 Event Logs
- 32 - ProMimport
- 75 - XESame