Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active October 17, 2019 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/5d7e2aeca06cb84d94c49595e72738ca to your computer and use it in GitHub Desktop.
Save GroupDocsGists/5d7e2aeca06cb84d94c49595e72738ca to your computer and use it in GitHub Desktop.
string filePath = @"c:\sample.pdf";
string filePathOut = @"c:\output\result.pdf";
// Resultant document will contain page 2
ExtractOptions extractOptions = new ExtractOptions(1, 3, RangeMode.EvenPages); // Resultant document will contain page 2
using (Merger merger = new Merger(filePath))
{
merger.ExtractPages(extractOptions);
merger.Save(filePathOut);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment