实例介绍
C#,用itextsharp把Html转PDF。支持图片,个人只是简单测试了一下。
【实例截图】
【核心代码】
HtmlToPDFWeb.rar
└── WebSite1
├── ClassLibrary1
│ ├── bin
│ │ ├── Debug
│ │ └── Release
│ ├── ClassLibrary1.csproj
│ ├── HtmlToPdfHelper.cs
│ ├── obj
│ │ └── Debug
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ │ └── TempPE
│ ├── PersonEntity.cs
│ └── Properties
│ └── AssemblyInfo.cs
├── packages
│ ├── itextsharp.dll
│ └── itextsharp.xmlworker.dll
├── WebSite1
│ ├── About.aspx
│ ├── About.aspx.cs
│ ├── Account
│ │ ├── Login.aspx
│ │ ├── Login.aspx.cs
│ │ ├── Manage.aspx
│ │ ├── Manage.aspx.cs
│ │ ├── OpenAuthProviders.ascx
│ │ ├── OpenAuthProviders.ascx.cs
│ │ ├── Register.aspx
│ │ ├── Register.aspx.cs
│ │ ├── RegisterExternalLogin.aspx
│ │ ├── RegisterExternalLogin.aspx.cs
│ │ └── Web.config
│ ├── App_Code
│ │ ├── BundleConfig.cs
│ │ ├── IdentityModels.cs
│ │ ├── RouteConfig.cs
│ │ ├── Startup.Auth.cs
│ │ └── Startup.cs
│ ├── App_Data
│ ├── Bin
│ │ ├── Antlr3.Runtime.dll
│ │ ├── Antlr3.Runtime.dll.refresh
│ │ ├── Antlr3.Runtime.pdb
│ │ ├── AspNet.ScriptManager.bootstrap.dll
│ │ ├── AspNet.ScriptManager.bootstrap.dll.refresh
│ │ ├── AspNet.ScriptManager.jQuery.dll
│ │ ├── AspNet.ScriptManager.jQuery.dll.refresh
│ │ ├── ClassLibrary1.dll
│ │ ├── ClassLibrary1.pdb
│ │ ├── EntityFramework.dll
│ │ ├── EntityFramework.dll.refresh
│ │ ├── EntityFramework.SqlServer.dll
│ │ ├── EntityFramework.SqlServer.dll.refresh
│ │ ├── EntityFramework.SqlServer.xml
│ │ ├── EntityFramework.xml
│ │ ├── itextsharp.dll
│ │ ├── itextsharp.xmlworker.dll
│ │ ├── Microsoft.AspNet.FriendlyUrls.dll
│ │ ├── Microsoft.AspNet.FriendlyUrls.dll.refresh
│ │ ├── Microsoft.AspNet.FriendlyUrls.xml
│ │ ├── Microsoft.AspNet.Identity.Core.dll
│ │ ├── Microsoft.AspNet.Identity.Core.dll.refresh
│ │ ├── Microsoft.AspNet.Identity.Core.xml
│ │ ├── Microsoft.AspNet.Identity.EntityFramework.dll
│ │ ├── Microsoft.AspNet.Identity.EntityFramework.dll.refresh
│ │ ├── Microsoft.AspNet.Identity.EntityFramework.xml
│ │ ├── Microsoft.AspNet.Identity.Owin.dll
│ │ ├── Microsoft.AspNet.Identity.Owin.dll.refresh
│ │ ├── Microsoft.AspNet.Identity.Owin.xml
│ │ ├── Microsoft.AspNet.Web.Optimization.WebForms.dll
│ │ ├── Microsoft.AspNet.Web.Optimization.WebForms.dll.refresh
│ │ ├── Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll
│ │ ├── Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll.refresh
│ │ ├── Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml
│ │ ├── Microsoft.Owin.dll
│ │ ├── Microsoft.Owin.dll.refresh
│ │ ├── Microsoft.Owin.Host.SystemWeb.dll
│ │ ├── Microsoft.Owin.Host.SystemWeb.dll.refresh
│ │ ├── Microsoft.Owin.Host.SystemWeb.xml
│ │ ├── Microsoft.Owin.Security.Cookies.dll
│ │ ├── Microsoft.Owin.Security.Cookies.dll.refresh
│ │ ├── Microsoft.Owin.Security.Cookies.xml
│ │ ├── Microsoft.Owin.Security.dll
│ │ ├── Microsoft.Owin.Security.dll.refresh
│ │ ├── Microsoft.Owin.Security.Facebook.dll
│ │ ├── Microsoft.Owin.Security.Facebook.dll.refresh
│ │ ├── Microsoft.Owin.Security.Facebook.xml
│ │ ├── Microsoft.Owin.Security.Google.dll
│ │ ├── Microsoft.Owin.Security.Google.dll.refresh
│ │ ├── Microsoft.Owin.Security.Google.xml
│ │ ├── Microsoft.Owin.Security.MicrosoftAccount.dll
│ │ ├── Microsoft.Owin.Security.MicrosoftAccount.dll.refresh
│ │ ├── Microsoft.Owin.Security.MicrosoftAccount.xml
│ │ ├── Microsoft.Owin.Security.OAuth.dll
│ │ ├── Microsoft.Owin.Security.OAuth.dll.refresh
│ │ ├── Microsoft.Owin.Security.OAuth.xml
│ │ ├── Microsoft.Owin.Security.Twitter.dll
│ │ ├── Microsoft.Owin.Security.Twitter.dll.refresh
│ │ ├── Microsoft.Owin.Security.Twitter.xml
│ │ ├── Microsoft.Owin.Security.xml
│ │ ├── Microsoft.Owin.xml
│ │ ├── Microsoft.ScriptManager.MSAjax.dll
│ │ ├── Microsoft.ScriptManager.MSAjax.dll.refresh
│ │ ├── Microsoft.ScriptManager.WebForms.dll
│ │ ├── Microsoft.ScriptManager.WebForms.dll.refresh
│ │ ├── Microsoft.Web.Infrastructure.dll
│ │ ├── Microsoft.Web.Infrastructure.dll.refresh
│ │ ├── Newtonsoft.Json.dll
│ │ ├── Newtonsoft.Json.dll.refresh
│ │ ├── Newtonsoft.Json.xml
│ │ ├── Owin.dll
│ │ ├── Owin.dll.refresh
│ │ ├── roslyn
│ │ │ ├── csc.exe
│ │ │ ├── csc.exe.config
│ │ │ ├── csc.exe.refresh
│ │ │ ├── csc.rsp
│ │ │ ├── csi.exe
│ │ │ ├── csi.exe.config
│ │ │ ├── csi.exe.refresh
│ │ │ ├── csi.rsp
│ │ │ ├── Microsoft.Build.Tasks.CodeAnalysis.dll
│ │ │ ├── Microsoft.Build.Tasks.CodeAnalysis.dll.refresh
│ │ │ ├── Microsoft.CodeAnalysis.CSharp.dll
│ │ │ ├── Microsoft.CodeAnalysis.CSharp.dll.refresh
│ │ │ ├── Microsoft.CodeAnalysis.CSharp.Scripting.dll
│ │ │ ├── Microsoft.CodeAnalysis.CSharp.Scripting.dll.refresh
│ │ │ ├── Microsoft.CodeAnalysis.dll
│ │ │ ├── Microsoft.CodeAnalysis.dll.refresh
│ │ │ ├── Microsoft.CodeAnalysis.Scripting.dll
│ │ │ ├── Microsoft.CodeAnalysis.Scripting.dll.refresh
│ │ │ ├── Microsoft.CodeAnalysis.VisualBasic.dll
│ │ │ ├── Microsoft.CodeAnalysis.VisualBasic.dll.refresh
│ │ │ ├── Microsoft.CSharp.Core.targets
│ │ │ ├── Microsoft.DiaSymReader.Native.amd64.dll
│ │ │ ├── Microsoft.DiaSymReader.Native.amd64.dll.refresh
│ │ │ ├── Microsoft.DiaSymReader.Native.x86.dll
│ │ │ ├── Microsoft.DiaSymReader.Native.x86.dll.refresh
│ │ │ ├── Microsoft.VisualBasic.Core.targets
│ │ │ ├── Microsoft.Win32.Primitives.dll
│ │ │ ├── Microsoft.Win32.Primitives.dll.refresh
│ │ │ ├── System.AppContext.dll
│ │ │ ├── System.AppContext.dll.refresh
│ │ │ ├── System.Collections.Immutable.dll
│ │ │ ├── System.Collections.Immutable.dll.refresh
│ │ │ ├── System.Console.dll
│ │ │ ├── System.Console.dll.refresh
│ │ │ ├── System.Diagnostics.FileVersionInfo.dll
│ │ │ ├── System.Diagnostics.FileVersionInfo.dll.refresh
│ │ │ ├── System.Diagnostics.Process.dll
│ │ │ ├── System.Diagnostics.Process.dll.refresh
│ │ │ ├── System.Diagnostics.StackTrace.dll
│ │ │ ├── System.Diagnostics.StackTrace.dll.refresh
│ │ │ ├── System.IO.Compression.dll
│ │ │ ├── System.IO.Compression.dll.refresh
│ │ │ ├── System.IO.FileSystem.dll
│ │ │ ├── System.IO.FileSystem.dll.refresh
│ │ │ ├── System.IO.FileSystem.DriveInfo.dll
│ │ │ ├── System.IO.FileSystem.DriveInfo.dll.refresh
│ │ │ ├── System.IO.FileSystem.Primitives.dll
│ │ │ ├── System.IO.FileSystem.Primitives.dll.refresh
│ │ │ ├── System.IO.Pipes.dll
│ │ │ ├── System.IO.Pipes.dll.refresh
│ │ │ ├── System.Reflection.Metadata.dll
│ │ │ ├── System.Reflection.Metadata.dll.refresh
│ │ │ ├── System.Security.AccessControl.dll
│ │ │ ├── System.Security.AccessControl.dll.refresh
│ │ │ ├── System.Security.Claims.dll
│ │ │ ├── System.Security.Claims.dll.refresh
│ │ │ ├── System.Security.Cryptography.Algorithms.dll
│ │ │ ├── System.Security.Cryptography.Algorithms.dll.refresh
│ │ │ ├── System.Security.Cryptography.Encoding.dll
│ │ │ ├── System.Security.Cryptography.Encoding.dll.refresh
│ │ │ ├── System.Security.Cryptography.Primitives.dll
│ │ │ ├── System.Security.Cryptography.Primitives.dll.refresh
│ │ │ ├── System.Security.Cryptography.X509Certificates.dll
│ │ │ ├── System.Security.Cryptography.X509Certificates.dll.refresh
│ │ │ ├── System.Security.Principal.Windows.dll
│ │ │ ├── System.Security.Principal.Windows.dll.refresh
│ │ │ ├── System.Text.Encoding.CodePages.dll
│ │ │ ├── System.Text.Encoding.CodePages.dll.refresh
│ │ │ ├── System.Threading.Thread.dll
│ │ │ ├── System.Threading.Thread.dll.refresh
│ │ │ ├── System.ValueTuple.dll
│ │ │ ├── System.ValueTuple.dll.refresh
│ │ │ ├── System.Xml.ReaderWriter.dll
│ │ │ ├── System.Xml.ReaderWriter.dll.refresh
│ │ │ ├── System.Xml.XmlDocument.dll
│ │ │ ├── System.Xml.XmlDocument.dll.refresh
│ │ │ ├── System.Xml.XPath.dll
│ │ │ ├── System.Xml.XPath.dll.refresh
│ │ │ ├── System.Xml.XPath.XDocument.dll
│ │ │ ├── System.Xml.XPath.XDocument.dll.refresh
│ │ │ ├── vbc.exe
│ │ │ ├── vbc.exe.config
│ │ │ ├── vbc.exe.refresh
│ │ │ ├── vbc.rsp
│ │ │ ├── VBCSCompiler.exe
│ │ │ ├── VBCSCompiler.exe.config
│ │ │ └── VBCSCompiler.exe.refresh
│ │ ├── System.Web.Optimization.dll
│ │ ├── System.Web.Optimization.dll.refresh
│ │ ├── System.Web.Optimization.xml
│ │ ├── System.Web.Providers.dll
│ │ ├── System.Web.Providers.dll.refresh
│ │ ├── System.Web.Providers.xml
│ │ ├── WebGrease.dll
│ │ └── WebGrease.dll.refresh
│ ├── Bundle.config
│ ├── c0abfba2-0a48-462b-ae40-9d308b6dfe95
│ ├── Contact.aspx
│ ├── Contact.aspx.cs
│ ├── Content
│ │ ├── arialuni.ttf
│ │ ├── bootstrap.css
│ │ ├── bootstrap.css.map
│ │ ├── bootstrap.min.css
│ │ ├── bootstrap.min.css.map
│ │ ├── bootstrap-theme.css
│ │ ├── bootstrap-theme.css.map
│ │ ├── bootstrap-theme.min.css
│ │ ├── bootstrap-theme.min.css.map
│ │ └── Site.css
│ ├── Default.aspx
│ ├── Default.aspx.cs
│ ├── favicon.ico
│ ├── fonts
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.svg
│ │ ├── glyphicons-halflings-regular.ttf
│ │ ├── glyphicons-halflings-regular.woff
│ │ └── glyphicons-halflings-regular.woff2
│ ├── Global.asax
│ ├── packages.config
│ ├── PDFFolder
│ ├── Scripts
│ │ ├── bootstrap.js
│ │ ├── bootstrap.min.js
│ │ ├── img1.jpg
│ │ ├── img2.jpg
│ │ ├── jquery-3.3.1.intellisense.js
│ │ ├── jquery-3.3.1.js
│ │ ├── jquery-3.3.1.min.js
│ │ ├── jquery-3.3.1.min.map
│ │ ├── jquery-3.3.1.slim.js
│ │ ├── jquery-3.3.1.slim.min.js
│ │ ├── jquery-3.3.1.slim.min.map
│ │ ├── modernizr-2.8.3.js
│ │ ├── person.html
│ │ └── WebForms
│ │ ├── DetailsView.js
│ │ ├── Focus.js
│ │ ├── GridView.js
│ │ ├── Menu.js
│ │ ├── MenuStandards.js
│ │ ├── MSAjax
│ │ │ ├── MicrosoftAjaxApplicationServices.js
│ │ │ ├── MicrosoftAjaxComponentModel.js
│ │ │ ├── MicrosoftAjaxCore.js
│ │ │ ├── MicrosoftAjaxGlobalization.js
│ │ │ ├── MicrosoftAjaxHistory.js
│ │ │ ├── MicrosoftAjax.js
│ │ │ ├── MicrosoftAjaxNetwork.js
│ │ │ ├── MicrosoftAjaxSerialization.js
│ │ │ ├── MicrosoftAjaxTimer.js
│ │ │ ├── MicrosoftAjaxWebForms.js
│ │ │ └── MicrosoftAjaxWebServices.js
│ │ ├── SmartNav.js
│ │ ├── TreeView.js
│ │ ├── WebForms.js
│ │ ├── WebParts.js
│ │ └── WebUIValidation.js
│ ├── Site.master
│ ├── Site.master.cs
│ ├── Site.Mobile.master
│ ├── Site.Mobile.master.cs
│ ├── ViewSwitcher.ascx
│ ├── ViewSwitcher.ascx.cs
│ ├── Web.config
│ └── Web.Debug.config
└── WebSite1.sln
22 directories, 262 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论