2019-09-30
NuGet 官方
https://www.nuget.org/packages/HtmlRenderer.PdfSharp
https://archive.codeplex.com/?p=htmlrenderer
Sample
https://csharp.hotexamples.com/examples/TheArtOfDev.HtmlRenderer.PdfSharp/HtmlContainer/-/php-htmlcontainer-class-examples.html
HTML Renderer PdfSharp library!
http://htmlrenderer.codeplex.com
Demo Application
http://htmlrenderer.codeplex.com/wikipage?title=Demo%20application
Quick Start :
https://htmlrenderer.codeplex.com/wikipage?title=Quick%20start
using PdfSharp; using PdfSharp.Pdf; using System; using TheArtOfDev.HtmlRenderer.PdfSharp; namespace WebApplication3 { public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { PdfDocument pdf = PdfGenerator.GeneratePdf("<p>" + "<h1>Hello World</h1>This is html rendered text</p>" + @"<table border=1><tr><td>xxxx</table>", PageSize.A4); pdf.Save("D:\\Temp\\document.pdf"); } } } |
(完)
沒有留言:
張貼留言