Call the save() method with the output document path or stream. Specify the SaveOptions class as a parameter.
The following code demonstrates how to save the range of document page:
// This example demonstrates saving result document with specified pages.
// Create an instance of Annotator class
Annotatorannotator=newAnnotator("inputPath");try{SaveOptionstmp0=newSaveOptions();tmp0.setFirstPage(2);tmp0.setLastPage(4);// Save to file
annotator.save(outputPath,tmp0);}finally{if(annotator!=null){annotator.dispose();}}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.