2018-03-14
免費版的 Spire.PDF 如果產生的 .pdf 會超過 10 頁就會出現錯誤。
Spire.PDF for .NET
https://www.e-iceblue.com/Introduce/pdf-for-net-introduce.html
Spire.PDF for .NET is a professional PDF component applied to creating, writing, editing, handling and reading PDF files without any external dependencies within .NET application. Using this .NET PDF library, you can implement rich capabilities to create PDF files from scratch or process existing PDF documents entirely through C#/VB.NET without installing Adobe Acrobat.
Free Spire.PDF for .NET
https://www.e-iceblue.com/Introduce/free-pdf-component.html
Free Spire.PDF for .NET is a Community Edition of the Spire.PDF for .NET, which is a totally free PDF component for commercial and personal use. As a standalone C#/VB.NET component, Free Spire.PDF for .NET enables developers to create, write, edit, convert, print, handle and read PDF files on any .NET applications.
價格
https://www.e-iceblue.com/Buy/Spire.PDF.html
Spire.PDF Pro Edition Developer Subscription
$599.00 1 Developer & 1 Deployment Location
Spire.PDF Pro Edition Developer OEM Subscription
$1 799.00 1 Developer & Unlimited Deployment Locations
Spire.PDF Pro Edition Site Enterprise Subscription
$3 070.00 Unlimited Developers & Up to 10 Deployment Locations
Spire.PDF Pro Edition Site OEM Subscription
$6 980.00 Unlimited Developers & Unlimited Deployment Locations
Spire PDF for .NET 在ASP.NET中的使用 ---- 并非那么“美好”,有些挫折!
2015-03-06
https://www.bbsmax.com/A/GBJrY2a3z0/
參考範例
How to convert HTML into PDF in C#, VB.NET
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-HTML-to-PDF-Customize-HTML-to-PDF-Conversion-by-Yourself.html
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SpirePDFTest.Default" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> </div> </form> </body> </html> |
Default.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Spire.Pdf; namespace SpirePDFTest { public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { //Create a pdf document. PdfDocument doc = new PdfDocument(); //String url = "http://www.london2012.com/news/articles/paralympic-torch-relay-route-revealed-1258473.html"; String url = "http://www.hinet.net"; Thread thread = new Thread(() => { doc.LoadFromHTML(url, false, true, true); }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); thread.Join(); //Save pdf file. doc.SaveToFile("sample.pdf"); doc.Close(); //Launching the Pdf file. System.Diagnostics.Process.Start("sample.pdf"); } } } |
(下圖) 免費版的 Spire.PDF 如果產生的 .pdf 會超過 10 頁就會出現錯誤。
相關
[研究][C#][ASP.NET] 試用 Free Spire.PDF for .NET 建立 pdf 檔案 (NuGet 安裝)
http://shaurong.blogspot.com/2018/03/aspnet-free-spirepdf-for-net-pdf.html
[研究][C#][ASP.NET] SelectPdf 社群版 - 免費 HTML to PDF v17.3.0 的 Url to Pdf 試用 (NuGet 安裝)
http://shaurong.blogspot.com/2018/03/caspnet-selectpdf-html-to-pdf-url-to-pdf.html
[研究][C#][ASP.NET] iTextSharp v7.1.1 產生 pdf 試用 (NuGet 安裝)
http://shaurong.blogspot.com/2018/03/caspnet-itextsharp-v711-pdf-nuget.html
[研究][C#][ASP.NET] iTextSharp v5.5.13 產生 pdf 試用 (NuGet 安裝)
http://shaurong.blogspot.com/2018/03/caspnet-itextsharp-v5513-pdf-nuget.html
[研究][C#][ASP.NET] 免費 PDFsharp v1.32.3057.0 產生 pdf 試用 (NuGet 安裝)
http://shaurong.blogspot.com/2018/03/caspnet-pdfsharp-v13230570-pdf-nuget.html
沒有留言:
張貼留言