Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a requirement to save incoming email details in pdf format when a document library received an email. So in the EmailReceived event receiver I created the code to retrieve all the email details using the SPEmailMessage and save it into pdf format by using iTextSharp. When I try to debug, the event receiver will not get hit. If I remove all the code that are based on the iTextSharp api the event receiver will get hit.

What is the problem here, is there any other way for me to achieve the same thing using different api.

Thanks

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

SharePoint event receivers tend to be a rather stable thing and your case looks a bit unlikely. In your situation, the first thing I would check is that the iTextSharp library is deployed to GAC properly and works at all from an Application Page or from a Webpart.

And I would check the logs, too.

Anyway, there are plenty of PDF libraries out there. Thus if you suspect that the issue relates to iTextSharp, I'd recommend you to try one of the following libraries:

You could use some very basic, "Hello world"-like example code and see if the receiver will get hit.

P.S. Please, don't forget to let us know the results of your investigations! The PDF generation topic is very interesting for me :)

share|improve this answer
    
thank you very much..I'll try this and let u know.. –  Agamand The True Feb 23 '12 at 9:58
    
I added the dll to the solution package and now it is working. Thanks for the detail answers –  Agamand The True Mar 9 '12 at 10:53
add comment

You might need to add the iTextSharp as a trusted assembly in the web.config.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.