Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created July 7, 2019 20:29
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/55446d1d1f0cd81e51997397ee18cfc9 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/55446d1d1f0cd81e51997397ee18cfc9 to your computer and use it in GitHub Desktop.
// For complete examples and data files, please go to https://github.com/GroupDocs-Merger/GroupDocs.Merger-for-Java
string sourceFile = "C:\documents\filename";
string password = "SomePasswordString";
pageNumbers.add(6);
pageNumbers.add(4);
ImageOptions pagesOptions = new ImageOptions(pageNumbers, FileFormat.Xlsx, password);
InputStream documentExample = new FileInputStream(sourceFile);
List<PageImage> images = new DocumentHandler().getPagePreview(documentExample, pagesOptions);
PageImage page = images.get(1);
Console.WriteLine(page.getPageNumber());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment