Package org.xhtmlrenderer.pdf
Class ITextRenderer
java.lang.Object
org.xhtmlrenderer.pdf.ITextRenderer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Document
private final float
private PDFCreationListener
private final ITextOutputDevice
private com.lowagie.text.Document
private PDFEncryption
private Character
private Integer
private BlockBox
private final SharedContext
private boolean
private com.lowagie.text.pdf.PdfWriter
static final int
static final float
private final char[]
-
Constructor Summary
ConstructorsConstructorDescriptionITextRenderer
(float dotsPerPoint, int dotsPerPixel) ITextRenderer
(float dotsPerPoint, int dotsPerPixel, FontResolver fontResolver) ITextRenderer
(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice) ITextRenderer
(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, FontResolver fontResolver) ITextRenderer
(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent) ITextRenderer
(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent, FontResolver fontResolver) ITextRenderer
(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent, FontResolver fontResolver, ReplacedElementFactory replacedElementFactory, TextRenderer textRenderer) ITextRenderer
(File file) ITextRenderer
(FontResolver fontResolver) ITextRenderer
(ITextOutputDevice outputDevice, ITextUserAgent userAgent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
createPDF
(OutputStream os, boolean finish) void
createPDF
(OutputStream os, boolean finish, int initialPageNo) NOTE: Caller is responsible for cleaning up the OutputStream if something goes wrong.byte[]
void
createPDF
(Document source, OutputStream os) private String
createXPacket
(String metadata) void
exportText
(Writer writer) findPagePositionsByID
(Pattern pattern) void
private void
private void
private void
firePreWrite
(int pageCount) static ITextRenderer
fromString
(String content) static ITextRenderer
fromString
(String content, String baseUrl) static ITextRenderer
float
private static Element
getFirstChildElement
(Element element) private Rectangle
char
int
com.lowagie.text.pdf.PdfWriter
boolean
void
layout()
private Document
loadDocument
(String uri) private LayoutContext
private RenderingContext
private void
paintPage
(RenderingContext c, com.lowagie.text.pdf.PdfWriter writer, PageBox page) private Document
private void
provideMetadataToPage
(com.lowagie.text.pdf.PdfWriter writer, PageBox page) private void
setDidValues
(com.lowagie.text.Document doc) void
setDocument
(Document doc) void
setDocument
(Document doc, String url) private void
setDocument
(Document doc, String url, NamespaceHandler nsh) Deprecated.final void
setDocumentFromString
(String content) final void
setDocumentFromString
(String content, String baseUrl) void
setListener
(PDFCreationListener listener) void
setPDFEncryption
(PDFEncryption pdfEncryption) void
setPDFVersion
(char _v) void
setPDFXConformance
(int pdfXConformance) void
setTimeouted
(boolean timeouted) private String
stringifyMetadata
(Element element) void
void
writeNextDocument
(int initialPageNo) private void
writePDF
(List<PageBox> pages, RenderingContext c, com.lowagie.text.Rectangle firstPageSize, com.lowagie.text.Document doc, com.lowagie.text.pdf.PdfWriter writer)
-
Field Details
-
DEFAULT_DOTS_PER_POINT
public static final float DEFAULT_DOTS_PER_POINT- See Also:
-
DEFAULT_DOTS_PER_PIXEL
public static final int DEFAULT_DOTS_PER_PIXEL- See Also:
-
_outputDevice
-
_doc
-
_root
-
_dotsPerPoint
private final float _dotsPerPoint -
_pdfDoc
private com.lowagie.text.Document _pdfDoc -
_writer
private com.lowagie.text.pdf.PdfWriter _writer -
_pdfEncryption
-
_pdfVersion
-
validPdfVersions
private final char[] validPdfVersions -
_pdfXConformance
-
_listener
-
_timeouted
private boolean _timeouted
-
-
Constructor Details
-
ITextRenderer
- Throws:
IOException
-
ITextRenderer
public ITextRenderer() -
ITextRenderer
-
ITextRenderer
public ITextRenderer(float dotsPerPoint, int dotsPerPixel) -
ITextRenderer
-
ITextRenderer
-
ITextRenderer
-
ITextRenderer
public ITextRenderer(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, FontResolver fontResolver) -
ITextRenderer
public ITextRenderer(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent) -
ITextRenderer
public ITextRenderer(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent, FontResolver fontResolver) -
ITextRenderer
public ITextRenderer(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent, FontResolver fontResolver, ReplacedElementFactory replacedElementFactory, TextRenderer textRenderer)
-
-
Method Details
-
getDocument
-
getFontResolver
-
loadDocument
-
fromUrl
-
setDocument
-
setDocument
-
fromString
-
fromString
-
setDocumentFromString
-
setDocumentFromString
-
parse
-
setDocument
Deprecated. -
getPDFEncryption
-
setPDFEncryption
-
setPDFVersion
public void setPDFVersion(char _v) -
getPDFVersion
public char getPDFVersion() -
setPDFXConformance
public void setPDFXConformance(int pdfXConformance) -
getPDFXConformance
public int getPDFXConformance() -
layout
public void layout() -
getInitialExtents
-
newRenderingContext
-
newLayoutContext
-
createPDF
- Throws:
com.lowagie.text.DocumentException
-
createPDF
- Throws:
com.lowagie.text.DocumentException
-
createPDF
- Throws:
com.lowagie.text.DocumentException
-
writeNextDocument
public void writeNextDocument() -
writeNextDocument
public void writeNextDocument(int initialPageNo) -
finishPDF
public void finishPDF() -
createPDF
- Throws:
com.lowagie.text.DocumentException
-
createPDF
public void createPDF(OutputStream os, boolean finish, int initialPageNo) throws com.lowagie.text.DocumentException NOTE: Caller is responsible for cleaning up the OutputStream if something goes wrong.- Throws:
com.lowagie.text.DocumentException
-
firePreOpen
private void firePreOpen() -
firePreWrite
private void firePreWrite(int pageCount) -
fireOnClose
private void fireOnClose() -
writePDF
private void writePDF(List<PageBox> pages, RenderingContext c, com.lowagie.text.Rectangle firstPageSize, com.lowagie.text.Document doc, com.lowagie.text.pdf.PdfWriter writer) -
setDidValues
private void setDidValues(com.lowagie.text.Document doc) -
paintPage
-
provideMetadataToPage
-
stringifyMetadata
-
getFirstChildElement
-
createXPacket
-
getOutputDevice
-
exportText
- Throws:
IOException
-
getRootBox
-
getDotsPerPoint
public float getDotsPerPoint() -
findPagePositionsByID
-
getListener
-
setListener
-
getWriter
public com.lowagie.text.pdf.PdfWriter getWriter() -
setTimeouted
public void setTimeouted(boolean timeouted) -
isTimeouted
public boolean isTimeouted()
-