Package com.openhtmltopdf.java2d
Class Java2DRenderer
java.lang.Object
com.openhtmltopdf.java2d.Java2DRenderer
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte
private Document
private final List
<FSDOMMutator> private final int
private final SVGDrawer
private final FSObjectDrawerFactory
private final Java2DOutputDevice
private final FSPageProcessor
private final short
private BidiReorderer
private BlockBox
private final SharedContext
private BidiSplitterFactory
private final SVGDrawer
private static final int
private static final int
private final Closeable
-
Constructor Summary
ConstructorsConstructorDescriptionJava2DRenderer
(BaseDocument doc, UnicodeImplementation unicode, PageDimensions pageSize, Java2DRendererBuilderState state, Closeable diagnosticConsumer) Subject to change. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private Rectangle
int
void
layout()
private Document
loadDocument
(String uri) private LayoutContext
private RenderingContext
private void
paintPage
(RenderingContext c, PageBox page, DisplayListContainer.DisplayListPageContainer pageOperations) private void
setDocument
(File file) private void
setDocument
(String uri) private void
setDocument
(Document doc, String url) private void
setDocument
(Document doc, String url, NamespaceHandler nsh) private void
setDocumentFromString
(String content, String baseUrl) void
writePage
(int zeroBasedPageNumber) private void
writePageImages
(List<PageBox> pages, RenderingContext c, Rectangle2D firstPageSize) void
void
-
Field Details
-
_domMutators
-
_mathMLImpl
-
_root
-
_outputDevice
-
_splitterFactory
-
_defaultTextDirection
private byte _defaultTextDirection -
_reorderer
-
_svgImpl
-
_doc
-
_objectDrawerFactory
-
_pageProcessor
-
DEFAULT_DOTS_PER_PIXEL
private static final int DEFAULT_DOTS_PER_PIXEL- See Also:
-
DEFAULT_DPI
private static final int DEFAULT_DPI- See Also:
-
_initialPageNo
private final int _initialPageNo -
_pagingMode
private final short _pagingMode -
diagnosticConsumer
-
-
Constructor Details
-
Java2DRenderer
public Java2DRenderer(BaseDocument doc, UnicodeImplementation unicode, PageDimensions pageSize, Java2DRendererBuilderState state, Closeable diagnosticConsumer) Subject to change. Not public API. Used exclusively by the Java2DRendererBuilder class.
-
-
Method Details
-
setDocumentFromString
-
setDocument
-
setDocument
- Throws:
IOException
-
setDocument
-
loadDocument
-
setDocument
-
getFontResolver
-
layout
public void layout() -
getInitialExtents
-
newRenderingContext
-
newLayoutContext
-
writePages
- Throws:
IOException
-
writePage
- Throws:
IOException
-
writeSinglePage
public void writeSinglePage() -
getPageCount
public int getPageCount() -
writePageImages
private void writePageImages(List<PageBox> pages, RenderingContext c, Rectangle2D firstPageSize) throws IOException - Throws:
IOException
-
paintPage
private void paintPage(RenderingContext c, PageBox page, DisplayListContainer.DisplayListPageContainer pageOperations) -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-