// For complete examples and data files, please go to https://github.com/groupdocsviewer/GroupDocs_Viewer_NET
// Create/initialize image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(Utilities.GetConfigurations());
//Initialize PdfFileOptions object
PdfFileOptions options = new PdfFileOptions();
// Guid implies that unique document name
options.Guid = DocumentName;
// Call GetPdfFile to get FileContainer type object which contains the stream of pdf file.
FileContainer container = imageHandler.GetPdfFile(options);
//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);