Save specific page range

In case of processing large documents (for example 100 pages or more) there is an ability to save only specific pages or desired pages range. 

The following are the steps how to export resultant specific page range: 

The following code demonstrates how to save the range of document page: 

String outputPath = "SavingSpecificPageRange.pdf";

Annotator annotator = new Annotator("input.pdf");

SaveOptions saveOptions = new SaveOptions();
saveOptions.setFirstPage(2);
saveOptions.setLastPage(4);

annotator.save(outputPath, saveOptions);

annotator.dispose();

More resources

Advanced Usage Topics

To learn more about document annotating features, please refer to the advanced usage section.

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured Java library we provide simple, but powerful free Apps.
You are welcome to annotate your PDF, DOC or DOCX, XLS or XLSX, PPT or PPTX, PNG and other documents with free to use online GroupDocs Annotation App.