Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hwpf.converter
Class WordToFoConverter

    java.lang.Object
      org.apache.poi.hwpf.converter.AbstractWordConverter
          org.apache.poi.hwpf.converter.WordToFoConverter

    @Beta
    public class WordToFoConverter

extends AbstractWordConverter

Author:
  Sergey Vladimirov (vlsergey {at} gmail {dot} com)

Field Summary
`protected FoDocumentFacade` | `foDocumentFacade`

Fields inherited from class org.apache.poi.hwpf.converter.AbstractWordConverter
`UNICODECHAR_NO_BREAK_SPACE, UNICODECHAR_NONBREAKING_HYPHEN, UNICODECHAR_ZERO_WIDTH_SPACE`

Constructor Summary
`WordToFoConverter(org.w3c.dom.Document document)` Creates new instance of `WordToFoConverter`.
`WordToFoConverter(FoDocumentFacade foDocumentFacade)`

Method Summary
`protected org.w3c.dom.Element` | `createNoteInline(java.lang.String noteIndexText)`
`protected java.lang.String` | `createPageMaster(Section section, java.lang.String type, int sectionIndex)`
`org.w3c.dom.Document` | `getDocument()`
`boolean` | `isOutputCharactersLanguage()`
`static void` | `main(java.lang.String[] args)` Java main() interface to interact with `WordToFoConverter`
`protected void` | `outputCharacters(org.w3c.dom.Element block, CharacterRun characterRun, java.lang.String text)`
`protected void` | `processBookmarks(HWPFDocumentCore wordDocument, org.w3c.dom.Element currentBlock, Range range, int currentTableLevel, java.util.List<Bookmark> rangeBookmarks)` Wrap range into bookmark(s) and process it.
`protected void` | `processDocumentInformation(SummaryInformation summaryInformation)`
`protected void` | `processDrawnObject(HWPFDocument doc, CharacterRun characterRun, OfficeDrawing officeDrawing, java.lang.String path, org.w3c.dom.Element block)`
`protected void` | `processEndnoteAutonumbered(HWPFDocument wordDocument, int noteIndex, org.w3c.dom.Element block, Range endnoteTextRange)`
`protected void` | `processFootnoteAutonumbered(HWPFDocument wordDocument, int noteIndex, org.w3c.dom.Element block, Range footnoteTextRange)`
`protected void` | `processHyperlink(HWPFDocumentCore wordDocument, org.w3c.dom.Element currentBlock, Range textRange, int currentTableLevel, java.lang.String hyperlink)`
`protected void` | `processImage(org.w3c.dom.Element currentBlock, boolean inlined, Picture picture, java.lang.String url)`
`protected void` | `processImageWithoutPicturesManager(org.w3c.dom.Element currentBlock, boolean inlined, Picture picture)`
`protected void` | `processLineBreak(org.w3c.dom.Element block, CharacterRun characterRun)`
`protected void` | `processPageBreak(HWPFDocumentCore wordDocument, org.w3c.dom.Element flow)`
`protected void` | `processPageref(HWPFDocumentCore hwpfDocument, org.w3c.dom.Element currentBlock, Range textRange, int currentTableLevel, java.lang.String pageref)`
`protected void` | `processParagraph(HWPFDocumentCore hwpfDocument, org.w3c.dom.Element parentFopElement, int currentTableLevel, Paragraph paragraph, java.lang.String bulletText)`
`protected void` | `processSection(HWPFDocumentCore wordDocument, Section section, int sectionCounter)`
`protected void` | `processTable(HWPFDocumentCore wordDocument, org.w3c.dom.Element flow, Table table)`
`protected boolean` | `setId(org.w3c.dom.Element element, java.lang.String id)`
`void` | `setOutputCharactersLanguage(boolean outputCharactersLanguage)`

Methods inherited from class org.apache.poi.hwpf.converter.AbstractWordConverter
`afterProcess, getCharacterRunTriplet, getFontReplacer, getNumberColumnsSpanned, getNumberRowsSpanned, getPicturesManager, processCharacters, processDeadField, processDocument, processDocumentPart, processDrawnObject, processDropDownList, processField, processImage, processNoteAnchor, processOle2, processParagraphes, processSingleSection, processSymbol, setFontReplacer, setPicturesManager, tryDeadField`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### foDocumentFacade

    protected final FoDocumentFacade foDocumentFacade

Constructor Detail

### WordToFoConverter

    public WordToFoConverter(org.w3c.dom.Document document)

  Creates new instance of `WordToFoConverter`. Can be used for output several `HWPFDocument`s into single FO document.

  Parameters:
    `document` - XML DOM Document used as XSL FO document. Shall support namespaces

### WordToFoConverter

    public WordToFoConverter(FoDocumentFacade foDocumentFacade)

Method Detail

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Java main() interface to interact with `WordToFoConverter`

  Usage: WordToFoConverter infile outfile

  Where infile is an input .doc file ( Word 97-2007) which will be rendered as XSL-FO into outfile

  Throws:
    `java.lang.Exception`

### createNoteInline

    protected org.w3c.dom.Element createNoteInline(java.lang.String noteIndexText)

### createPageMaster

    protected java.lang.String createPageMaster(Section section,
                                                java.lang.String type,
                                                int sectionIndex)

### getDocument

    public org.w3c.dom.Document getDocument()

  Specified by:
    `getDocument` in class `AbstractWordConverter`

### isOutputCharactersLanguage

    public boolean isOutputCharactersLanguage()

### outputCharacters

    protected void outputCharacters(org.w3c.dom.Element block,
                                    CharacterRun characterRun,
                                    java.lang.String text)

  Specified by:
    `outputCharacters` in class `AbstractWordConverter`

### processBookmarks

    protected void processBookmarks(HWPFDocumentCore wordDocument,
                                    org.w3c.dom.Element currentBlock,
                                    Range range,
                                    int currentTableLevel,
                                    java.util.List<Bookmark> rangeBookmarks)

  Description copied from class: `AbstractWordConverter`
  Wrap range into bookmark(s) and process it. All bookmarks have starts equal to range start and ends equal to range end. Usually it's only one bookmark.

  Specified by:
    `processBookmarks` in class `AbstractWordConverter`

### processDocumentInformation

    protected void processDocumentInformation(SummaryInformation summaryInformation)

  Specified by:
    `processDocumentInformation` in class `AbstractWordConverter`

### processDrawnObject

    protected void processDrawnObject(HWPFDocument doc,
                                      CharacterRun characterRun,
                                      OfficeDrawing officeDrawing,
                                      java.lang.String path,
                                      org.w3c.dom.Element block)

  Specified by:
    `processDrawnObject` in class `AbstractWordConverter`

### processEndnoteAutonumbered

    protected void processEndnoteAutonumbered(HWPFDocument wordDocument,
                                              int noteIndex,
                                              org.w3c.dom.Element block,
                                              Range endnoteTextRange)

  Specified by:
    `processEndnoteAutonumbered` in class `AbstractWordConverter`

### processFootnoteAutonumbered

    protected void processFootnoteAutonumbered(HWPFDocument wordDocument,
                                               int noteIndex,
                                               org.w3c.dom.Element block,
                                               Range footnoteTextRange)

  Specified by:
    `processFootnoteAutonumbered` in class `AbstractWordConverter`

### processHyperlink

    protected void processHyperlink(HWPFDocumentCore wordDocument,
                                    org.w3c.dom.Element currentBlock,
                                    Range textRange,
                                    int currentTableLevel,
                                    java.lang.String hyperlink)

  Specified by:
    `processHyperlink` in class `AbstractWordConverter`

### processImage

    protected void processImage(org.w3c.dom.Element currentBlock,
                                boolean inlined,
                                Picture picture,
                                java.lang.String url)

  Specified by:
    `processImage` in class `AbstractWordConverter`

### processImageWithoutPicturesManager

    protected void processImageWithoutPicturesManager(org.w3c.dom.Element currentBlock,
                                                      boolean inlined,
                                                      Picture picture)

  Specified by:
    `processImageWithoutPicturesManager` in class `AbstractWordConverter`

### processLineBreak

    protected void processLineBreak(org.w3c.dom.Element block,
                                    CharacterRun characterRun)

  Specified by:
    `processLineBreak` in class `AbstractWordConverter`

### processPageBreak

    protected void processPageBreak(HWPFDocumentCore wordDocument,
                                    org.w3c.dom.Element flow)

  Specified by:
    `processPageBreak` in class `AbstractWordConverter`

### processPageref

    protected void processPageref(HWPFDocumentCore hwpfDocument,
                                  org.w3c.dom.Element currentBlock,
                                  Range textRange,
                                  int currentTableLevel,
                                  java.lang.String pageref)

  Specified by:
    `processPageref` in class `AbstractWordConverter`

### processParagraph

    protected void processParagraph(HWPFDocumentCore hwpfDocument,
                                    org.w3c.dom.Element parentFopElement,
                                    int currentTableLevel,
                                    Paragraph paragraph,
                                    java.lang.String bulletText)

  Specified by:
    `processParagraph` in class `AbstractWordConverter`

### processSection

    protected void processSection(HWPFDocumentCore wordDocument,
                                  Section section,
                                  int sectionCounter)

  Specified by:
    `processSection` in class `AbstractWordConverter`

### processTable

    protected void processTable(HWPFDocumentCore wordDocument,
                                org.w3c.dom.Element flow,
                                Table table)

  Specified by:
    `processTable` in class `AbstractWordConverter`

### setId

    protected boolean setId(org.w3c.dom.Element element,
                            java.lang.String id)

### setOutputCharactersLanguage

    public void setOutputCharactersLanguage(boolean outputCharactersLanguage)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.