Package com.itextpdf.layout.renderer
Class DrawContext
- java.lang.Object
-
- com.itextpdf.layout.renderer.DrawContext
-
public class DrawContext extends java.lang.ObjectThis class holds instances which required for drawing on pdf document.
-
-
Field Summary
Fields Modifier and Type Field Description private PdfCanvascanvasprivate PdfDocumentdocumentprivate booleantaggingEnabled
-
Constructor Summary
Constructors Constructor Description DrawContext(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfCanvasgetCanvas()Get pdf canvas.PdfDocumentgetDocument()Get pdf document.booleanisTaggingEnabled()Get document tagging property.voidsetTaggingEnabled(boolean taggingEnabled)Set document tagging property.
-
-
-
Field Detail
-
document
private PdfDocument document
-
canvas
private PdfCanvas canvas
-
taggingEnabled
private boolean taggingEnabled
-
-
Constructor Detail
-
DrawContext
public DrawContext(PdfDocument document, PdfCanvas canvas)
Create drawing context by setting document and pdf canvas on which drawing will be performed.- Parameters:
document- pdf documentcanvas- canvas to draw on
-
DrawContext
public DrawContext(PdfDocument document, PdfCanvas canvas, boolean enableTagging)
Create drawing context by setting document and pdf canvas on which drawing will be performed.- Parameters:
document- pdf documentcanvas- canvas to draw onenableTagging- if true document drawing operations will be appropriately tagged
-
-
Method Detail
-
getDocument
public PdfDocument getDocument()
Get pdf document.- Returns:
PdfDocumentinstance
-
getCanvas
public PdfCanvas getCanvas()
Get pdf canvas.- Returns:
PdfCanvasinstance
-
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
-
-