[kepler-users] saving workflow in eps format

Christopher Brooks cxh at eecs.berkeley.edu
Mon Mar 1 13:05:40 PST 2010


Hi,
If you have Adobe Acrobat installed, the you can print to PDF as
you would print to a regular printer.  Adobe Acrobat costs money though.

The Ptolemy vergil script has a hacked in option "-printPDF"
which will print a model to the first printer that has the string "PDF"
in its name.  For example, if you have Adobe Acrobat installed,

$PTII/bin/vergil -printPDF $PTII/ptolemy/domains/sdf/demo/Butterfly/Butterfly.xml

will create a file called "Java Printing.pdf" on the Desktop.
It looks like there is a problem with the background not being set to white though.



We have prototype code that uses the AGPL'd itextPDF library from
http://itextpdf.com/

This code can be enabled in Vergil by editing ptII/ptolemy/vergil/basic/BasicGraphFrame.java
and uncommenting a section of code and recompiling

         // Uncomment the next block to have Export PDF *ALWAYS* enabled.
         // We don't want it always enabled because ptiny, the applets and
         // Web Start should not included this AGPL'd piece of software

//         if (_exportPDFAction == null) {
//             //String exportPDFActionClassName = exportPDFActionClassNameParameter.stringValue();
//             String exportPDFActionClassName = "ptolemy.vergil.basic.itextpdf.ExportPDFAction";
//             try {
//                 Class exportPDFActionClass = Class
//                 .forName(exportPDFActionClassName);
//                 Constructor exportPDFActionConstructor = exportPDFActionClass.getDeclaredConstructor(BasicGraphFrame.class);
//                 _exportPDFAction = (AbstractAction) exportPDFActionConstructor.newInstance(this);
//             } catch (Throwable throwable) {
//                 new InternalErrorException(null, throwable, "Failed to construct export PDF class \""
//                         + exportPDFActionClassName
//                         + "\", which was read from the configuration.");
//             }
//         }
         // End of block to uncomment.


This should add an Export PDF menu choice to Vergil's File menu.
This menu choice will not be available in Kepler unless you add it.

This code is prototype code, so you are on your own.

The reason it is not folded in is because it uses GPL'd software.
Edward and I are looking at various possibilities.

_Christopher



On 3/1/10 12:52 PM, u.utku.turuncoglu at be.itu.edu.tr wrote:
> Hi,
>
> Is it possible to save created workflow in eps or pdf format? Now, i am
> using simple screen shots but the quality of them are worse than i
> expected (especially for the publications). Any suggestion can be helpful.
>
> Best regards,
>
> --ufuk
>
>

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841 fax:510.642.2718	      (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670



More information about the Kepler-users mailing list