Hi,
I try to export html to pdf with the "HTML2PDF" class and I have a problem with backround-color in "li" tags. I f I use te red, yellow,green,... color it's ok. But if I try, for exemple "silver" I have an Adobe Reader error...
If I try my html code in the test page http://cutesoft.net/example/createPDF.aspx, it works fine !
Here is my code:
private void ConverToPdf()
{
// setup a TextWriter to capture the markup
TextWriter tw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(tw);
htw.Write("<html xmlns='http://www.w3.org/1999/xhtml'><head></head><body style='font-family:Helvetica; font-size:11px;' width:750px;>");
// render the markup into our surrogate TextWriter
p_conteneur_print.RenderControl(htw);
htw.Write("</body></html>");
//get the captured markup as a string
string pageSource = tw.ToString();
CuteEditor.Convertor.PDF.HTML2PDF html2pdf = new CuteEditor.Convertor.PDF.HTML2PDF(tw.ToString());
html2pdf.Render();
string file_name = Session.SessionID + ".pdf";
string file_path = "temp_pdf/" + file_name;
html2pdf.Save(Server.MapPath(file_path));
Response.Redirect(file_path);
}
Thank you very mutch for your help
Nicolas