when i wrote this code using ITextSharp, an exception tells me "The path is not of a legal form."
string table1 = GetHtmlPage(MY HTML CODE);
StringReader reader = new StringReader(table1);
Document document = new Document(PageSize.A4);
HTMLWorker parser = new HTMLWorker(document);
string PDF_FileName = Server.MapPath("~") + "/Shopping_cart/billformat/PDF_File.pdf";
PdfWriter.GetInstance(document, new FileStream(PDF_FileName, FileMode.OpenOrCreate));
document.Open();
try
{
parser.Parse(reader);
}
catch (Exception ex)
{
Paragraph paragraph = new Paragraph("Error!" + ex.Message);
Chunk text = paragraph.Chunks[0] as Chunk;
if (text != null)
{
text.Font.Color = BaseColor.RED;
}
document.Add(paragraph);
}
finally
{
document.Close();
}
ANY HELP!!!!!!!!!!!!!!!!!