Click here to Skip to main content
15,915,324 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Morning

From morning onwards i am slapping my head to the wall with the single Problem
Iam using the itextsharp.dll for producing the Pdf file in asp.net application.when iam running in visual studio it was working fine , when i had hosted in godaddy server in my account, Iam getting this Error when i open this That page.


Error:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0103: The name 'Color' does not exist in the current context

Source Error:


Line 1169: PdfPCell headp = new PdfPCell();
Line 1170:
Line 1171: Font brown = new Font(Font.TIMES_ROMAN, 10f, Font.BOLD, Color.BLACK);
Line 1172: Font brown1 = new Font(Font.TIMES_ROMAN, 15f, Font.BOLD, Color.BLACK);
Line 1173: Font normal = new Font(Font.TIMES_ROMAN, 10f, Font.NORMAL, Color.BLACK);

Blod Code is Error.


Please help me out, THANK Q
Posted

1 solution

hi
you can try this. Hope it will work.
Font brown = FontFactory.GetFont(FontFactory.TIMES_ROMAN, 14, Font.BOLD, iTextSharp.text.BaseColor.BLACK);
 
Share this answer
 
Comments
[no name] 14-Sep-12 3:57am    
I am also getting the
Error like
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0234: The type or namespace name 'HeaderFooter' does not exist in the namespace 'iTextSharp.text' (are you missing an assembly reference?)

Source Error:


Line 1149:
Line 1150:
Line 1151: iTextSharp.text.HeaderFooter footer1 = new iTextSharp.text.HeaderFooter(footPhraseImg, footPhraseImg1);
Line 1152: footer1.Border = iTextSharp.text.Rectangle.TOP_BORDER;
Line 1153: footer1.Alignment = Element.ALIGN_LEFT;
[no name] 14-Sep-12 3:58am    
But iam Giving the Reference to it
ParthaDinda 14-Sep-12 4:23am    
There is no class like Headerfooter on that namespace use iTextSharp.text.Header
to do your task.
[no name] 14-Sep-12 4:51am    
Color has been solved
But not the Second Error
[no name] 14-Sep-12 4:52am    
Its there I am getting in my visual studio and it was also working and giving the footer result in my pdf file

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900