usmanazizgroupdocs
4/15/2016 - 10:33 AM

RenderDocumentWithCustomDataHandler.java

// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java
try {
	// Setup GroupDocs.Viewer config
	ViewerConfig config = Utilities.getConfiguration();

	// File guid
	String guid = fileName;

	// Use custom IInputDataHandler implementation
	IInputDataHandler inputDataHandler = new AzureInputDataHandler("<Account_Name>", "<Account_Key>",
			"<Container_Name>");

	// Get file HTML representation
	ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config, inputDataHandler);

	List<PageHtml> pages = htmlHandler.getPages(guid);
} catch (Exception exp) {
	System.out.println("Exception: " + exp.getMessage());
	exp.printStackTrace();
}