Class HtmlDocument
java.lang.Object
com.itextpdf.commons.actions.sequence.AbstractIdentifiableElement
com.itextpdf.layout.ElementPropertyContainer
com.itextpdf.layout.RootElement
com.itextpdf.layout.Document
com.itextpdf.html2pdf.attach.impl.layout.HtmlDocument
- All Implemented Interfaces:
-
com.itextpdf.layout.IPropertyContainer,Closeable,AutoCloseable
public class HtmlDocument extends com.itextpdf.layout.Document
This class is a wrapper on
Document, which is the default root element while creating a self-sufficient PDF. It contains several html-specific customizations.
-
Field Summary
Fields inherited from class com.itextpdf.layout.RootElement
childElements, defaultFont, defaultFontProvider, defaultSplitCharacters, immediateFlush, pdfDocument, rootRendererFields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties -
Constructor Summary
ConstructorsConstructorDescriptionHtmlDocument(com.itextpdf.kernel.pdf.PdfDocument pdfDoc, com.itextpdf.kernel.geom.PageSize pageSize, boolean immediateFlush) Creates a html document from aPdfDocumentwith a manually setPageSize. -
Method Summary
Methods inherited from class com.itextpdf.layout.Document
add, add, checkClosingStatus, close, ensureRootRendererNotNull, flush, getBottomMargin, getDefaultProperty, getLeftMargin, getPageEffectiveArea, getPdfDocument, getRightMargin, getTopMargin, setBottomMargin, setLeftMargin, setMargins, setRenderer, setRightMargin, setTopMarginMethods inherited from class com.itextpdf.layout.RootElement
add, createAndAddRendererSubTree, deleteOwnProperty, ensureRootTagIsCreated, getFontProvider, getOwnProperty, getProperty, getRenderer, hasOwnProperty, hasProperty, setFontProvider, setProperty, showTextAligned, showTextAligned, showTextAligned, showTextAligned, showTextAligned, showTextAligned, showTextAlignedKernedMethods inherited from class com.itextpdf.layout.ElementPropertyContainer
getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getTransparentStrokeColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDashPattern, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalic
-
Constructor Details
-
HtmlDocument
public HtmlDocument(com.itextpdf.kernel.pdf.PdfDocument pdfDoc, com.itextpdf.kernel.geom.PageSize pageSize, boolean immediateFlush) Creates a html document from aPdfDocumentwith a manually setPageSize.- Parameters:
-
pdfDoc- the in-memory representation of the PDF document -
pageSize- the page size -
immediateFlush- if true, write pages and page-related instructions to thePdfDocumentas soon as possible.
-
-
Method Details
-
relayout
public void relayout()- Overrides:
-
relayoutin classcom.itextpdf.layout.Document
-