Last post Mar 31, 2015 04:33 AM by satheeshsara
Mar 31, 2015 03:15 AM|satheeshsara|LINK
I am using itextsharp dll for creating pdf.
I want to change my fond color. I found solution in internet
FontFactory.GetFont("Arial", 28, Color.RED)
But I try to my source code. It's show's an error The name 'Color' does not exist in the current context. Color class not fond. How to solve this error.
Mar 31, 2015 03:18 AM|oned_gk|LINK
Try change it to System.Drawing.Color.Red
Mar 31, 2015 03:27 AM|satheeshsara|LINK
I am also try but not working System.Drawing.Color.Red.
GetFont method need Basecolor.
Mar 31, 2015 03:29 AM|Mikesdotnetting|LINK
There is a problem somewhere else in your code. The Color class is in the same namespace as the FontFactory class, so they both should resolve or neither of them should. Do you have
at the top of the file? If yes, can you show more of your code?
Mar 31, 2015 03:37 AM|satheeshsara|LINK
Ya. Iam import iTextSharp.text; and iTextSharp.text.pdf this two namespace.
Mar 31, 2015 03:41 AM|satheeshsara|LINK
Any problem in my iTextSharp dll. My itextSharp dll size is 3.58MB
Mar 31, 2015 03:55 AM|Mikesdotnetting|LINK
My itextSharp dll size is 3.58MB
Mar 31, 2015 04:16 AM|oned_gk|LINK
Try adding using
Then use BaseColor.RED
or change to
Mar 31, 2015 04:33 AM|satheeshsara|LINK
Thank you oned_gk. It, work fine.( BaseColor)