itextpdf 简介

官网:iText 7

*********************

简 介

iText 7 is the latest version of iText's powerful PDF Toolkit for
PDF generation, PDF programming, handling & manipulation, such as
digital signing and more
# itext7是itext最新的pdf处理工具,可以用来生成pdf文档、pdf编程、执行数字签名等其他操作

itext7-core:包含很多itext开发所需的包

<dependency><groupId>com.itextpdf</groupId><artifactId>itext7-core</artifactId><version>7.2.0</version><type>pom</type>
</dependency>

*********************

相关类与接口

PdfDocument

public class PdfDocument implements IEventDispatcher, Closeable {private static IPdfPageFactory pdfPageFactory = new PdfPageFactory();private PageSize defaultPageSize;      //pdf页面大小protected EventDispatcher eventDispatcher;protected PdfWriter writer;            //写入pdf文件protected PdfReader reader;            //读取pdf文件protected byte[] xmpMetadata;protected PdfCatalog catalog;protected PdfDictionary trailer;       //pdf字典:内有map,key为pdfName、value为pdf对象protected PdfDocumentInfo info;        //pdf文档信息:作者、标题、关键字、创建时间等protected PdfVersion pdfVersion;       //pdf版本private PdfString originalDocumentId;private PdfString modifiedDocumentId;final PdfXrefTable xref;protected FingerPrint fingerPrint;protected final StampingProperties properties;protected PdfStructTreeRoot structTreeRoot;protected int structParentIndex;protected boolean closeReader;protected boolean closeWriter;protected boolean isClosing;protected boolean closed;protected boolean flushUnusedObjects;private Map<PdfIndirectReference, PdfFont> documentFonts;private PdfFont defaultFont;protected TagStructureContext tagStructureContext;private SequenceId documentId;private LinkedHashMap<PdfPage, List<PdfLinkAnnotation>> linkAnnotations;Map<PdfIndirectReference, byte[]> serializedObjectsCache;MemoryLimitsAwareHandler memoryLimitsAwareHandler;private EncryptedEmbeddedStreamsHandler encryptedEmbeddedStreamsHandler;***********
构造方法public PdfDocument(PdfReader reader) {public PdfDocument(PdfReader reader, DocumentProperties properties) {public PdfDocument(PdfWriter writer) {public PdfDocument(PdfWriter writer, DocumentProperties properties) {public PdfDocument(PdfReader reader, PdfWriter writer) {public PdfDocument(PdfReader reader, PdfWriter writer, StampingProperties properties) {***********
XmpMetadataprotected void setXmpMetadata(byte[] xmpMetadata) {public void setXmpMetadata(XMPMeta xmpMeta, SerializeOptions serializeOptions) throws XMPException {public void setXmpMetadata(XMPMeta xmpMeta) throws XMPException {public byte[] getXmpMetadata() {public byte[] getXmpMetadata(boolean createNew) {***********
pdfObjectpublic PdfObject getPdfObject(int objNum) {public int getNumberOfPdfObjects() {***********
pagepublic PdfPage getPage(int pageNum) {public PdfPage getPage(PdfDictionary pageDictionary) {public PdfPage getFirstPage() {public PdfPage getLastPage() {public PdfPage addNewPage() {public PdfPage addNewPage(PageSize pageSize) {public PdfPage addNewPage(int index) {public PdfPage addNewPage(int index, PageSize pageSize) {public PdfPage addPage(PdfPage page) {public PdfPage addPage(int index, PdfPage page) {public int getNumberOfPages() {public int getPageNumber(PdfPage page) {public int getPageNumber(PdfDictionary pageDictionary) {public boolean movePage(PdfPage page, int insertBefore) {public void movePage(int pageNumber, int insertBefore) {public boolean removePage(PdfPage page) {public void removePage(int pageNum) {public List<PdfPage> copyPagesTo(int pageFrom, int pageTo, PdfDocument toDocument, int insertBeforePage) {public List<PdfPage> copyPagesTo(int pageFrom, int pageTo, PdfDocument toDocument, int insertBeforePage, IPdfPageExtraCopier copier) {public List<PdfPage> copyPagesTo(int pageFrom, int pageTo, PdfDocument toDocument) {public List<PdfPage> copyPagesTo(int pageFrom, int pageTo, PdfDocument toDocument, IPdfPageExtraCopier copier) {public List<PdfPage> copyPagesTo(List<Integer> pagesToCopy, PdfDocument toDocument, int insertBeforePage) {public List<PdfPage> copyPagesTo(List<Integer> pagesToCopy, PdfDocument toDocument, int insertBeforePage, IPdfPageExtraCopier copier) {public List<PdfPage> copyPagesTo(List<Integer> pagesToCopy, PdfDocument toDocument) {public List<PdfPage> copyPagesTo(List<Integer> pagesToCopy, PdfDocument toDocument, IPdfPageExtraCopier copier) {public PageSize getDefaultPageSize() {public void setDefaultPageSize(PageSize pageSize) {public void flushCopiedObjects(PdfDocument sourceDoc) {***********
fontpublic PdfFont getFont(PdfDictionary dictionary) {public PdfFont getDefaultFont() {public PdfFont addFont(PdfFont font) {public PdfFont findFont(String fontProgram, String encoding) {***********
文档信息public PdfDocumentInfo getDocumentInfo() {public PdfString getOriginalDocumentId() {public PdfString getModifiedDocumentId() {public long getDocumentId() {public SequenceId getDocumentIdWrapper() {***********
eventpublic void addEventHandler(String type, IEventHandler handler) {public void dispatchEvent(Event event) {public void dispatchEvent(Event event, boolean delayed) {public boolean hasEventHandler(String type) {public void removeEventHandler(String type, IEventHandler handler) {public void removeAllHandlers() {***********
reader、writerpublic PdfWriter getWriter() {public PdfReader getReader() {***********
其他操作public PdfCatalog getCatalog() {public String[] getPageLabels() {public PdfVersion getPdfVersion() {public PdfDictionary getTrailer() {public FingerPrint getFingerPrint() {public int getNextStructParentIndex() {public PdfStructTreeRoot getStructTreeRoot() {public TagStructureContext getTagStructureContext() {public PdfOutline getOutlines(boolean updateOutlines) {public boolean isClosed() {public boolean isTagged() {public boolean isAppendMode() {public boolean isCloseReader() {public boolean isCloseWriter() {public boolean isFlushUnusedObjects() {public void close() {public PdfDocument setTagged() {public void setCloseReader(boolean closeReader) {public void setCloseWriter(boolean closeWriter) {public void setFlushUnusedObjects(boolean flushUnusedObjects) {public boolean hasOutlines() {public void initializeOutlines() {public void addFileAttachment(String key, PdfFileSpec fs) {public void addAssociatedFile(String description, PdfFileSpec fs) {public PdfArray getAssociatedFiles() {public PdfEncryptedPayloadDocument getEncryptedPayloadDocument() {public void setEncryptedPayload(PdfFileSpec fs) {public PdfIndirectReference createNextIndirectReference() {public List<PdfIndirectReference> listIndirectReferences() {public void addNamedDestination(String key, PdfObject value) {public void addOutputIntent(PdfOutputIntent outputIntent) {public void checkIsoConformance(Object obj, IsoKey key) {public void checkIsoConformance(Object obj, IsoKey key, PdfResources resources, PdfStream contentStream) {public void checkShowTextIsoConformance(CanvasGraphicsState gState, PdfResources resources) {public void setUserProperties(boolean userProperties) {public boolean registerProduct(ProductData productData) {public void markStreamAsEmbeddedFile(PdfStream stream) {PdfXrefTable getXref() {boolean isDocumentFont(PdfIndirectReference indRef) {boolean hasAcroForm() {boolean doesStreamBelongToEmbeddedFile(PdfStream stream) {protected void initTagStructureContext() {protected void storeLinkAnnotation(PdfPage page, PdfLinkAnnotation annotation) {protected void checkIsoConformance() {protected void markObjectAsMustBeFlushed(PdfObject pdfObject) {protected void flushObject(PdfObject pdfObject, boolean canBeInObjStm) throws IOException {protected void open(PdfVersion newPdfVersion) {protected void addCustomMetadataExtensions(XMPMeta xmpMeta) {protected void updateXmpMetadata() {protected XMPMeta updateDefaultXmpMetadata() throws XMPException {protected Collection<PdfFont> getDocumentFonts() {protected void flushFonts() {protected void checkClosingStatus() {protected IPdfPageFactory getPageFactory() {protected void checkAndAddPage(PdfPage page) {protected void checkAndAddPage(int index, PdfPage page) {protected void tryInitTagStructure(PdfDictionary str) {private void tryFlushTagStructure(boolean isAppendMode) {private void updateValueInMarkInfoDict(PdfName key, PdfObject value) {private void removeUnusedWidgetsFromFields(PdfPage page) {private void copyLinkAnnotations(PdfDocument toDocument, Map<PdfPage, PdfPage> page2page) {private void copyOutlines(Set<PdfOutline> outlines, PdfDocument toDocument, Map<PdfPage, PdfPage> page2page) {private void getAllOutlinesToCopy(PdfOutline outline, Set<PdfOutline> outlinesToCopy) {private void cloneOutlines(Set<PdfOutline> outlinesToCopy, PdfOutline newParent, PdfOutline oldParent, Map<PdfPage, PdfPage> page2page, PdfDocument toDocument) {private void ensureTreeRootAddedToNames(PdfObject treeRoot, PdfName treeType) {private boolean writerHasEncryption() {private void updatePdfVersionFromCatalog() {private void readDocumentIds() {private void processReadingError(String errorMessage) {private static void overrideFullCompressionInWriterProperties(WriterProperties properties, boolean readerHasXrefStream) {private static boolean isXmpMetaHasProperty(XMPMeta xmpMeta, String schemaNS, String propName) throws XMPException {

Document

public class Document extends RootElement<Document> {*******
构造方法public Document(PdfDocument pdfDoc) {public Document(PdfDocument pdfDoc, PageSize pageSize) {public Document(PdfDocument pdfDoc, PageSize pageSize, boolean immediateFlush) {*******
普通方法public Document add(AreaBreak areaBreak) {public Document add(IBlockElement element) {public void setRenderer(DocumentRenderer documentRenderer) {public float getTopMargin() {public float getLeftMargin() {public float getRightMargin() {public float getBottomMargin() {public void setTopMargin(float topMargin) {public void setLeftMargin(float leftMargin) {public void setRightMargin(float rightMargin) {public void setBottomMargin(float bottomMargin) {public void setMargins(float topMargin, float rightMargin, float bottomMargin, float leftMargin) {public PdfDocument getPdfDocument() {public <T1> T1 getDefaultProperty(int property) {public Rectangle getPageEffectiveArea(PageSize pageSize) {public void flush() {public void relayout() {public void close() {if (this.rootRenderer != null) {this.rootRenderer.close();}this.pdfDocument.close();}protected RootRenderer ensureRootRendererNotNull() {protected void checkClosingStatus() {

RootElement

public abstract class RootElement<T extends IPropertyContainer> extends ElementPropertyContainer<T> implements Closeable {protected boolean immediateFlush = true;protected PdfDocument pdfDocument;     //pdf文档protected List<IElement> childElements = new ArrayList();protected PdfFont defaultFont;protected FontProvider defaultFontProvider;protected ISplitCharacters defaultSplitCharacters;protected RootRenderer rootRenderer;private LayoutTaggingHelper defaultLayoutTaggingHelper;public RootElement() {}public T add(IBlockElement element) {public T add(Image image) {public FontProvider getFontProvider() {public void setFontProvider(FontProvider fontProvider) {public void setProperty(int property, Object value) {public <T1> T1 getProperty(int property) {public boolean hasProperty(int property) {public boolean hasOwnProperty(int property) {public <T1> T1 getOwnProperty(int property) {public void deleteOwnProperty(int property) {public <T1> T1 getDefaultProperty(int property) {public RootRenderer getRenderer() {public T showTextAligned(String text, float x, float y, TextAlignment textAlign) {public T showTextAligned(String text, float x, float y, TextAlignment textAlign, float angle) {public T showTextAligned(String text, float x, float y, TextAlignment textAlign, VerticalAlignment vertAlign, float angle) {public T showTextAligned(Paragraph p, float x, float y, TextAlignment textAlign) {public T showTextAligned(Paragraph p, float x, float y, TextAlignment textAlign, VerticalAlignment vertAlign) {public T showTextAligned(Paragraph p, float x, float y, int pageNumber, TextAlignment textAlign, VerticalAlignment vertAlign, float radAngle) {public T showTextAlignedKerned(String text, float x, float y, TextAlignment textAlign, VerticalAlignment vertAlign, float radAngle) {protected abstract RootRenderer ensureRootRendererNotNull();protected void createAndAddRendererSubTree(IElement element) {private LayoutTaggingHelper initTaggingHelperIfNeeded() {private T addElement(IElement element) {

ElementPropertyContainer

public abstract class ElementPropertyContainer<T extends IPropertyContainer> extends AbstractIdentifiableElement implements IPropertyContainer {protected Map<Integer, Object> properties = new HashMap();public ElementPropertyContainer() {}*********
propertypublic boolean hasProperty(int property) {public <T1> T1 getProperty(int property) {public void setProperty(int property, Object value) {public boolean hasOwnProperty(int property) {public <T1> T1 getOwnProperty(int property) {public void deleteOwnProperty(int property) {public <T1> T1 getDefaultProperty(int property) {*********
positionpublic T setRelativePosition(float left, float top, float right, float bottom) {public T setFixedPosition(float left, float bottom, float width) {public T setFixedPosition(float left, float bottom, UnitValue width) {public T setFixedPosition(int pageNumber, float left, float bottom, float width) {public T setFixedPosition(int pageNumber, float left, float bottom, UnitValue width) {*********
fontpublic T setFont(PdfFont font) {public T setFontFamily(String... fontFamilyNames) {public T setFontFamily(List<String> fontFamilyNames) {public T setFontColor(Color fontColor) {public T setFontColor(Color fontColor, float opacity) {public T setFontSize(float fontSize) {public T setFontKerning(FontKerning fontKerning) {public T setFontScript(UnicodeScript script) {public T setBold() {         //字体加粗public T setItalic() {       //字体倾斜*********
backgroundpublic T setBackgroundColor(Color backgroundColor) {public T setBackgroundColor(Color backgroundColor, float opacity) {public T setBackgroundColor(Color backgroundColor, float extraLeft, float extraTop, float extraRight, float extraBottom) {public T setBackgroundColor(Color backgroundColor, float opacity, float extraLeft, float extraTop, float extraRight, float extraBottom) {public T setBackgroundImage(BackgroundImage image) {public T setBackgroundImage(List<BackgroundImage> imagesList) {*********
borderpublic T setBorder(Border border) {public T setBorderTop(Border border) {public T setBorderLeft(Border border) {public T setBorderRight(Border border) {public T setBorderBottom(Border border) {public T setBorderRadius(BorderRadius borderRadius) {public T setBorderTopLeftRadius(BorderRadius borderRadius) {public T setBorderTopRightRadius(BorderRadius borderRadius) {public T setBorderBottomRightRadius(BorderRadius borderRadius) {public T setBorderBottomLeftRadius(BorderRadius borderRadius) {public T setStrokeColor(Color strokeColor) {public Color getStrokeColor() {      //边框颜色public T setStrokeWidth(float strokeWidth) {public Float getStrokeWidth() {      //边框宽度 *********
underlinepublic T setUnderline() {    //文本加下划线public T setLineThrough() {  //文本加删除线public T setUnderline(float thickness, float yPosition) {public T setUnderline(Color color, float thickness, float thicknessMul, float yPosition, float yPositionMul, int lineCapStyle) {public T setUnderline(Color color, float opacity, float thickness, float thicknessMul, float yPosition, float yPositionMul, int lineCapStyle) {*********
其余操作public T setHorizontalAlignment(HorizontalAlignment horizontalAlignment) {public T setTextAlignment(TextAlignment alignment) {  //文本对齐方式public T setCharacterSpacing(float charSpacing) {public T setWordSpacing(float wordSpacing) {          //单词间距public T setTextRenderingMode(int textRenderingMode) {public Integer getTextRenderingMode() {               //文本渲染方式public T setSplitCharacters(ISplitCharacters splitCharacters) {public ISplitCharacters getSplitCharacters() {        //文本分隔符public T setBaseDirection(BaseDirection baseDirection) {public T setDestination(String destination) {public T setOpacity(Float opacity) {                            //文本透明度public T setHyphenation(HyphenationConfig hyphenationConfig) {  //设置连字符

AreaBreak:区域间隔符

public class AreaBreak extends AbstractElement<AreaBreak> {protected PageSize pageSize;public AreaBreak() {public AreaBreak(AreaBreakType areaBreakType) {public AreaBreak(PageSize pageSize) {public PageSize getPageSize() {public void setPageSize(PageSize pageSize) {public AreaBreakType getType() {return (AreaBreakType)this.getProperty(2);}protected IRenderer makeNewRenderer() {

AreaBreakType

public enum AreaBreakType {NEXT_AREA,   //下一个区域NEXT_PAGE,   //新建一页LAST_PAGE;   //最后一页private AreaBreakType() {}
}

AbstractElement

public abstract class AbstractElement<T extends IElement> extends ElementPropertyContainer<T> implements IAbstractElement {protected IRenderer nextRenderer;protected List<IElement> childElements = new ArrayList();protected Set<Style> styles;public AbstractElement() {}public IRenderer createRendererSubTree() {public void setNextRenderer(IRenderer renderer) {public IRenderer getRenderer() {public T addStyle(Style style) {public T setAction(PdfAction action) {public T setPageNumber(int pageNumber) {public boolean isEmpty() {public List<IElement> getChildren() {public boolean hasProperty(int property) {public <T1> T1 getProperty(int property) {protected abstract IRenderer makeNewRenderer();
}

IBlockElement:接口实现类如下

public interface IBlockElement extends IAbstractElement {
}

BlockElement

public abstract class BlockElement<T extends IElement> extends AbstractElement<T> implements IAccessibleElement, IBlockElement {protected BlockElement() {}public <T1> T1 getDefaultProperty(int property) {switch(property) {case 103:case 104:return OverflowPropertyValue.FIT;default:return super.getDefaultProperty(property);}}***********
内边距public T setPaddingLeft(float value) {public T setPaddingRight(float value) {public T setPaddingTop(float value) {public T setPaddingBottom(float value) {public UnitValue getPaddingLeft() {public UnitValue getPaddingRight() {public UnitValue getPaddingTop() {public UnitValue getPaddingBottom() {public T setPadding(float commonPadding) {public T setPaddings(float paddingTop, float paddingRight, float paddingBottom, float paddingLeft) {***********
页边距public T setMarginLeft(float value) {public T setMarginRight(float value) {public T setMarginTop(float value) {public T setMarginBottom(float value) {public UnitValue getMarginLeft() {public UnitValue getMarginRight() {public UnitValue getMarginTop() {public UnitValue getMarginBottom() {public T setMargin(float commonMargin) {public T setMargins(float marginTop, float marginRight, float marginBottom, float marginLeft) {***********
宽度、高度public T setWidth(float width) {public T setWidth(UnitValue width) {public UnitValue getWidth() {public T setHeight(UnitValue height) {public T setHeight(float height) {public UnitValue getHeight() {public T setMaxHeight(float maxHeight) {public T setMaxHeight(UnitValue maxHeight) {public T setMinHeight(UnitValue minHeight) {public T setMinHeight(float minHeight) {public T setMaxWidth(UnitValue maxWidth) {public T setMaxWidth(float maxWidth) {public T setMinWidth(UnitValue minWidth) {public T setMinWidth(float minWidth) {***********
其余操作public T setVerticalAlignment(VerticalAlignment verticalAlignment) {public T setSpacingRatio(float ratio) {public Boolean isKeepTogether() {public T setKeepTogether(boolean keepTogether) {public Boolean isKeepWithNext() {public T setKeepWithNext(boolean keepWithNext) {public T setRotationAngle(float angleInRadians) {public T setRotationAngle(double angleInRadians) {

Cell:单元格

public class Cell extends BlockElement<Cell> {private static final Border DEFAULT_BORDER = new SolidBorder(0.5F);private int row;private int col;private int rowspan;private int colspan;protected DefaultAccessibilityProperties tagProperties;**********
构造方法public Cell(int rowspan, int colspan) {public Cell() {**********
普通方法public int getRow() {public int getCol() {public int getRowspan() {public int getColspan() {public Cell add(IBlockElement element) {public Cell add(Image element) {public IRenderer getRenderer() {public <T1> T1 getDefaultProperty(int property) {public AccessibilityProperties getAccessibilityProperties() {public String toString() {public Cell clone(boolean includeContent) {protected IRenderer makeNewRenderer() {protected Cell updateCellIndexes(int row, int col, int numberOfColumns) {

Div

public class Div extends BlockElement<Div> {protected DefaultAccessibilityProperties tagProperties;public Div() {}public Div add(IBlockElement element) {public Div add(Image element) {public Div add(AreaBreak areaBreak) {public AccessibilityProperties getAccessibilityProperties() {public Div setFillAvailableArea(boolean fillArea) {public Div setFillAvailableAreaOnSplit(boolean fillAreaOnSplit) {protected IRenderer makeNewRenderer() {

FlexContainer:default方法,不可直接使用

class FlexContainer extends Div {public FlexContainer() {}protected IRenderer makeNewRenderer() {return new FlexContainerRenderer(this);}
}

LineSeparator:行分隔符

public class LineSeparator extends BlockElement<LineSeparator> {protected DefaultAccessibilityProperties tagProperties;public LineSeparator(ILineDrawer lineDrawer) {this.setProperty(35, lineDrawer);}public AccessibilityProperties getAccessibilityProperties() {if (this.tagProperties == null) {this.tagProperties = new DefaultAccessibilityProperties("Artifact");}return this.tagProperties;}protected IRenderer makeNewRenderer() {return new LineSeparatorRenderer(this);}
}

List

public class List extends BlockElement<List> {public static final String DEFAULT_LIST_SYMBOL = "- ";protected DefaultAccessibilityProperties tagProperties;public List() {}public List(ListNumberingType listNumberingType) {this.setListSymbol(listNumberingType);}public List add(ListItem listItem) {public List add(String text) {public List setListSymbol(String symbol) {public List setListSymbol(Text text) {public List setListSymbol(Image image) {public List setListSymbol(ListNumberingType listNumberingType) {public List setListSymbolAlignment(ListSymbolAlignment alignment) {public List setItemStartIndex(int start) {public List setSymbolIndent(float symbolIndent) {public void setPreSymbolText(String preSymbolText) {public void setPostSymbolText(String postSymbolText) {public Float getSymbolIndent() {public String getPreSymbolText() {public String getPostSymbolText() {public AccessibilityProperties getAccessibilityProperties() {public <T1> T1 getDefaultProperty(int property) {protected IRenderer makeNewRenderer() {

ListItem

public class ListItem extends Div {public ListItem() {public ListItem(String text) {public ListItem(Image image) {public ListItem setListSymbol(String symbol) {public ListItem setListSymbol(Text text) {public ListItem setListSymbol(Image image) {public ListItem setListSymbol(ListNumberingType listNumberingType) {public ListItem setListSymbolOrdinalValue(int ordinalValue) {public <T1> T1 getDefaultProperty(int property) {public AccessibilityProperties getAccessibilityProperties() {protected IRenderer makeNewRenderer() {

Paragraph

public class Paragraph extends BlockElement<Paragraph> {protected DefaultAccessibilityProperties tagProperties;public Paragraph() {public Paragraph(String text) {public Paragraph(Text text) {public Paragraph add(String text) {public Paragraph add(ILeafElement element) {public Paragraph add(IBlockElement element) {public <T2 extends ILeafElement> Paragraph addAll(List<T2> elements) {public Paragraph addTabStops(TabStop... tabStops) {public Paragraph addTabStops(List<TabStop> tabStops) {public Paragraph removeTabStop(float tabStopPosition) {public Paragraph setFirstLineIndent(float indent) {public Paragraph setOrphansControl(ParagraphOrphansControl orphansControl) {public Paragraph setWidowsControl(ParagraphWidowsControl widowsControl) {public Paragraph setFixedLeading(float leading) {public Paragraph setMultipliedLeading(float leading) {public <T1> T1 getDefaultProperty(int property) {public AccessibilityProperties getAccessibilityProperties() {protected IRenderer makeNewRenderer() {private void addTabStopsAsProperty(List<TabStop> newTabStops) {

Table

public class Table extends BlockElement<Table> implements ILargeElement {protected DefaultAccessibilityProperties tagProperties;private List<Cell[]> rows;private UnitValue[] columnWidths;private int currentColumn;private int currentRow;private Table header;private Table footer;private boolean skipFirstHeader;private boolean skipLastFooter;private boolean isComplete;private List<Table.RowRange> lastAddedRowGroups;private int rowWindowStart;private Document document;private Cell[] lastAddedRow;private Div caption;*********
构造方法public Table(int numColumns) {public Table(UnitValue[] columnWidths) {public Table(float[] pointColumnWidths) {public Table(int numColumns, boolean largeTable) {public Table(float[] columnWidths, boolean largeTable) {public Table(UnitValue[] columnWidths, boolean largeTable) {*********
headerCellpublic Table addHeaderCell(Image image) {public Table addHeaderCell(String content) {public Table addHeaderCell(Cell headerCell) {public <T extends IElement> Table addHeaderCell(BlockElement<T> blockElement) {public Table getHeader() {public boolean isSkipFirstHeader() {public Table setSkipFirstHeader(boolean skipFirstHeader) {*********
cellpublic Table addCell(Cell cell) {public Table addCell(Image image) {public Table addCell(String content) {public <T extends IElement> Table addCell(BlockElement<T> blockElement) {public Cell getCell(int row, int column) {*********
footerCellpublic Table addFooterCell(Cell footerCell) {public Table addFooterCell(Image image) {public Table addFooterCell(String content) {public <T extends IElement> Table addFooterCell(BlockElement<T> blockElement) {public Table getFooter() {public boolean isSkipLastFooter() {public Table setSkipLastFooter(boolean skipLastFooter) {*********
其余操作public Table setCaption(Div caption) {public Table setCaption(Div caption, CaptionSide side) {public Div getCaption() {public IRenderer createRendererSubTree() {public IRenderer getRenderer() {public void complete() {public boolean isComplete() {public void flush() {public void flushContent() {public void setDocument(Document document) {public Table setExtendBottomRow(boolean isExtended) {public Table setExtendBottomRowOnSplit(boolean isExtended) {public Table setBorderCollapse(BorderCollapsePropertyValue collapsePropertyValue) {public Table setHorizontalBorderSpacing(float spacing) {public Table setVerticalBorderSpacing(float spacing) {public List<Border> getLastRowBottomBorder() {public AccessibilityProperties getAccessibilityProperties() {public Table startNewRow() {public Table setFixedLayout() {public Table setAutoLayout() {public Table useAllAvailableWidth() {public UnitValue getColumnWidth(int column) {public int getNumberOfColumns() {public int getNumberOfRows() {protected IRenderer makeNewRenderer() {protected List<Table.RowRange> getRowGroups() {private void initializeRows() {this.rows = new ArrayList();this.currentColumn = -1;}private void ensureHeaderIsInitialized() {private void ensureFooterIsInitialized() {private void ensureCaptionPropertiesAreSet() {private void initializeLargeTable(boolean largeTable) {private static UnitValue[] normalizeColumnWidths(int numberOfColumns) {private static UnitValue[] normalizeColumnWidths(float[] pointColumnWidths) {private static UnitValue[] normalizeColumnWidths(UnitValue[] unitColumnWidths) {private boolean cellBelongsToAnyRowGroup(Cell cell, List<Table.RowRange> rowGroups) {**********
内部类:RowRangepublic static class RowRange {int startRow;int finishRow;public RowRange(int startRow, int finishRow) {public int getStartRow() {public int getFinishRow() {

itextpdf 简介相关推荐

  1. java itextpdf 5 基础知识

    一.Itext简介 1.API地址:javadoc/index.html 如 D:/MyJAR/原JAR包/PDF/itext-5.5.3/itextpdf-5.5.3-javadoc/index.h ...

  2. java web报表,jasperReport使用简介

    转载请注明出处!!! jasperReport使用简介 需求简介:java web需生成报表,然后打印出来.报表用的jasperReport,编辑报表的可视化工具用的iReport.其次,web的打印 ...

  3. etcd 笔记(01)— etcd 简介、特点、应用场景、常用术语、分布式 CAP 理论、分布式原理

    1. etcd 简介 etcd 官网定义: A highly-available key value store for shared configuration and service discov ...

  4. Docker学习(一)-----Docker简介与安装

    一.Docker介绍 1.1什么是docker Docker是一个开源的应用容器引擎,基于Go语言并遵从Apache2.0协议开源 Docker可以让开发者打包他们的应用以及依赖包到一个轻量级,可移植 ...

  5. 【Spring】框架简介

    [Spring]框架简介 Spring是什么 Spring是分层的Java SE/EE应用full-stack轻量级开源框架,以IOC(Inverse Of Control:反转控制)和AOP(Asp ...

  6. TensorRT简介

    TensorRT 介绍 引用:https://arleyzhang.github.io/articles/7f4b25ce/ 1 简介 TensorRT是一个高性能的深度学习推理(Inference) ...

  7. 谷粒商城学习笔记——第一期:项目简介

    一.项目简介 1. 项目背景 市面上有5种常见的电商模式 B2B.B2C.C2B.C2C.O2O B2B 模式(Business to Business),是指商家和商家建立的商业关系.如阿里巴巴 B ...

  8. 通俗易懂的Go协程的引入及GMP模型简介

    本文根据Golang深入理解GPM模型加之自己的理解整理而来 Go协程的引入及GMP模型 一.协程的由来 1. 单进程操作系统 2. 多线程/多进程操作系统 3. 引入协程 二.golang对协程的处 ...

  9. Linux 交叉编译简介

    Linux 交叉编译简介 主机,目标,交叉编译器 主机与目标 编译器是将源代码转换为可执行代码的程序.像所有程序一样,编译器运行在特定类型的计算机上,输出的新程序也运行在特定类型的计算机上. 运行编译 ...

  10. TVM Operator Inventory (TOPI)简介

    TOPI简介 这是 TVM Operator Inventory (TOPI) 的介绍.TOPI 提供了比 TVM 具有更高抽象的 numpy 风格的,通用操作和调度.TOPI 如何在 TVM 中,编 ...

最新文章

  1. 资源 | Yann LeCun最新演讲:大脑是如何高效学习的?(附PPT+视频)
  2. cityhash 算法的使用
  3. SAP为企业不同员工带来了什么?
  4. 卷积为什么如此强大?一文全解深度学习中的卷积
  5. UESTC_秋实大哥下棋 2015 UESTC Training for Data StructuresProblem I
  6. maya批量操作mel_MAYA对多个模型使用当前设置批量渲染并保存图片的MEL脚本
  7. Markdown+Pandoc→HTML幻灯片速成
  8. c++编写算法判断二叉树是否为完全二叉树_字节面试官:连这90道LeetCode算法题都不会也来面试?...
  9. Random()种子数
  10. 用例不全,质量如何保证?
  11. 收集一些非常好用常用的用户函数。分享给大家参考。
  12. 如何干净的卸载Mac版VMware Fusion
  13. PostgreSQL 数据库跨版本升级常用方案
  14. 地图原点半径距离经纬度计算
  15. 设计模式之接口隔离原则
  16. Android基础知识复习之打开照相机拍照并获取照片
  17. 【学习笔记】2022.8.7
  18. 利用Python进行数据分析之金融数据的统计分析
  19. 用户信息管理的功能开发
  20. Java SE 学习记录——进阶版11

热门文章

  1. 计算机自动隐藏桌面图标,AutoHideDesktopIcons-定时、自动隐藏桌面图标,让电脑更清爽!...
  2. 生鲜网超MySQL_天天生鲜项目实战-思路 数据库设计
  3. Android 圆形颜色拾取器代码,android 颜色拾取控件 ColorPickerDialog
  4. 软件需求分析报告模板
  5. QT音乐播放器(接入网易云API)
  6. 【CSDN软件工程师能力认证学习精选】Python网络编程之初识
  7. Python 微信自动化工具开发系列03_自动向微信好友发送信息和文件(2022年10月可用)
  8. mysql varbinary类型_mysql中varbinary、binary、char、varchar异同
  9. 终于注册csdn博客了!
  10. 【MATLAB】MATLAB基本运算