org.apache.poi.xwpf.converter.pdf.internal
Class PdfMapper

java.lang.Object
  extended by org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
      extended by org.apache.poi.xwpf.converter.pdf.internal.PdfMapper

public class PdfMapper
extends XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>


Field Summary
 
Fields inherited from class org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor
document, options, stylesDocument, WORD_MEDIA
 
Constructor Summary
PdfMapper(org.apache.poi.xwpf.usermodel.XWPFDocument document, OutputStream out, PdfOptions options)
           
 
Method Summary
protected  void addNewLine(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br, IITextContainer pdfParagraphContainer)
           
protected  IXWPFMasterPage createMasterPage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
          Create an instance of master page.
protected  void endVisitDocument()
          End of visit document.
protected  void endVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph docxParagraph, IITextContainer pdfParentContainer, IITextContainer pdfParagraphContainer)
           
protected  void endVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table, IITextContainer pdfParentContainer, IITextContainer pdfTableContainer)
           
protected  void endVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell, IITextContainer tableContainer, IITextContainer tableCellContainer)
           
protected  void pageBreak()
           
protected  void setActiveMasterPage(StylableMasterPage masterPage)
          Set active master page.
protected  IITextContainer startVisitDocument()
          Start of visit document.
protected  IITextContainer startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph docxParagraph, ListItemContext itemContext, IITextContainer pdfParentContainer)
           
protected  IITextContainer startVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table, float[] colWidths, IITextContainer pdfParentContainer)
           
protected  IITextContainer startVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell, IITextContainer pdfTableContainer, boolean firstRow, boolean lastRow, boolean firstCol, boolean lastCol, List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells)
           
protected  void startVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row, IITextContainer tableContainer, int rowIndex, boolean headerRow)
           
protected  void visitBookmark(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark bookmark, org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph, IITextContainer paragraphContainer)
           
protected  void visitBR(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br, IITextContainer paragraphContainer)
           
protected  void visitEmptyRun(IITextContainer pdfParagraphContainer)
           
protected  void visitFooter(org.apache.poi.xwpf.usermodel.XWPFFooter footer, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr, StylableMasterPage masterPage)
           
protected  void visitHeader(org.apache.poi.xwpf.usermodel.XWPFHeader header, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr, StylableMasterPage masterPage)
           
protected  void visitPicture(org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture picture, Float offsetX, org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromH.Enum relativeFromH, Float offsetY, org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromV.Enum relativeFromV, org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STWrapText.Enum wrapText, IITextContainer pdfParentContainer)
           
protected  void visitRun(org.apache.poi.xwpf.usermodel.XWPFRun docxRun, boolean pageNumber, String url, IITextContainer pdfParagraphContainer)
           
protected  void visitTab(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPTab tab, IITextContainer pdfParagraphContainer)
           
protected  void visitTabs(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTabs tabs, IITextContainer pdfParagraphContainer)
           
protected  void visitText(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText docxText, boolean pageNumber, IITextContainer pdfParagraphContainer)
           
 
Methods inherited from class org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor
createStylesDocument, endVisitTableRow, getBodyElements, getImageExtractor, getMasterPageManager, getOptions, getPictureData, getPictureDataByID, getStylesDocument, getXWPFAbstractNum, getXWPFFooter, getXWPFHeader, getXWPFNum, getXWPFStyle, isWordDocumentPartParsing, start, visitAnchor, visitBodyElements, visitCell, visitDrawing, visitFooterRef, visitHeaderRef, visitInline, visitParagraph, visitParagraphBody, visitTable, visitTableBody, visitTableCellBody, visitTableRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfMapper

public PdfMapper(org.apache.poi.xwpf.usermodel.XWPFDocument document,
                 OutputStream out,
                 PdfOptions options)
          throws Exception
Throws:
Exception
Method Detail

startVisitDocument

protected IITextContainer startVisitDocument()
                                      throws Exception
Description copied from class: XWPFDocumentVisitor
Start of visit document.

Specified by:
startVisitDocument in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Returns:
Throws:
Exception

endVisitDocument

protected void endVisitDocument()
                         throws Exception
Description copied from class: XWPFDocumentVisitor
End of visit document.

Specified by:
endVisitDocument in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

visitHeader

protected void visitHeader(org.apache.poi.xwpf.usermodel.XWPFHeader header,
                           org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef headerRef,
                           org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
                           StylableMasterPage masterPage)
                    throws Exception
Specified by:
visitHeader in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

visitFooter

protected void visitFooter(org.apache.poi.xwpf.usermodel.XWPFFooter footer,
                           org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtrRef footerRef,
                           org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr,
                           StylableMasterPage masterPage)
                    throws Exception
Specified by:
visitFooter in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

setActiveMasterPage

protected void setActiveMasterPage(StylableMasterPage masterPage)
Description copied from class: XWPFDocumentVisitor
Set active master page.

Specified by:
setActiveMasterPage in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>

createMasterPage

protected IXWPFMasterPage createMasterPage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
Description copied from class: XWPFDocumentVisitor
Create an instance of master page.

Specified by:
createMasterPage in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Returns:

startVisitParagraph

protected IITextContainer startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph docxParagraph,
                                              ListItemContext itemContext,
                                              IITextContainer pdfParentContainer)
                                       throws Exception
Specified by:
startVisitParagraph in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

endVisitParagraph

protected void endVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph docxParagraph,
                                 IITextContainer pdfParentContainer,
                                 IITextContainer pdfParagraphContainer)
                          throws Exception
Specified by:
endVisitParagraph in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

visitEmptyRun

protected void visitEmptyRun(IITextContainer pdfParagraphContainer)
                      throws Exception
Specified by:
visitEmptyRun in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

visitRun

protected void visitRun(org.apache.poi.xwpf.usermodel.XWPFRun docxRun,
                        boolean pageNumber,
                        String url,
                        IITextContainer pdfParagraphContainer)
                 throws Exception
Overrides:
visitRun in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

visitText

protected void visitText(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText docxText,
                         boolean pageNumber,
                         IITextContainer pdfParagraphContainer)
                  throws Exception
Specified by:
visitText in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

visitTab

protected void visitTab(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPTab tab,
                        IITextContainer pdfParagraphContainer)
                 throws Exception
Specified by:
visitTab in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

visitTabs

protected void visitTabs(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTabs tabs,
                         IITextContainer pdfParagraphContainer)
                  throws Exception
Specified by:
visitTabs in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

addNewLine

protected void addNewLine(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
                          IITextContainer pdfParagraphContainer)
                   throws Exception
Specified by:
addNewLine in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

visitBR

protected void visitBR(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
                       IITextContainer paragraphContainer)
                throws Exception
Overrides:
visitBR in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

pageBreak

protected void pageBreak()
                  throws Exception
Specified by:
pageBreak in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

visitBookmark

protected void visitBookmark(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark bookmark,
                             org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
                             IITextContainer paragraphContainer)
                      throws Exception
Specified by:
visitBookmark in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

startVisitTable

protected IITextContainer startVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
                                          float[] colWidths,
                                          IITextContainer pdfParentContainer)
                                   throws Exception
Specified by:
startVisitTable in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

endVisitTable

protected void endVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
                             IITextContainer pdfParentContainer,
                             IITextContainer pdfTableContainer)
                      throws Exception
Specified by:
endVisitTable in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

startVisitTableRow

protected void startVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
                                  IITextContainer tableContainer,
                                  int rowIndex,
                                  boolean headerRow)
                           throws Exception
Overrides:
startVisitTableRow in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

startVisitTableCell

protected IITextContainer startVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
                                              IITextContainer pdfTableContainer,
                                              boolean firstRow,
                                              boolean lastRow,
                                              boolean firstCol,
                                              boolean lastCol,
                                              List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells)
                                       throws Exception
Specified by:
startVisitTableCell in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception

endVisitTableCell

protected void endVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
                                 IITextContainer tableContainer,
                                 IITextContainer tableCellContainer)
Specified by:
endVisitTableCell in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>

visitPicture

protected void visitPicture(org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture picture,
                            Float offsetX,
                            org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromH.Enum relativeFromH,
                            Float offsetY,
                            org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromV.Enum relativeFromV,
                            org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STWrapText.Enum wrapText,
                            IITextContainer pdfParentContainer)
                     throws Exception
Specified by:
visitPicture in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
Throws:
Exception


Copyright © 2013. All rights reserved.