Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created October 19, 2017 10:58
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/06809dc01b3b2ac8b8ee1041a324edd6 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/06809dc01b3b2ac8b8ee1041a324edd6 to your computer and use it in GitHub Desktop.
// Setup GroupDocs.Viewer config
ViewerConfig config = Utilities.GetConfigurations();
//Initialize viewer handler
ViewerImageHandler viewerImageHandler = new ViewerImageHandler(viewerConfig);
//Set encoding
Encoding encoding = Encoding.GetEncoding("shift-jis");
//Set image options
ImageOptions imageOptions = new ImageOptions();
imageOptions.WordsOptions.Encoding = encoding;
//Get words document pages with encoding
string wordsDocumentGuid = "document.txt";
List<PageImage> wordsDocumentPages = viewerImageHandler.GetPages(wordsDocumentGuid, imageOptions);
//Get words document info with encoding
DocumentInfoOptions wordsDocumentInfoOptions = new DocumentInfoOptions(wordsDocumentGuid);
wordsDocumentInfoOptions.WordsDocumentInfoOptions.Encoding = encoding;
DocumentInfoContainer wordsDocumentInfoContainer = viewerImageHandler.GetDocumentInfo(wordsDocumentInfoOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment