Discussion:
[iText-questions] ItextSharp - Color Value Outside Range Error
Kreusch, Doug K
2015-06-23 21:09:42 UTC
Permalink
I am getting the error message "Color value outside range 0-255" with the following code:
template.SetRGBColorFillF(0xFF, 0xFF, 0xFF);
Isn't "0xFF" = 255?

Also, I get the same error with any value greater than "0x01".

Any suggestions?

Thanks,
Doug

________________________________

This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient or the individual responsible for delivering the e-mail to the intended recipient, please be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.

If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. Disclaimer R001.0
iText mailing list
2015-06-24 06:45:03 UTC
Permalink
I am getting the error message “Color value outside range 0-255” with
template.SetRGBColorFillF(0xFF, 0xFF, 0xFF);
Isn’t “0xFF” = 255?
Also, I get the same error with any value greater than “0x01”.
1. The mailing-list has been abandoned, please consult
http://itextpdf.com/support for more info.
2. Take a close look at your method: you are using SetRGBColorFillF()
instead of SetRGBColorFill(). Do you see the difference? One has an F,
the other one doesn't. The F stands for Float. That method expects Float
values between 0 and 1; the other method expects Integer values between
0 and 255.

Loading...