Class RenderingContext
java.lang.Object
com.openhtmltopdf.render.RenderingContext
- All Implemented Interfaces:
CssContext, Cloneable
Supplies information about the context in which rendering will take place
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BidiReordererprivate booleanprivate FontContextprivate intprivate booleanprivate booleanprivate OutputDeviceprivate PageBoxprivate intprivate intprivate Layerprivate intprotected final SharedContext -
Constructor Summary
ConstructorsConstructorDescriptionRenderingContext(SharedContext sharedContext) needs a new instance every run -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanbooleanbooleanbooleangetBoxById(String id) getCss()intfloatgetDPI()getFixedRectangle(boolean excludeFloatBottomArea) Get the document (for non-paged docs) or page rect where fixed position boxes should be layed out.getFont(FontSpecification font) floatgetFSFontMetrics(FSFont font) intfloatgetPage()intintintgetUac()Get the viewport rect, for painting the body or html tag background.floatgetXHeight(FontSpecification parentFont) booleanbooleanReturns true if we are laying out the footnote area rather than general content.booleanbooleanbooleanisPaged()Returns true if the currently set media type is paged.booleanisPrint()voidsetBaseURL(String url) voidvoidsetFastRenderer(boolean isFast) voidsetFontContext(FontContext fontContext) voidsetInitialPageNo(int initialPageNo) voidsetInPageMargins(boolean inMargin) voidsetIsInFloatBottom(boolean inFloatBottom) voidsetOutputDevice(OutputDevice outputDevice) voidvoidsetPageCount(int pageCount) voidsetRootLayer(Layer rootLayer) voidsetShadowPageNumber(int shadow)
-
Field Details
-
outputDevice
-
fontContext
-
pageCount
private int pageCount -
pageNo
private int pageNo -
page
-
shadowPageNumber
private int shadowPageNumber -
rootLayer
-
initialPageNo
private int initialPageNo -
isFastRenderer
private boolean isFastRenderer -
inPageMargins
private boolean inPageMargins -
_isInFloatBottom
private boolean _isInFloatBottom -
_bidi
-
Constructor Details
-
Method Details
-
isFastRenderer
public boolean isFastRenderer() -
setFastRenderer
public void setFastRenderer(boolean isFast) -
setBaseURL
-
getUac
-
getBaseURL
-
getDPI
public float getDPI() -
getMmPerDot
public float getMmPerDot()- Specified by:
getMmPerDotin interfaceCssContext
-
getDotsPerPixel
public int getDotsPerPixel()- Specified by:
getDotsPerPixelin interfaceCssContext
-
getFontSize2D
- Specified by:
getFontSize2Din interfaceCssContext
-
getXHeight
- Specified by:
getXHeightin interfaceCssContext
-
getTextRenderer
- Specified by:
getTextRendererin interfaceCssContext
-
setBidiReorderer
-
getBidiReorderer
-
isPaged
public boolean isPaged()Returns true if the currently set media type is paged. Currently returns true only for print , projection , and embossed , handheld , and tv . See the media section of the CSS 2.1 spec for more information on media types.- Returns:
- The paged value
-
getFontResolver
-
getFont
- Specified by:
getFontin interfaceCssContext
-
getCanvas
-
getFixedRectangle
Get the document (for non-paged docs) or page rect where fixed position boxes should be layed out. Generally we want to setexcludeFloatBottomAreatrue so fixed content doesn't sit above footnotes. -
getViewportRectangle
Get the viewport rect, for painting the body or html tag background. -
debugDrawBoxes
public boolean debugDrawBoxes() -
debugDrawLineBoxes
public boolean debugDrawLineBoxes() -
debugDrawInlineBoxes
public boolean debugDrawInlineBoxes() -
debugDrawFontMetrics
public boolean debugDrawFontMetrics() -
isInteractive
public boolean isInteractive() -
isPrint
public boolean isPrint() -
getOutputDevice
-
setOutputDevice
-
getFontContext
- Specified by:
getFontContextin interfaceCssContext
-
setFontContext
-
setPage
-
getPageCount
public int getPageCount() -
setPageCount
public void setPageCount(int pageCount) -
getPage
-
getPageNo
public int getPageNo() -
getCss
- Specified by:
getCssin interfaceCssContext
-
getFSFontMetrics
- Specified by:
getFSFontMetricsin interfaceCssContext
-
getRootLayer
-
setRootLayer
-
getInitialPageNo
public int getInitialPageNo() -
setInitialPageNo
public void setInitialPageNo(int initialPageNo) -
getBoxById
-
setShadowPageNumber
public void setShadowPageNumber(int shadow) -
getShadowPageNumber
public int getShadowPageNumber()- Returns:
- overflow page number or -1 if this is not an overflow page.
-
setInPageMargins
public void setInPageMargins(boolean inMargin) -
isInPageMargins
public boolean isInPageMargins() -
clone
-
setIsInFloatBottom
public void setIsInFloatBottom(boolean inFloatBottom) -
isInFloatBottom
public boolean isInFloatBottom()Returns true if we are laying out the footnote area rather than general content.- Specified by:
isInFloatBottomin interfaceCssContext
-