Example: print method

This example prints the page 1 to 7 of the document for one copy.

try {
  Application application = Application.getInstance();
  Documents documents = application.getDocuments();
  Document document = documents.openDocument("D:\\test.odt", true);
  document.print(1,"1-7",true);
} catch(Exception e) {
  e.printStackTrace();
}

Related information

print method