static byte[] process(File docFile) throws Exception { final HWPFDocumentCore wordDocument = AbstractWordUtils.loadDoc(docFile); SummaryInformation summaryInformation = wordDocument.getSummaryInformation(); System.out.println(summaryInformation.getAuthor()); System.out.println(summaryInformation.getApplicationName() + ":" + summaryInformation.getTitle()); Thumbnail thumbnail = new Thumbnail(summaryInformation.getThumbnail()); System.out.println(thumbnail.getClipboardFormat()); System.out.println(thumbnail.getClipboardFormatTag()); return thumbnail.getThumbnailAsWMF(); }
public void processDocument( HWPFDocumentCore wordDocument ) { try { final SummaryInformation summaryInformation = wordDocument .getSummaryInformation(); if ( summaryInformation != null ) { processDocumentInformation( summaryInformation ); } } catch ( Exception exc ) { logger.log( POILogger.WARN, "Unable to process document summary information: ", exc, exc ); } final Range docRange = wordDocument.getRange(); if ( docRange.numSections() == 1 ) { processSingleSection( wordDocument, docRange.getSection( 0 ) ); afterProcess(); return; } processDocumentPart( wordDocument, docRange ); afterProcess(); }
public void processDocument( HWPFDocumentCore wordDocument ) { try { final SummaryInformation summaryInformation = wordDocument .getSummaryInformation(); if ( summaryInformation != null ) { processDocumentInformation( summaryInformation ); } } catch ( Exception exc ) { logger.log( POILogger.WARN, "Unable to process document summary information: ", exc, exc ); } final Range docRange = wordDocument.getRange(); if ( docRange.numSections() == 1 ) { processSingleSection( wordDocument, docRange.getSection( 0 ) ); afterProcess(); return; } processDocumentPart( wordDocument, docRange ); afterProcess(); }