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:

  • Instantiate Annotator object with input document path or stream;
  • Instantiate SaveOptions object and set low bound FirstPage and high bound LastPage;
  • Call Save method with resultant document path or stream and SaveOptions object;

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

// for this example input document ("input.pdf") must have at least 4 pages
using (Annotator annotator = new Annotator("input.pdf"))
	//Result file will be contain only 3 pages (2, 3 and 4 page)
	annotator.Save("result.pdf", new SaveOptions { FirstPage = 2, LastPage = 4 });

More resources

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 .NET 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.

© Aspose Pty Ltd 2001-2022. All Rights Reserved.