Could not load file or assembly 'itextsharp, Version=5.4.1.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The system cannot find the file specified.
<asp:DropDownList ID="DropDownListDownloadCv0" runat="server"> <asp:ListItem>CV</asp:ListItem> <asp:ListItem>PDF</asp:ListItem> </asp:DropDownList>
protected void DownloadCv_Click(object sender, ImageClickEventArgs e) { { string sDirPath = Server.MapPath("~/PDF_WORD/Docs"); var ObjSearchDir = new DirectoryInfo(sDirPath); if (!ObjSearchDir.Exists) { ObjSearchDir.Create(); } string strFileName = HttpContext.Current.Server.MapPath("~/PDF_WORD/Docs/Test." + DropDownListDownloadCv0.SelectedValue.ToString() + ""); var objfileinfo = new FileInfo(strFileName); // step 1: creation of a document-object var document = new Document(); if (objfileinfo.Exists) { File.Delete(strFileName); PdfWriter.GetInstance(document, new FileStream(strFileName, FileMode.Create)); } else PdfWriter.GetInstance(document, new FileStream(strFileName, FileMode.Create)); // step 2: // we create a writer that listens to the document //StringBuilder strB = new StringBuilder(); var sw = new StringWriter(); document.Open(); var hTextWriter = new HtmlTextWriter(sw); lblphonenumber.RenderControl(hTextWriter); String strHtml1 = sw.ToString(); var styles = new iTextSharp.text.html.simpleparser.StyleSheet(); var hw = new iTextSharp.text.html.simpleparser.HTMLWorker(document); hw.Parse(new StringReader(strHtml1)); document.Close(); } } Chattkonversationen är avslutad
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)