Package com.itextpdf.layout.renderer
Class DrawContext
java.lang.Object
com.itextpdf.layout.renderer.DrawContext
This class holds instances which required for drawing on pdf document.
-
Constructor Summary
ConstructorDescriptionDrawContext
(PdfDocument document, PdfCanvas canvas) Create drawing context by setting document and pdf canvas on which drawing will be performed.DrawContext
(PdfDocument document, PdfCanvas canvas, boolean enableTagging) Create drawing context by setting document and pdf canvas on which drawing will be performed. -
Method Summary
Modifier and TypeMethodDescriptionGet pdf canvas.Get pdf document.boolean
Get document tagging property.void
setTaggingEnabled
(boolean taggingEnabled) Set document tagging property.
-
Constructor Details
-
DrawContext
Create drawing context by setting document and pdf canvas on which drawing will be performed.- Parameters:
-
document
- pdf document -
canvas
- canvas to draw on
-
DrawContext
Create drawing context by setting document and pdf canvas on which drawing will be performed.- Parameters:
-
document
- pdf document -
canvas
- canvas to draw on -
enableTagging
- if true document drawing operations will be appropriately tagged
-
-
Method Details
-
getDocument
Get pdf document.- Returns:
-
PdfDocument
instance
-
getCanvas
Get pdf canvas.- Returns:
-
PdfCanvas
instance
-
isTaggingEnabled
public boolean isTaggingEnabled()Get document tagging property.- Returns:
- true if tagging is enabled, false otherwise
-
setTaggingEnabled
public void setTaggingEnabled(boolean taggingEnabled) Set document tagging property.- Parameters:
-
taggingEnabled
- true if to enable tagging, false to disable it
-