Package org.apache.poi.hwpf.converter
Class WordToFoConverter
java.lang.Object
org.apache.poi.hwpf.converter.AbstractWordConverter
org.apache.poi.hwpf.converter.WordToFoConverter
- Author:
- Sergey Vladimirov (vlsergey {at} gmail {dot} com)
-
Field Summary
FieldsFields inherited from class org.apache.poi.hwpf.converter.AbstractWordConverter
UNICODECHAR_NO_BREAK_SPACE, UNICODECHAR_NONBREAKING_HYPHEN, UNICODECHAR_ZERO_WIDTH_SPACE
-
Constructor Summary
ConstructorsConstructorDescriptionWordToFoConverter
(FoDocumentFacade foDocumentFacade) WordToFoConverter
(Document document) Creates new instance ofWordToFoConverter
. -
Method Summary
Modifier and TypeMethodDescriptionprotected Element
createNoteInline
(String noteIndexText) protected String
createPageMaster
(Section section, String type, int sectionIndex) boolean
static void
Java main() interface to interact withWordToFoConverter
protected void
outputCharacters
(Element block, CharacterRun characterRun, String text) protected void
processBookmarks
(HWPFDocumentCore wordDocument, Element currentBlock, Range range, int currentTableLevel, 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, String path, Element block) protected void
processEndnoteAutonumbered
(HWPFDocument wordDocument, int noteIndex, Element block, Range endnoteTextRange) protected void
processFootnoteAutonumbered
(HWPFDocument wordDocument, int noteIndex, Element block, Range footnoteTextRange) protected void
processHyperlink
(HWPFDocumentCore wordDocument, Element currentBlock, Range textRange, int currentTableLevel, String hyperlink) protected void
processImage
(Element currentBlock, boolean inlined, Picture picture, String url) protected void
processImageWithoutPicturesManager
(Element currentBlock, boolean inlined, Picture picture) protected void
processLineBreak
(Element block, CharacterRun characterRun) protected void
processPageBreak
(HWPFDocumentCore wordDocument, Element flow) protected void
processPageref
(HWPFDocumentCore hwpfDocument, Element currentBlock, Range textRange, int currentTableLevel, String pageref) protected void
processParagraph
(HWPFDocumentCore hwpfDocument, Element parentFopElement, int currentTableLevel, Paragraph paragraph, String bulletText) protected void
processSection
(HWPFDocumentCore wordDocument, Section section, int sectionCounter) protected void
processTable
(HWPFDocumentCore wordDocument, Element flow, Table table) protected boolean
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
-
Field Details
-
foDocumentFacade
-
-
Constructor Details
-
WordToFoConverter
Creates new instance ofWordToFoConverter
. Can be used for output severalHWPFDocument
s into single FO document.- Parameters:
document
- XML DOM Document used as XSL FO document. Shall support namespaces
-
WordToFoConverter
-
-
Method Details
-
main
Java main() interface to interact withWordToFoConverter
Usage: WordToFoConverter infile outfile
Where infile is an input .doc file ( Word 97-2007) which will be rendered as XSL-FO into outfile- Throws:
Exception
-
createNoteInline
-
createPageMaster
-
getDocument
- Specified by:
getDocument
in classAbstractWordConverter
-
isOutputCharactersLanguage
public boolean isOutputCharactersLanguage() -
outputCharacters
- Specified by:
outputCharacters
in classAbstractWordConverter
-
processBookmarks
protected void processBookmarks(HWPFDocumentCore wordDocument, Element currentBlock, Range range, int currentTableLevel, 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 classAbstractWordConverter
-
processDocumentInformation
- Specified by:
processDocumentInformation
in classAbstractWordConverter
-
processDrawnObject
protected void processDrawnObject(HWPFDocument doc, CharacterRun characterRun, OfficeDrawing officeDrawing, String path, Element block) - Specified by:
processDrawnObject
in classAbstractWordConverter
-
processEndnoteAutonumbered
protected void processEndnoteAutonumbered(HWPFDocument wordDocument, int noteIndex, Element block, Range endnoteTextRange) - Specified by:
processEndnoteAutonumbered
in classAbstractWordConverter
-
processFootnoteAutonumbered
protected void processFootnoteAutonumbered(HWPFDocument wordDocument, int noteIndex, Element block, Range footnoteTextRange) - Specified by:
processFootnoteAutonumbered
in classAbstractWordConverter
-
processHyperlink
protected void processHyperlink(HWPFDocumentCore wordDocument, Element currentBlock, Range textRange, int currentTableLevel, String hyperlink) - Specified by:
processHyperlink
in classAbstractWordConverter
-
processImage
- Specified by:
processImage
in classAbstractWordConverter
-
processImageWithoutPicturesManager
protected void processImageWithoutPicturesManager(Element currentBlock, boolean inlined, Picture picture) - Specified by:
processImageWithoutPicturesManager
in classAbstractWordConverter
-
processLineBreak
- Specified by:
processLineBreak
in classAbstractWordConverter
-
processPageBreak
- Specified by:
processPageBreak
in classAbstractWordConverter
-
processPageref
protected void processPageref(HWPFDocumentCore hwpfDocument, Element currentBlock, Range textRange, int currentTableLevel, String pageref) - Specified by:
processPageref
in classAbstractWordConverter
-
processParagraph
protected void processParagraph(HWPFDocumentCore hwpfDocument, Element parentFopElement, int currentTableLevel, Paragraph paragraph, String bulletText) - Specified by:
processParagraph
in classAbstractWordConverter
-
processSection
- Specified by:
processSection
in classAbstractWordConverter
-
processTable
- Specified by:
processTable
in classAbstractWordConverter
-
setId
-
setOutputCharactersLanguage
public void setOutputCharactersLanguage(boolean outputCharactersLanguage)
-