This question is ambiguous, you are not specifying the version of ItextSharp you are using not even the situation you are in. If you googled the keywords of you question you will get the answer in less then a second. However,
private MemoryStream createPDF(string html)
{
MemoryStream msOutput = new MemoryStream();
TextReader reader = new StringReader(html);
Document document = new Document(PageSize.A4, 30, 30, 30, 30);
PdfWriter writer = PdfWriter.GetInstance(document, msOutput);
HTMLWorker worker = new HTMLWorker(document);
document.Open();
worker.StartDocument();
worker.Parse(reader);
worker.EndDocument();
worker.Close();
document.Close();
return msOutput;
}
Source:
http://stackoverflow.com/questions/2822843/itextsharp-html-to-pdf[
^]
Cheers