Package org.jpedal.manipulator
Class AddText
java.lang.Object
org.jpedal.manipulator.AddText
- All Implemented Interfaces:
Manipulation
Adds text to a document
-
Constructor Summary
ConstructorsConstructorDescriptionAddText
(PageRanges pages, String text, float x, float y, String baseFontName, int fontSize, float r, float g, float b) Adds text to the specified page. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(org.jpedal.io.annotation.utils.AnnotInfo info) Applies the manipulation to the current document
-
Constructor Details
-
AddText
public AddText(PageRanges pages, String text, float x, float y, String baseFontName, int fontSize, float r, float g, float b) Adds text to the specified page.
This method only supports strings using WinAnsiEncoding.- Parameters:
pages
- the pages to draw text ontext
- the text to drawx
- the horizontal starting position of the texty
- the vertical starting position of the textbaseFontName
- the name of the base font to use. SeeBaseFont
fontSize
- the font size of the textr
- the red color componentg
- the green color componentb
- the blue color component
-
-
Method Details
-
apply
Description copied from interface:Manipulation
Applies the manipulation to the current document- Specified by:
apply
in interfaceManipulation
- Parameters:
info
- theAnnotInfo
object for the currently loaded document- Throws:
IOException
- if the manipulation cannot be applied to the document
-