資源簡介
c#asp.net表格Html數據模板轉換Pdf文件web打印pdf報表dll

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Web;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.IO;
using?System.Data;
using?System.xml;
using?HtmlTable2pdf;
namespace?html2PDF
{
????public?partial?class?WebForm1?:?System.Web.UI.Page
????{
????????string?strtb?=?““;
????????protected?void?Page_Load(object?sender?EventArgs?e)
????????{
????????????if?(!IsPostBack)
????????????{
???????????????/*?byte[]?buff?=?SendOutPDF();
????????????????Response.ContentType?=?“application/pdf“;
????????????????Response.BinaryWrite(buff);
????????????????*/
????????????}
????????????if?(Request[“action“]?==?“list“)
????????????{
????????????????list();
????????????}
????????????if?(Request[“action“]?==?“group“)
????????????{
????????????????group();
????????????}
????????????if?(Request[“action“]?==?“sub“)
????????????{
????????????????sub();
????????????}
????????????if?(Request[“action“]?==?“cross“)
????????????{
????????????????cross();
????????????}
?????????}
????????///?
?????????///?Sends?a?Stream?of?bytes?to?Client?as?a?PDF?file
?????????///?
?????????///?Stream?containing?bytes
????????private?void?list()
????????{
????????????string?fileName?=?string.Empty;
????????????
????????????strtb?=?@“yle>td?{border-bottom-width:?1px;?border-bottom-style:?solid;border-bottom-color:?gray;?border-left-width:?1px;?border-left-style:?solid;border-left-color:?gray;}?table?{border-right-style:?solid;border-right-color:?gray;border-right-width:?1px;border-top-style:?solid;border-top-color:?gray;border-top-width:?1px;} yle>
????????yle=‘text-align:left;font-size:10.5pt;font-family:?宋體‘?width=‘300‘?section=‘頁眉‘>?
????????yle=‘border-left-width:?1px;?border-left-style:?solid;?border-left-color:?gray;?background-color:#CCCC00‘?bgcolor=‘#C0C0C0‘?width=‘220‘>
userobject.companyName
????????這是頁眉 yle=‘float:left‘?width=‘390‘>第X頁?共Y頁
????????
????????
????????yle=‘border:0;‘>order.customerName ‘時間:‘+(order.billDate).ToString(‘yyyy年MM月dd日‘) ‘單號:‘+order.number ‘時間:‘+userobject.getRMBs(‘123.45‘)
????????
????????
????????頁頭:類別 價格 數量 金額 倉庫 金額(大寫)
????????
????????yle=‘code=[userobject.rowNum?%?2?==?1??‘‘?:?‘color:#CCCC00‘?]‘>orderDetail.name+‘?‘+orderDetail.spec orderDetail.price yle=‘code=[?orderDetail.unitName?==?‘噸‘??‘‘?:?‘background-color:#00FF66‘?]‘>orderDetail.q
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????155136??2017-08-24?13:55??webPage\html2PDF\bin\HtmlTable2pdf.dll
?????文件??????37376??2017-08-24?14:28??webPage\html2PDF\bin\htmltoPDF.dll
?????文件??????22016??2017-08-24?14:28??webPage\html2PDF\bin\htmltoPDF.pdb
?????文件????3928064??2013-09-16?12:21??webPage\html2PDF\bin\itextsharp.dll
?????文件?????163840??2013-09-16?12:21??webPage\html2PDF\bin\itextsharp.xmlworker.dll
?????文件???????4852??2016-06-30?16:13??webPage\html2PDF\htmltoPDF.csproj
?????文件???????1170??2016-06-30?16:13??webPage\html2PDF\htmltoPDF.csproj.user
?????文件???????6357??2017-08-24?14:39??webPage\html2PDF\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????675??2017-08-24?14:22??webPage\html2PDF\obj\Debug\htmltoPDF.csproj.FileListAbsolute.txt
?????文件??????37376??2017-08-24?14:28??webPage\html2PDF\obj\Debug\htmltoPDF.dll
?????文件??????22016??2017-08-24?14:28??webPage\html2PDF\obj\Debug\htmltoPDF.pdb
?????文件??????25433??2017-08-24?14:22??webPage\html2PDF\obj\Debug\ResolveAssemblyReference.cache
?????文件???????1317??2016-06-29?15:39??webPage\html2PDF\Properties\AssemblyInfo.cs
?????文件???????1719??2016-06-30?16:19??webPage\html2PDF\Web.config
?????文件???????1223??2012-06-06?11:03??webPage\html2PDF\Web.Debug.config
?????文件???????1284??2012-06-06?11:03??webPage\html2PDF\Web.Release.config
?????文件???????1937??2017-08-24?16:21??webPage\html2PDF\WebForm1.aspx
?????文件??????25949??2017-08-24?14:28??webPage\html2PDF\WebForm1.aspx.cs
?????文件????????804??2017-08-24?14:13??webPage\html2PDF\WebForm1.aspx.designer.cs
?????文件????????916??2016-06-29?15:48??webPage\html2PDF.sln
????..A..H.?????23552??2017-08-24?15:12??webPage\html2PDF.suo
????..A..H.?????41984??2016-06-29?15:38??webPage\PDF_Count.suo
?????文件????????167??2016-03-19?13:45??winForm\App.config
?????文件?????155136??2017-08-24?13:55??winForm\bin\Debug\HtmlTable2pdf.dll
?????文件????3928064??2013-09-16?12:21??winForm\bin\Debug\itextsharp.dll
?????文件?????163840??2013-09-16?12:21??winForm\bin\Debug\itextsharp.xmlworker.dll
?????文件??????41472??2017-08-24?14:08??winForm\bin\Debug\Tests.exe
?????文件????????167??2016-03-19?13:45??winForm\bin\Debug\Tests.exe.config
?????文件??????24064??2017-08-24?14:08??winForm\bin\Debug\Tests.pdb
?????文件??????11592??2017-08-24?16:16??winForm\bin\Debug\Tests.vshost.exe
............此處省略42個文件信息
- 上一篇:用ASP.NET實現網上購物系統
- 下一篇:C#題庫管理系統
評論
共有 條評論