Class Writer
- java.lang.Object
-
- com.lowagie.toolbox.plugins.watermarker.Writer
-
class Writer extends java.lang.Object
The concrete class which will write a the watermark on the stamp. It is meant to be used through WatermarkerTool or WatermarkerBuilder.
-
-
Constructor Summary
Constructors Constructor Description Writer(PdfReader reader, PdfStamper stamp, java.lang.String text, int fontsize, float opacity, java.awt.Color color)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) Writer
withFont(BaseFont font)
(package private) void
write()
Does the magic, with all parameters already set and valid.
-
-
-
Field Detail
-
reader
private PdfReader reader
-
stamp
private PdfStamper stamp
-
text
private java.lang.String text
-
fontsize
private int fontsize
-
opacity
private float opacity
-
color
private java.awt.Color color
-
font
private BaseFont font
-
-
Constructor Detail
-
Writer
Writer(PdfReader reader, PdfStamper stamp, java.lang.String text, int fontsize, float opacity, java.awt.Color color)
-
-
Method Detail
-
write
void write() throws java.io.IOException, DocumentException
Does the magic, with all parameters already set and valid. At the end, the PDF file configured through the stamp parameter will be written.- Throws:
DocumentException
- if the default "Helvetica" font cannot be createdjava.io.IOException
- if the default "Helvetica" font cannot be created
-
-