Hi DeGaaN, I have reproduced your issue and found the root cause. When you call Convert (string) method to convert Msg file to Html File, each Msg will give you an Html file and a directory. The image of the Html page is in the directory. So when you create PDF file, itextsharp.dll will try to find the image, but failed and throw this exception. The easiest way to fix this issue is to use the Html all in one page.
Please change your code to: mail.SaveAs( @'e: temp htmlToPdf ' + _Message.Name + '.mht', Microsoft.Office.Interop.Outlook. OlSaveAsType.olMHTML); See for the OlSaveAsType Enumeration. The second way is to copy the required pictures to the bin directory. I think you could do this in C# language. Best Regards, Hetro We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
The HTML string will be exported and downloaded as PDF file using iTextSharp XMLWorkerHelper library in ASP.Net with C# and VB.Net. TAGs: ASP.Net, iTextSharp, HTML Here Mudassar Ahmed Khan has explained with an example, how to export HTML string to PDF file using iTextSharp in ASP.Net with C# and VB.Net.
Click to participate the survey. Hi DeGaaN, I have reproduced your issue and found the root cause. Vectorworks 2014 serial number crack.
When you call Convert (string) method to convert Msg file to Html File, each Msg will give you an Html file and a directory. The image of the Html page is in the directory. So when you create PDF file, itextsharp.dll will try to find the image, but failed and throw this exception. The easiest way to fix this issue is to use the Html all in one page. Please change your code to: mail.SaveAs( @'e: temp htmlToPdf ' + _Message.Name + '.mht', Microsoft.Office.Interop.Outlook. OlSaveAsType.olMHTML); See for the OlSaveAsType Enumeration.
The second way is to copy the required pictures to the bin directory. I think you could do this in C# language. Best Regards, Hetro We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click to participate the survey. Thank you for your answer. For your first solution ( mail.SaveAs( @'e: temp htmlToPdf ' + _Message.Name + '.mht', Microsoft.Office.Interop.Outlook. Worker.Parse(reader) Get a new error (IOException was unhandled: Expected > for tag: near line 543, column 2). I think Itextsharp don't support mht conversion. For your second solution i haven't finish to wrote the new part of my code so i give you an answer if it work.