When you are using itextsharp library on a shared web hosting server then you might get this type of error because of .net trust level being set to Medium .
Now in order to resolve this issue you will have to rebuild the original dll source that is itextsharp source with a slight change in AssemblyInfo.cs
You will have to Insert this Statement in it
[assembly: System.Security.AllowPartiallyTrustedCallers]
And rebuild the same and reference the new dll and there wont be any error anymore . If you donot have source for itextsharp then you can download from this link - http://sourceforge.net/projects/itextsharp/?source=dlp
If you are not able to resolve this issue then a descriptive explanation is also provided on this blog post - http://www.ben-morris.com/allow-partially-trusted-callers-asp-net-shared-hosting-environments
OR
Click Here
9d1d7c73-53aa-4cbc-adcf-e263ea32c548|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
iTextSharp
PDFiTextSharp, allow partially trusted callers