Example: addPresentation method

This example creates a blank presentation in visible mode.

try {
  Application application = Application.getInstance();
  Presentations presentations = application.getPresentations();
  Presentation presentation = presentations.addPresentation("", false, true);
} catch(Exception e) {
  e.printStackTrace();
}

This example creates a document base on a template.

try {
  Application application = Application.getInstance();
  Presentations presentations = application.getPresentations();
  Presentation presentation = presentations.addPresentation("D:\\test.otp", false, true);
} catch(Exception e) {
  e.printStackTrace();
}

Related information

addPresentation method