Hello.
I’m trying to do as i said in the title. Currently, my code adds the watermark into the file sheets, but it always comes in black and the text horizontal. How could i change my code to make the watermark red and also displayed in the left bottom -> right top diagonal?
My code currently is this:
Boolean aplicarMarcaDaguaXLS(String filePath, String outputFilePath, String text) {
try {
Workbook wb = new Workbook(filePath);
Iterator it = wb.getWorksheets().iterator();
while(it.hasNext()) {
Worksheet sheet = (Worksheet) it.next();
Shape wordart = sheet.getShapes().addTextEffect(MsoPresetTextEffect.TEXT_EFFECT_1, text, "Arial Red", 50, false, true, 18, 8, 1, 1, 130, 800);
FillFormat wordArtFormat = wordart.getFill();
wordArtFormat.setOneColorGradient(Color.getRed(), 0.2, GradientStyleType.DIAGONAL_UP, 2);
wordArtFormat.setTransparency(0.9);
LineFormat lineFormat = wordart.getLine();
lineFormat.setWeight(0.0);
}
wb.save(outputFilePath);
return true;
} catch (Exception e) {
return false;
}
}