Sn. HakanDoğan
Sorunuza dair anlatım (örnek) aşağıdaki link de
bulabilirsiniz. Projeniz de yardımcı olacağına inanıyorum.
ITextSharp HTML to PDF
protected void Page_Load(object sender, EventArgs e)
{
Document document = new Document();
try
{
PdfWriter.GetInstance(document, new FileStream("c:\\my.pdf", FileMode.Create));
document.Open();
WebClient wc = new WebClient();
string htmlText = wc.DownloadString("http://localhost:59500/my.html");
Response.Write(htmlText);
List<IElement> htmlarraylist = HTMLWorker.ParseToList(new StringReader(htmlText), null);
for (int k = 0; k < htmlarraylist.Count; k++)
{
document.Add((IElement)htmlarraylist[k]);
}
document.Close();
}
catch
{
}
}
Birinin cevabı size yardımcı oldu ise, lütfen "Yanıt Olarak Öner" veya "Yanıt Olarak İşaretle" olarak işaretlemeyi ve "Oy" vermeyi unutmayınız. Burada sağlanan tüm görüşler, kişiseldir ve Microsoft'un konumunu temsil etmemektedir.
Tüm bilgiler hazır olarak temin edilmektedir ve herhangi bir garanti vermemektedir.