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/4ed9531e8c9047ac0d39d2c38dd63a5d to your computer and use it in GitHub Desktop.
Save GroupDocsGists/4ed9531e8c9047ac0d39d2c38dd63a5d to your computer and use it in GitHub Desktop.
string filePath = @"c:\sample.pdf";
string filePathOut = @"c:\output\result.pdf";
// Resultant document will contain pages 1 and 3
ExtractOptions extractOptions = new ExtractOptions(new int[] { 1, 3 });
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