I am migrating from itext 5 to 7.0.5 and am having trouble with colors. When I try the following:
Text title1 = new Text("The Strange Case of ").setFontColor(Color.BLUE);
My IDE tells me that Color.BLUE is deprecated. I cannot find what to use instead. Please help. TIA.
You should use com.itextpdf.kernel.color.ColorConstants
as the replacement for com.itextpdf.kernel.color.Color
which was marked depreciated in 7.0.5.
As noted in a comment the Color
class is simply depreciated in 7.0.5 and both classes act the same way, however in 7.1 the Color
class will be removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With