public class Watermarker extends Object
| Constructor and Description |
|---|
Watermarker(byte[] input,
String text,
int fontsize,
float opacity)
The main constructor with all mandatory arguments.
|
| Modifier and Type | Method and Description |
|---|---|
Watermarker |
withColor(Color color)
To change the default black color by a new one.
|
byte[] |
write()
Write the watermark to the pdf given in entry.
|
public Watermarker(byte[] input,
String text,
int fontsize,
float opacity)
throws IOException,
DocumentException
input - the pdf content as a byte[]text - the text to write as watermarkfontsize - the fontsize of the watermarkopacity - the opacity of the watermarkIOException - on errorDocumentException - on errorpublic Watermarker withColor(Color color)
color - the new color to usepublic byte[] write()
throws IOException,
DocumentException
IOException - on errorDocumentException - on errorCopyright © 2018. All rights reserved.