Class Java2DRenderer
java.lang.Object
com.openhtmltopdf.java2d.Java2DRenderer
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byteprivate Documentprivate final List<FSDOMMutator> private final intprivate final SVGDrawerprivate final FSObjectDrawerFactoryprivate final Java2DOutputDeviceprivate final FSPageProcessorprivate final shortprivate BidiReordererprivate BlockBoxprivate final SharedContextprivate BidiSplitterFactoryprivate final SVGDrawerprivate static final intprivate static final intprivate final Closeable -
Constructor Summary
ConstructorsConstructorDescriptionJava2DRenderer(BaseDocument doc, UnicodeImplementation unicode, PageDimensions pageSize, Java2DRendererBuilderState state, Closeable diagnosticConsumer) Subject to change. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private Rectangleintvoidlayout()private DocumentloadDocument(String uri) private LayoutContextprivate RenderingContextprivate voidpaintPage(RenderingContext c, PageBox page, DisplayListContainer.DisplayListPageContainer pageOperations) private voidsetDocument(File file) private voidsetDocument(String uri) private voidsetDocument(Document doc, String url) private voidsetDocument(Document doc, String url, NamespaceHandler nsh) private voidsetDocumentFromString(String content, String baseUrl) voidwritePage(int zeroBasedPageNumber) private voidwritePageImages(List<PageBox> pages, RenderingContext c, Rectangle2D firstPageSize) voidvoid
-
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-