Save specific page range

On this page

To export the specific page range, follow these steps:

  1. Instantiate the Annotator class. Specify the input document path or stream.
  2. Instantiate the SaveOptions class. Specify the FirstPage and  LastPage parameters.
  3. 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:

// 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 });
}

On this page