public class PdfMapper extends XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>
document, options, processingTotalPageCountField, stylesDocument, totalPageFieldUsed, WORD_MEDIA| Constructor and Description |
|---|
PdfMapper(org.apache.poi.xwpf.usermodel.XWPFDocument document,
java.io.OutputStream out,
PdfOptions options,
java.lang.Integer expectedPageCount) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addNewLine(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
IITextContainer pdfParagraphContainer) |
StylableMasterPage |
createMasterPage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr) |
protected void |
endVisitDocument() |
protected void |
endVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph docxParagraph,
IITextContainer pdfParentContainer,
IITextContainer pdfParagraphContainer) |
protected void |
endVisitSDT(org.apache.poi.xwpf.usermodel.XWPFSDT contents,
IITextContainer container,
IITextContainer sdtContainer) |
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) |
int |
getPageCount() |
protected boolean |
hasTextStyles(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRPr rPr)
Strike-through is part of the
Font definition. |
protected void |
pageBreak() |
void |
setActiveMasterPage(StylableMasterPage masterPage) |
protected IITextContainer |
startVisitDocument() |
protected IITextContainer |
startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph docxParagraph,
ListItemContext itemContext,
IITextContainer pdfParentContainer) |
protected IITextContainer |
startVisitSDT(org.apache.poi.xwpf.usermodel.XWPFSDT contents,
IITextContainer container) |
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,
java.util.List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells) |
protected void |
startVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
IITextContainer tableContainer,
int rowIndex,
boolean headerRow) |
boolean |
useTotalPageField() |
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,
java.lang.Float offsetX,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromH.Enum relativeFromH,
java.lang.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,
java.lang.String url,
IITextContainer pdfParagraphContainer) |
protected void |
visitSDTBody(org.apache.poi.xwpf.usermodel.XWPFSDT contents,
IITextContainer sdtContainer) |
protected void |
visitStyleText(org.apache.poi.xwpf.usermodel.XWPFRun run,
java.lang.String text,
IITextContainer paragraphContainer,
boolean pageNumber) |
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) |
protected void |
visitVmlPicture(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPicture picture,
IITextContainer pdfParentContainer) |
protected void |
visitVmlPicture(org.apache.poi.xwpf.usermodel.XWPFPictureData pictureData,
java.lang.String style,
IITextContainer pdfParentContainer) |
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, visitSDT, visitTable, visitTableBody, visitTableCellBody, visitTableRowpublic PdfMapper(org.apache.poi.xwpf.usermodel.XWPFDocument document,
java.io.OutputStream out,
PdfOptions options,
java.lang.Integer expectedPageCount)
throws java.lang.Exception
java.lang.Exceptionprotected IITextContainer startVisitDocument() throws java.lang.Exception
startVisitDocument in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void endVisitDocument()
throws java.lang.Exception
endVisitDocument in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected IITextContainer startVisitSDT(org.apache.poi.xwpf.usermodel.XWPFSDT contents, IITextContainer container)
startVisitSDT in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>protected void endVisitSDT(org.apache.poi.xwpf.usermodel.XWPFSDT contents,
IITextContainer container,
IITextContainer sdtContainer)
endVisitSDT in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>protected void visitSDTBody(org.apache.poi.xwpf.usermodel.XWPFSDT contents,
IITextContainer sdtContainer)
throws java.lang.Exception
visitSDTBody in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected 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 java.lang.Exception
visitHeader in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected 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 java.lang.Exception
visitFooter in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionpublic void setActiveMasterPage(StylableMasterPage masterPage)
public StylableMasterPage createMasterPage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
protected IITextContainer startVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph docxParagraph, ListItemContext itemContext, IITextContainer pdfParentContainer) throws java.lang.Exception
startVisitParagraph in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void endVisitParagraph(org.apache.poi.xwpf.usermodel.XWPFParagraph docxParagraph,
IITextContainer pdfParentContainer,
IITextContainer pdfParagraphContainer)
throws java.lang.Exception
endVisitParagraph in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void visitEmptyRun(IITextContainer pdfParagraphContainer) throws java.lang.Exception
visitEmptyRun in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void visitRun(org.apache.poi.xwpf.usermodel.XWPFRun docxRun,
boolean pageNumber,
java.lang.String url,
IITextContainer pdfParagraphContainer)
throws java.lang.Exception
visitRun in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected boolean hasTextStyles(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRPr rPr)
Font definition. Vertical align is handled by this class. Therefore, they
do not need any special treatment and we exclude them by overriding this method of the superclass.hasTextStyles in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>protected void visitStyleText(org.apache.poi.xwpf.usermodel.XWPFRun run,
java.lang.String text,
IITextContainer paragraphContainer,
boolean pageNumber)
throws java.lang.Exception
visitStyleText in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void visitText(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText docxText,
boolean pageNumber,
IITextContainer pdfParagraphContainer)
throws java.lang.Exception
visitText in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void visitTab(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPTab tab,
IITextContainer pdfParagraphContainer)
throws java.lang.Exception
visitTab in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void visitTabs(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTabs tabs,
IITextContainer pdfParagraphContainer)
throws java.lang.Exception
visitTabs in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void addNewLine(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
IITextContainer pdfParagraphContainer)
throws java.lang.Exception
addNewLine in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void visitBR(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBr br,
IITextContainer paragraphContainer)
throws java.lang.Exception
visitBR in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void pageBreak()
throws java.lang.Exception
pageBreak in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void visitBookmark(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark bookmark,
org.apache.poi.xwpf.usermodel.XWPFParagraph paragraph,
IITextContainer paragraphContainer)
throws java.lang.Exception
visitBookmark in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected IITextContainer startVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table, float[] colWidths, IITextContainer pdfParentContainer) throws java.lang.Exception
startVisitTable in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void endVisitTable(org.apache.poi.xwpf.usermodel.XWPFTable table,
IITextContainer pdfParentContainer,
IITextContainer pdfTableContainer)
throws java.lang.Exception
endVisitTable in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void startVisitTableRow(org.apache.poi.xwpf.usermodel.XWPFTableRow row,
IITextContainer tableContainer,
int rowIndex,
boolean headerRow)
throws java.lang.Exception
startVisitTableRow in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected IITextContainer startVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell, IITextContainer pdfTableContainer, boolean firstRow, boolean lastRow, boolean firstCol, boolean lastCol, java.util.List<org.apache.poi.xwpf.usermodel.XWPFTableCell> vMergeCells) throws java.lang.Exception
startVisitTableCell in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void endVisitTableCell(org.apache.poi.xwpf.usermodel.XWPFTableCell cell,
IITextContainer tableContainer,
IITextContainer tableCellContainer)
endVisitTableCell in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>protected void visitVmlPicture(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPicture picture,
IITextContainer pdfParentContainer)
throws java.lang.Exception
visitVmlPicture in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionprotected void visitVmlPicture(org.apache.poi.xwpf.usermodel.XWPFPictureData pictureData,
java.lang.String style,
IITextContainer pdfParentContainer)
protected void visitPicture(org.openxmlformats.schemas.drawingml.x2006.picture.CTPicture picture,
java.lang.Float offsetX,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromH.Enum relativeFromH,
java.lang.Float offsetY,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STRelFromV.Enum relativeFromV,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.STWrapText.Enum wrapText,
IITextContainer pdfParentContainer)
throws java.lang.Exception
visitPicture in class XWPFDocumentVisitor<IITextContainer,PdfOptions,StylableMasterPage>java.lang.Exceptionpublic int getPageCount()
public boolean useTotalPageField()
Copyright © 2019. All Rights Reserved.