Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created October 19, 2017 11:19
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/f95e18499b9c834a184841200633b8b7 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/f95e18499b9c834a184841200633b8b7 to your computer and use it in GitHub Desktop.
// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
// Create/initialize image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(Utilities.GetConfigurations());
string DocumentName = "sample.docx";
// To Apply transformations on PDF file
// options.Transformations = Transformation.Rotate | Transformation.Reorder | Transformation.AddPrintAction;
// Call GetPdfFile to get FileContainer type object which contains the stream of pdf file.
FileContainer container = imageHandler.GetPdfFile(DocumentName);
//Change the extension of the file and assign to a string type variable filename
String filename = Path.GetFileNameWithoutExtension(DocumentName) + ".pdf";
//Save each image at disk
Utilities.SaveFile(filename, container.Stream);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment