Home
Categories
Dictionnary
Download
Project Details
Changes Log
FAQ
License

PPT driver


    1  Dependencies
    2  PPTDriverUtils Utility class
       2.1  Adding additional processing to Nodes
    3  Usage example

The PowerPoint driver allows to serialize JavaFX content as a vector PowerPoint file.

Dependencies

You should use the jfxConverter-ppt.jar in addition to the jfxConverter.jar. Note that the PowerPoint driver uses the Apache POI library, which is in the lib directory.

PPTDriverUtils Utility class

The PPTDriverUtils encapsulate the usage of the converter. for example:

      PPTDriverUtils pptUtils = new PPTDriverUtils();
      pptUtils.convert(node, file);      

Adding additional processing to Nodes

To add additional processing to Nodes:

      PPTDriverUtils pptUtils = new PPTDriverUtils();
      pptUtils.convert(node, file, true);      

Usage example

      // create the Scene graph
      JFXInvoker invoker = JFXInvoker.getInstance();
      invoker.invokeBlocking(new Runnable() {
        @Override
        public void run() {
          StackPane root = new StackPane();
          Scene scene = new Scene(root, 300, 250);
          Stage stage = new Stage();
          stage.setScene(scene);
          start(stage);
      
          Line line = new Line(0, 0, 200, 200);
          line.setStroke(Color.RED);     
         
          root.getChildren().add(line);
          primaryStage.show();
        }
      });
      
      // perform the conversion
      PPTDriverUtils pptUtils = new PPTDriverUtils();
      pptUtils.convert(node, file);


Categories: drivers

Copyright 2016-2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence