PDF4Java Reference Documentation
com.o2sol.pdf4java.graphics Package / PDFCanvas Class / drawString Method / drawString(String,PDFFont,PDFBrush,PDFDisplayRectangle,PDFStructureElement) Method
String to draw.
that defines the text format of the string.
that determines the color and texture of the drawn text.
Object that specifies the location of the drawn text.
The structure element that is associated with this piece of content.
Collapse All Expand All
In This Topic

drawString(String,PDFFont,PDFBrush,PDFDisplayRectangle,PDFStructureElement) Method
In This Topic
Draws the specified text string in the specified rectangle with the specified and @see com.o2sol.pdf4java.graphics.PDFFont Objects.
Syntax

    public void drawString(
       java.lang.String s,
       PDFFont font,
       PDFBrush brush,
       PDFDisplayRectangle rectangle,
       PDFStructureElement structureElement
    )

#### Parameters

s
  String to draw.
font
  that defines the text format of the string.
brush
  that determines the color and texture of the drawn text.
rectangle
  Object that specifies the location of the drawn text.
structureElement
  The structure element that is associated with this piece of content.

Exceptions

Exception | Description
--- | ---
java.lang.IllegalArgumentException | When rectangle is null.

See Also

#### Reference

PDFCanvas Class
PDFCanvas Members
Overload List

© 2025 O2 Solutions All Rights Reserved.

Send comments on this topic.