Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GroupDocs.Viewer for Java 19.8
// For complete examples and data files, please go to https://github.com/GroupDocs-Viewer/GroupDocs.Viewer-for-Java
// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.setStoragePath(STORAGE_PATH);
// Create ViewerImageHandler or use ViewerHtmlHandler to render into HTML
ViewerImageHandler imageHandler = new ViewerImageHandler(config);
String guid = "sample.pst";
// Create ImageOptions with text filter (use HtmlOptions to render into HTML)
ImageOptions options = new ImageOptions();
options.getOutlookOptions().setTextFilter("Susan");
// Render document into image (List<PageHtml> is returned when rendering into HTML)
List<PageImage> pages = imageHandler.getPages(guid, options);
for (PageImage page : pages) {
// use page.getStream() to work with rendering result
}
// For complete examples and data files, please go to https://github.com/GroupDocs-Viewer/GroupDocs.Viewer-for-Java
// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.setStoragePath(STORAGE_PATH);
// Create HTML handler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
String guid = "sample.pst";
// Get outlook document info
OutlookDocumentInfoContainer documentInfoContainer = (OutlookDocumentInfoContainer) htmlHandler.getDocumentInfo(guid);
for (String folderName : documentInfoContainer.getFolders()) {
System.out.println("Folder name: " + folderName);
}
// For complete examples and data files, please go to https://github.com/GroupDocs-Viewer/GroupDocs.Viewer-for-Java
// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.setStoragePath(STORAGE_PATH);
// Create HTML handler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
String guid = "sample.pst";
// Create option object with specified folder name
DocumentInfoOptions options = new DocumentInfoOptions();
options.getOutlookOptions().setFolderName("Inbox");
// Get outlook document info
OutlookDocumentInfoContainer documentInfoContainer = (OutlookDocumentInfoContainer) htmlHandler.getDocumentInfo(guid, options);
for (String folderName : documentInfoContainer.getFolders()) {
System.out.println("Folder name: " + folderName);
}
// For complete examples and data files, please go to https://github.com/GroupDocs-Viewer/GroupDocs.Viewer-for-Java
// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.setStoragePath(STORAGE_PATH);
// Create ViewerImageHandler or use ViewerHtmlHandler to render into HTML
ViewerImageHandler imageHandler = new ViewerImageHandler(config);
String guid = "sample.pst";
// Create image options with specified folder name (use HtmlOptions to render into HTML)
ImageOptions options = new ImageOptions();
options.getOutlookOptions().setFolderName("Inbox");
// Render document into image (List<PageHtml> is returned when rendering into HTML)
List<PageImage> pages = imageHandler.getPages(guid, options);
for (PageImage page : pages) {
// use page.getStream() to work with rendering result
}
// For complete examples and data files, please go to https://github.com/GroupDocs-Viewer/GroupDocs.Viewer-for-Java
// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.setStoragePath(STORAGE_PATH);
// Create ViewerImageHandler
ViewerImageHandler imageHandler = new ViewerImageHandler(config);
String guid = "sample.pst";
// Create pdf options with specified folder name
PdfFileOptions options = new PdfFileOptions();
options.getOutlookOptions().setFolderName("Inbox");
// Get pdf document
FileContainer fileContainer = imageHandler.getPdfFile(guid, options);
// Access PDF document using fileContainer.getStream()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.