[問題] 請問關於網頁輸出成pdf

看板Web_Design作者 (改變自己!)時間15年前 (2010/04/28 15:46), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串1/1
我是用asp.net做的 先用textbox將內容設好 然後buttom可以轉成pdf轉換 我找了一個程式碼 可以下載成pdf格式但是打不開 不知道是損毀還是格式不合 請各位大大幫我看一下 Dim sw As New System.IO.StringWriter Dim hw As New System.Web.UI.HtmlTextWriter(sw) Response.Clear() Response.Buffer = True Response.Write("<meta http-equiv=Content-Type content=text/html;charset=uft-8>") Response.AppendHeader("Content-Disposition", "attachment; filename=Data.pdf") Response.ContentType = "application/pdf" Panel1.RenderControl(hw) Response.Write(sw.ToString()) Response.End() 這個是我去找轉成EXCEL的然後改成PDF的樣子 請問應該要加什麼東西 或者怎麼修改才可以呢 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.172.243.131 ※ 編輯: awehero 來自: 218.172.243.131 (04/28 16:04)

04/28 21:01, , 1F
我有用過iTextSharp可以開啟或存檔成pdf,但借問一下怎樣能
04/28 21:01, 1F

04/28 21:02, , 2F
將網頁存成pdf當作mail的附件寄出,現在只能寄出html的格式
04/28 21:02, 2F
文章代碼(AID): #1Br-U-dN (Web_Design)