Ironpdf for nuget
Author: a | 2025-04-25
Download IronPDF for NuGet latest version for Windows free to try. IronPDF for NuGet latest update: Febru
IronPdf 2025.1.1 - NuGet Gallery
介绍.NET Core 是微软开发的一个开源、跨平台框架,因其灵活性、性能和对基于云的应用程序的支持而越来越受欢迎。 然而,在处理 PDF 文件时,特别是在执行以下任务时打印 PDF 文档在翻译过程中,开发人员需要一个功能强大且丰富的 PDF 库。 这就是 IronPDF 帮助开发人员的地方。IronPDF是专为 .NET Framework(包括 .NET Core 和 ASP.NET Core)设计的综合库,可简化处理 PDF 文档的过程。 它不仅可以创建和处理 PDF 文件,还提供了无缝打印这些文档的方法,无论是直接打印到打印机还是将其转换为适合打印的格式。在本教程中,我们将深入介绍 IronPDF for .NET Core 环境下的功能。 从设置项目和创建第一个 PDF 文档,到配置打印设置和实现高级打印功能,我们将指导您完成每个步骤。本教程旨在让您掌握在 .NET Core 应用程序中高效处理打印 PDF 文件所需的知识和工具。如何在.NET Core中打印PDF文件在 Visual Studio 中创建 ASP.NET Core Web 项目使用 NuGet 软件包管理器安装 PDF 库在控制器中创建或加载 PDF 文档使用 PDF 库打印加载的 PDF 文件设置您的 .NET Core 项目安装 IronPDF - .NET PDF 库要开始在您的 .NET 应用程序中使用 PDF,第一步就是集成 IronPDF for .NET 库。 IronPDF for .NET 是一个功能强大、用途广泛的库,可让 .NET 开发人员轻松创建、编辑,最重要的是还能打印 PDF 文档。 让我们来了解一下安装过程:创建您的 .NET Core 项目:打开 Visual Studio 并选择 "创建新项目"。在项目模板选择窗口中,按 "所有平台 "下的 "Web "过滤,然后选择 "ASP.NET Core Web App"。安装 IronPDF:进入 "NuGet 包管理器",搜索 "IronPDF",将其安装到您的项目中。 确保 IronPdf 库已正确安装并在项目文件中引用。 您需要在代码中包含适当的 "using "语句,如 "using IronPdf;"。在 ASP.NET Core 中创建基本 PDF 文档要在 ASP.NET Core Web 应用程序中使用 IronPDF 创建 PDF 文档,首先要在其中一个控制器中添加一些代码。 下面是一个简单的例子:设置新控制器在项目中创建一个新控制器,负责处理 PDF 创建请求。 例如,您可以将其命名为 "PdfController"。编写操作方法在您的新控制器中,编写一个名为 "CreatePdf "的操作方法,其结果将返回一个 PDF 文件。using IronPdf;using Microsoft.AspNetCore.Mvc;namespace YourProjectName.Controllers{ public class PdfController : Controller { public IActionResult CreatePdf() { // Create a new PDF document var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf("Hello, IronPDF!This is a simple PDF document created in an ASP.NET Core web app."); // Save the PDF to the server's memory var content = pdf.Stream.ToArray(); // Return the PDF to the browser as a file download return File(content, "application/pdf", "MyFirstPdf.pdf"); } }}using IronPdf;using Microsoft.AspNetCore.Mvc;namespace YourProjectName.Controllers{ public class PdfController : Controller { public IActionResult CreatePdf() { // Create a new PDF document var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf("Hello, IronPDF!This is a simple PDF document created in an ASP.NET Core web app."); // Save the PDF to the server's memory var content = pdf.Stream.ToArray(); // Return the PDF to the browser as a file download return File(content, "application/pdf", "MyFirstPdf.pdf"); } }}Imports IronPdfImports Microsoft.AspNetCore.MvcNamespace YourProjectName.Controllers Public Class PdfController Inherits Controller Public Function CreatePdf() As IActionResult ' Create a new PDF document Dim renderer = New ChromePdfRenderer() Dim pdf = renderer.RenderHtmlAsPdf("Hello, IronPDF!This is a simple PDF document created in an ASP.NET Core web app.") ' Save the PDF to the server's memory Dim content = pdf.Stream.ToArray() ' Return the PDF to the browser as a file download Return File(content, "application/pdf", "MyFirstPdf.pdf") End Function End ClassEnd Namespace$vbLabelText $csharpLabel运行您的应用程序启动您的应用程序并导航到您的 PdfController 中的 CreatePdf 操作。 例如,如果您的应用程序运行在端口为 "5000 "的. Download IronPDF for NuGet latest version for Windows free to try. IronPDF for NuGet latest update: Febru Tools NuGet Package Manager Manage NuGet Packages for Solution; Browse for IronPDF and install. Using Command-Line: Follow these steps to install IronPDF using the Package Manager Console. Tools NuGet Package Manager Package Manager Console; Enter Install-Package IronPdf. Direct Download from NuGet: Navigate to NuGet IronPDF. Go to the Tools menu and choose NuGet Package Manager, then click on Manage NuGet Packages for Solution. Navigate to NuGet Package Manager. In the Browse tab, search for IronPDF in the search box. Search for IronPDF in NuGet Package Manager UI. Click on the IronPdf package and select it for your project, then click the Install button. 2. Install the IronPDF Library. To install the IronPDF Library we can use any of the methods listed below: 2.1. NuGet Package Manager. We can install the IronPDF C .NET Core Library from the NuGet Package Manager. Open the Package Manager by clicking on Tools NuGet Package Manager Manage NuGet Packages for Solution. Install the IronPDF C Library to your project. 1.1. Install with NuGet Package Manger. Install IronPDF in Visual Studio or at the command line with the NuGet Package Manager. In Visual Follow these steps to install IronPDF using the Package Manager Console. Enter Install-Package IronPdf. Navigate to NuGet IronPDF. Download and install the package. For Microsoft Visual Studio Users - the easiest way to install IronPdf is using the NuGet Package Manager. Select Manage Nuget Packages Select The IronPdf package to your lower left. LINQ to Entities, LINQ to XML, LINQ to Objects, RavenDB, debug visualizer, LINQ query visualizer, debugging LINQ, ORM profiler, Entity Framework profiler, NHibernate profiler C# PDF 2022.4.5575 ... coders are generating PDFs in minutes using the Visual Studio Nuget package manager. Functions: - Generate PDF documents ... Shareware | $499.00 tags: C# PDF, HTML, ASPX, VB.NET, ASP.NET, Html-to-pdf, ASP.NET, pdf c#, create, render, generate, convert, library ASPX to PDF 2022.4.5575 ... We then use the IronPDF library NuGet inside Visual Studio or similar .NET IDE. homepage Once the IronPDF ... of the HTML by converting it to a visually identical PDF file. This is a ASP.net html ... Shareware | $499.00 tags: ASPX, .Net, VB.Net, ASP.Net, asp, aspx to pdf, aspx-to-pdf, html to pdf, convertor, generator library, .Net software component RAD Studio 12.2 RAD Studio, developed by Embarcadero Technologies, Inc., is a comprehensive ... software development process. At its core, RAD Studio supports the development of native applications for Windows, ... One of the standout features of RAD Studio is its advanced visual design tools. The IDE ... Trialware Microsoft Visual Studio Professional 2022.17.13.4 Microsoft Visual Studio Professional is a robust, integrated development environment (IDE) ... projects. One of the key strengths of Visual Studio Professional is its comprehensive suite of features aimed ... errors. Collaboration is at the heart of Visual Studio Professional. It integrates seamlessly with Azure DevOps, ... Trialware SMTP/POP3/IMAP Email Lib Visual Basic 8.5.1 MarshallSoft SMTP/POP3/IMAP Visual Basic email component library (SEE4VB) uses a simple ... Base64 and quoted-printable encoded attachments, from within a Visual Basic application. Features SEE4VB include: - Send email ... add TO, CC, BCC recipients. - Includes multiple Visual Basic example programs. - Does not depend on ... Shareware | $139.00 tags: SMTP component, POP3 component, SMTP, POP3, IMAP, email component, sendComments
介绍.NET Core 是微软开发的一个开源、跨平台框架,因其灵活性、性能和对基于云的应用程序的支持而越来越受欢迎。 然而,在处理 PDF 文件时,特别是在执行以下任务时打印 PDF 文档在翻译过程中,开发人员需要一个功能强大且丰富的 PDF 库。 这就是 IronPDF 帮助开发人员的地方。IronPDF是专为 .NET Framework(包括 .NET Core 和 ASP.NET Core)设计的综合库,可简化处理 PDF 文档的过程。 它不仅可以创建和处理 PDF 文件,还提供了无缝打印这些文档的方法,无论是直接打印到打印机还是将其转换为适合打印的格式。在本教程中,我们将深入介绍 IronPDF for .NET Core 环境下的功能。 从设置项目和创建第一个 PDF 文档,到配置打印设置和实现高级打印功能,我们将指导您完成每个步骤。本教程旨在让您掌握在 .NET Core 应用程序中高效处理打印 PDF 文件所需的知识和工具。如何在.NET Core中打印PDF文件在 Visual Studio 中创建 ASP.NET Core Web 项目使用 NuGet 软件包管理器安装 PDF 库在控制器中创建或加载 PDF 文档使用 PDF 库打印加载的 PDF 文件设置您的 .NET Core 项目安装 IronPDF - .NET PDF 库要开始在您的 .NET 应用程序中使用 PDF,第一步就是集成 IronPDF for .NET 库。 IronPDF for .NET 是一个功能强大、用途广泛的库,可让 .NET 开发人员轻松创建、编辑,最重要的是还能打印 PDF 文档。 让我们来了解一下安装过程:创建您的 .NET Core 项目:打开 Visual Studio 并选择 "创建新项目"。在项目模板选择窗口中,按 "所有平台 "下的 "Web "过滤,然后选择 "ASP.NET Core Web App"。安装 IronPDF:进入 "NuGet 包管理器",搜索 "IronPDF",将其安装到您的项目中。 确保 IronPdf 库已正确安装并在项目文件中引用。 您需要在代码中包含适当的 "using "语句,如 "using IronPdf;"。在 ASP.NET Core 中创建基本 PDF 文档要在 ASP.NET Core Web 应用程序中使用 IronPDF 创建 PDF 文档,首先要在其中一个控制器中添加一些代码。 下面是一个简单的例子:设置新控制器在项目中创建一个新控制器,负责处理 PDF 创建请求。 例如,您可以将其命名为 "PdfController"。编写操作方法在您的新控制器中,编写一个名为 "CreatePdf "的操作方法,其结果将返回一个 PDF 文件。using IronPdf;using Microsoft.AspNetCore.Mvc;namespace YourProjectName.Controllers{ public class PdfController : Controller { public IActionResult CreatePdf() { // Create a new PDF document var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf("Hello, IronPDF!This is a simple PDF document created in an ASP.NET Core web app."); // Save the PDF to the server's memory var content = pdf.Stream.ToArray(); // Return the PDF to the browser as a file download return File(content, "application/pdf", "MyFirstPdf.pdf"); } }}using IronPdf;using Microsoft.AspNetCore.Mvc;namespace YourProjectName.Controllers{ public class PdfController : Controller { public IActionResult CreatePdf() { // Create a new PDF document var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf("Hello, IronPDF!This is a simple PDF document created in an ASP.NET Core web app."); // Save the PDF to the server's memory var content = pdf.Stream.ToArray(); // Return the PDF to the browser as a file download return File(content, "application/pdf", "MyFirstPdf.pdf"); } }}Imports IronPdfImports Microsoft.AspNetCore.MvcNamespace YourProjectName.Controllers Public Class PdfController Inherits Controller Public Function CreatePdf() As IActionResult ' Create a new PDF document Dim renderer = New ChromePdfRenderer() Dim pdf = renderer.RenderHtmlAsPdf("Hello, IronPDF!This is a simple PDF document created in an ASP.NET Core web app.") ' Save the PDF to the server's memory Dim content = pdf.Stream.ToArray() ' Return the PDF to the browser as a file download Return File(content, "application/pdf", "MyFirstPdf.pdf") End Function End ClassEnd Namespace$vbLabelText $csharpLabel运行您的应用程序启动您的应用程序并导航到您的 PdfController 中的 CreatePdf 操作。 例如,如果您的应用程序运行在端口为 "5000 "的
2025-04-05LINQ to Entities, LINQ to XML, LINQ to Objects, RavenDB, debug visualizer, LINQ query visualizer, debugging LINQ, ORM profiler, Entity Framework profiler, NHibernate profiler C# PDF 2022.4.5575 ... coders are generating PDFs in minutes using the Visual Studio Nuget package manager. Functions: - Generate PDF documents ... Shareware | $499.00 tags: C# PDF, HTML, ASPX, VB.NET, ASP.NET, Html-to-pdf, ASP.NET, pdf c#, create, render, generate, convert, library ASPX to PDF 2022.4.5575 ... We then use the IronPDF library NuGet inside Visual Studio or similar .NET IDE. homepage Once the IronPDF ... of the HTML by converting it to a visually identical PDF file. This is a ASP.net html ... Shareware | $499.00 tags: ASPX, .Net, VB.Net, ASP.Net, asp, aspx to pdf, aspx-to-pdf, html to pdf, convertor, generator library, .Net software component RAD Studio 12.2 RAD Studio, developed by Embarcadero Technologies, Inc., is a comprehensive ... software development process. At its core, RAD Studio supports the development of native applications for Windows, ... One of the standout features of RAD Studio is its advanced visual design tools. The IDE ... Trialware Microsoft Visual Studio Professional 2022.17.13.4 Microsoft Visual Studio Professional is a robust, integrated development environment (IDE) ... projects. One of the key strengths of Visual Studio Professional is its comprehensive suite of features aimed ... errors. Collaboration is at the heart of Visual Studio Professional. It integrates seamlessly with Azure DevOps, ... Trialware SMTP/POP3/IMAP Email Lib Visual Basic 8.5.1 MarshallSoft SMTP/POP3/IMAP Visual Basic email component library (SEE4VB) uses a simple ... Base64 and quoted-printable encoded attachments, from within a Visual Basic application. Features SEE4VB include: - Send email ... add TO, CC, BCC recipients. - Includes multiple Visual Basic example programs. - Does not depend on ... Shareware | $139.00 tags: SMTP component, POP3 component, SMTP, POP3, IMAP, email component, send
2025-03-29Iron Suite for .NET The full .NET Suite for your office Buy License Today What can you do with Iron Suite products? Convert HTML to PDF in .NET 9, 8, 7, 6, Core, & Framework Generate PDFs in C# using HTML, MVC, ASPX, & Images Sign, Edit, and Read PDFs with 5+ Features Install & Deploy in minutes with NuGet Explore IronPDF Intuitive C# & VB.NET Word and Docx Document API No need to install Microsoft Office or Word Interop Build, edit, & export Word document files Fully supports .NET 9, 8, 7, 6, Framework, Core, and Azure Explore IronWord Intuitive C# & VB.NET Excel Document API No need to install Microsoft Office or Excel Interop Read, edit, & create Excel spreadsheet files Fully supports .NET 9, 8, 7, 6, Framework, Core, and Azure Explore IronXL Intuitive C# & VB.NET PPTX Presentation API No need to install Microsoft Office or PowerPoint Interop Read & edit PowerPoint presentation files Fully supports .NET 9, 8, 7, 6, Framework, Core, and Azure Explore IronPPT OCR for C# to scan and read images & PDFs .NET OCR library with 127+ global language packs Output as text, structured data, or searchable PDFs Supports .NET 9, 8, 7, 6, Core, Standard, Framework Explore IronOCR Generate Barcodes in C# & VB .NET Applications Read Barcodes from Scanned Images & PDFs Supports .NET 9, 8, 7, 6, Core, Standard, Framework Explore IronBarcode Generate & Read QR Codes on Desktop, Mobile, or Cloud Custom Machine Learning Model reads any QR Code Fully supports .NET 9, 8, 7, 6, Core, Standard, Framework Explore IronQR Highly deployable printing library Choose to print with dialog or silent printing Built for WebApps, MAUI, Avalonia, and more Fully supports .NET 9, 8, 7, 6, Framework, and Core Explore IronPrint Create, Read, & Extract Archives on Desktop, Mobile, & Cloud Supports ZIP, TAR, GZIP, and BZIP2 Archives Fully supports .NET 9, 8, 7, 6, Core, Standard, and Framework Explore IronZIP C# framework for extracting clean, unstructured data from html web applications Useful for system migrations, populating search engines, competitive analysis and data mining Explore IronWebScraper A few of the reasons Iron Suite is a market leading .NET document suite. 10 for the Price of 2 You get all 10 Iron Software products for the price of 2 individual products. Up & running in 5 mins From the first download to working in production, in literally
2025-03-29"localhost "上,请在网络浏览器中访问 。下载 PDF访问 URL 后,将生成 PDF 文档并通过网络浏览器下载。 如果您想查看生成的 PDF,则必须使用 PDF 查看器在计算机上阅读。使用 IronPDF for .NET 在 .NET Core 中打印 PDF 文档一旦掌握了在 ASP.NET Core Web App 中创建 PDF 文档的方法,下一步就是实现打印功能。 IronPDF 提供了一种在项目中打印 PDF 文档的直接方法,可将文档打印到运行应用程序的服务器可访问的打印机上。配置默认打印机和打印机名称要打印 PDF 文档,您需要在应用程序中配置打印机设置。 IronPdf 允许您通过打印机名称指定打印机,打印机可以是本地安装的打印机,也可以是网络打印机。 此外,您还可以定义纸张来源或方向等其他设置。下面是您的 PdfController 类程序中的一个示例方法,用于配置打印机设置并启动打印作业:using IronPdf;using Microsoft.AspNetCore.Mvc;public class PdfController : Controller{ public IActionResult PrintPdf() { // Assuming 'htmlContent' is the HTML string you want to print var htmlContent = "InvoiceThank you for your business!"; // Render the HTML content to a PDF in memory var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf(htmlContent); // Get the PrintDocument from the PDF var printDoc = pdf.GetPrintDocument(); // Set the printer name printDoc.PrinterSettings.PrinterName = "Your Printer Name"; // Replace with your printer's name // Optional: Set other printer settings // printDoc.PrinterSettings.Copies = 2; // printDoc.DefaultPageSettings.Landscape = true; // Print the document printDoc.Print(); // Return a response to the client, e.g., a confirmation message return Content("The document has been sent to the printer."); }}using IronPdf;using Microsoft.AspNetCore.Mvc;public class PdfController : Controller{ public IActionResult PrintPdf() { // Assuming 'htmlContent' is the HTML string you want to print var htmlContent = "InvoiceThank you for your business!"; // Render the HTML content to a PDF in memory var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf(htmlContent); // Get the PrintDocument from the PDF var printDoc = pdf.GetPrintDocument(); // Set the printer name printDoc.PrinterSettings.PrinterName = "Your Printer Name"; // Replace with your printer's name // Optional: Set other printer settings // printDoc.PrinterSettings.Copies = 2; // printDoc.DefaultPageSettings.Landscape = true; // Print the document printDoc.Print(); // Return a response to the client, e.g., a confirmation message return Content("The document has been sent to the printer."); }}Imports IronPdfImports Microsoft.AspNetCore.MvcPublic Class PdfController Inherits Controller Public Function PrintPdf() As IActionResult ' Assuming 'htmlContent' is the HTML string you want to print Dim htmlContent = "InvoiceThank you for your business!" ' Render the HTML content to a PDF in memory Dim renderer = New ChromePdfRenderer() Dim pdf = renderer.RenderHtmlAsPdf(htmlContent) ' Get the PrintDocument from the PDF Dim printDoc = pdf.GetPrintDocument() ' Set the printer name printDoc.PrinterSettings.PrinterName = "Your Printer Name" ' Replace with your printer's name ' Optional: Set other printer
2025-04-20Use the library don't have to be.Which means that you may use libwkhtmltox and IronPDF in commercial applications without being open source your self.PDFClownPDFClown is also an LGLP project, and is incorporated into IronPdf as on of our page-stamping gambits. We love this library - and are awed at how smart Stefano Chizzolini is to simultaneously develop for Java and .NetAgain - here is his attribution citation:PDFClown Copyright 2008-2012 Stefano Chizzolini. Stefano Chizzolini (original code developer, file should be part of the source code distribution of "PDF Clown library" (the Program): see the accompanying README files for more info. This Program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This Program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, either expressed or implied; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more details. You should have received a copy of the GNU Lesser General Public License along with this Program (see README files); if not, go to the GNU website ( Redistribution and use, with or without modification, are permitted provided that such redistributions retain the above copyright notice, license and disclaimer, along with this list of conditions. To see the full text of that sublicense license please go to: Cite TLDR Legal:This license is mainly applied to libraries. You may copy, distribute and modify the software provided that modifications are described and licensed for free under LGPL. Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL, but applications that use the library don't have to be.Which means that you may use PDFClown and IronPDF in commercial applications without being open source your self.Special ThanksThanks should also go to Slava Kolobaev and his work on the Pechkin PDF Interop for C# Project.We were inspired by his clean C# architecture - and although out library does
2025-03-28在本文中,我们将比较两个最常用的 OCR 光栅格式和 PDF 文档图像库和应用程序。 它们是Aspose.OCRIronOCR1.0 简介1.1 Aspose.OCR 简介和功能Aspose.OCR for .NET 是一款功能强大的光学字符识别软件包。 这对任何应用程序来说都是一个极好的补充,可以实现流程自动化。 独立的 OCR API 具有可扩展性、用户友好性和紧凑性。 它包含一组简单的类,可提供开始识别文本所需的所有功能,无需任何额外的麻烦,并能保持正确的文本顺序。 Aspose.OCR 可读取 100 多种不同的格式,并提供了大量有用的功能,包括读取字体、应用样式效果等。(粗体/斜体)此外,您还可以在翻译过程中去除图像中的噪点。 API 可以使用 GPU 执行光学字符识别,从而节省 CPU 的功耗。Aspose.OCR 的功能以编程方式检测、识别和读取图像中的字符。扫描整个图像或仅扫描图像的特定部分。对 OCR 操作进行倾斜校正。 扫描旋转图像。支持 JPEG、PNG、GIF 等格式。有关支持的文件格式的完整列表,请访问支持的文件格式页面并订阅 Aspose 产品。支持多种字符,包括数字和字母。 有关支持字符的完整列表,请访问支持字符页面。目前,它支持 20 种欧洲语言和中文。检测并读取 Arial、Times New Roman、Courier New、Tahoma、Calibri 和 Verdana 等常用字体。支持正体、粗体和斜体字体样式。应用各种去噪过滤器来辅助图像识别。计算行或段落的边界框。获取每个识别字符的可能选择。传递 URI 并从中识别图像。识别文件夹或压缩包中的多个图像。以 JSON 格式获取结果。将结果保存为文本、DOCX 或 PDF 格式对于切换导航的集成,Aspose 是一个不错的选择。 识别文本控制台和文档文本识别或图像到文本或图像 OCR API 是可能有用的功能示例。除自动拼写检查外,图像检测软件的设计还支持多种输出格式(如 PNG)在翻译过程中,翻译人员必须能够在不需要额外的 OCR API 的情况下忽略非文本块。 可在开发环境中访问独立的 API 功能,从图像中捕捉文本。1.2 IronOCR - 简介和功能IronOCR for .NET在 .NET 应用程序和网站中读取照片和 PDF 中的文本内容。 该软件有助于扫描照片中的文字和 BarCode。 它能以纯文本或结构化数据的形式输出内容。 IronOCR 支持多种全球语言。 OCR 库可用于 MVC、Web、控制台和桌面 .NET 应用程序。 对于商业部署,在开发团队的直接协助下提供 License。IronOCR 使用最新的 Tesseract 5 引擎,可以从任何图片或 PDF 格式中读取文本、条形码和 QR 码。 该库可将 OCR 快速添加到桌面、控制台和网络应用程序中。IronOCR支持127种国际语言。 它还支持自定义语言和单词表。它可以读取 20 多种条形码和 QR 码格式。IronOCR 支持多页 GIF 和 TIFF 图像格式。它可以纠正低质量的扫描图像。IronOCR 支持多线程。 它可以同时执行一个或多个进程。IronOCR 可以将结构化数据输出到页面、段落、行、单词、字符等。IronOCR 支持 Windows、Linux、macOS 等操作系统。2.在 Visual Studio 中创建新项目打开 Visual Studio,进入文件菜单。 选择新建项目,然后选择控制台应用程序。控制台应用程序在相应文本框中输入项目名称并选择文件路径。 然后,单击 Create 按钮并选择 .NET Framework:新项目配置现在,项目将为所选应用程序生成结构。程序.cs 文件3.0 安装3.1 安装 Aspose.OCR通过 NuGet 安装 Aspose.OCR for .NET我们可以使用 NuGet 在应用程序中安装 Aspose.OCR API。 只需进入 Visual Studio 的 "工具 "菜单,选择 "NuGet 包管理器 "即可。 从侧菜单中选择 Manage NuGet Package for a solution。 它将打开一个 NuGet 包管理器窗口。 转到 "浏览 "选项卡并搜索 Aspose.OCR。 然后从搜索结果中选择 Aspose API,点击 "安装 "按钮。 Aspose API 将在项目中安装和使用。使用软件包管理器控制台安装或更新 Aspose.OCR同样,您也可以使用控制台安装 Aspose.OCR。 打开通常位于 Visual Studio 项目底部的 NuGet 控制台,编写以下命令并点击回车。“Install-Package Aspose.OCR -Version x.x.0”3.2 安装 IronOCRIronOCR 库可以通过四种方式下载和安装。它们是使用 Visual Studio。使用命令行。直接从 NuGet 网站下载。从 IronPDF 网站下载。3.2.1 使用 Visual Studio下面的截图显示了如何打开 NuGet 包管理器。NuGet 软件包管理器在 "软件包管理器 "窗口中,点击 "浏览 "并搜索关键字 "IronOCR",如下图所示:IronOCR 安装从上图中,我们可以看到相关搜索的列表。 我们需要选择所需的选项,将软件包安装到解决方案中。3.2.2 使用命令行在 Visual Studio 中转到工具 -> NuGet软件包管理器 -> 软件包管理器控制台在控制台选项卡中输入以下一行。现在,软件包将下载/安装到当前项目,并可随时使用。3.2.3 直接从 NuGet 网站下载第三种方法是直接从网站上下载 NuGet 软件包。导航至链接.从右侧菜单中选择下载包选项。双击下载的软件包。 它将自动安装。接下来,重新加载解决方案并开始在项目中使用。3.2.4 直接从 IronOCR 网站下载点击链接请点击此处直接从网站下载最新软件包。下载完成后,请按照以下步骤将软件包添加到项目中。右键单击解决方案窗口中的项目。然后,选择 "参考文献 "选项并浏览下载参考文献的位置。然后,单击 "确定 "添加引用。4.0 OCR 图像IronOCR 和 Aspose.OCR 都有一种 OCR 技术,可以将图像转换成文本。4.1 使用 Aspose.OCR下面的代码片段演示了使用识别图像方法对页面图像执行 OCR 操作。// For complete examples and data files, please go to The path to the documents directory.string dataDir = RunExamples.GetDataDir_OCR();// Initialize an instance of AsposeOcrAsposeOcr api = new AsposeOcr();// Recognize imagestring result = api.RecognizeImage(dataDir + "Sampleocr.bmp");// Display the recognized textConsole.WriteLine(result);// For complete examples and data files, please go to The path to the documents directory.string dataDir = RunExamples.GetDataDir_OCR();// Initialize an instance of AsposeOcrAsposeOcr api = new AsposeOcr();// Recognize imagestring result = api.RecognizeImage(dataDir + "Sampleocr.bmp");// Display the recognized textConsole.WriteLine(result);' For complete examples and data files, please go to The path to the documents directory.Dim dataDir As String = RunExamples.GetDataDir_OCR()' Initialize an instance of AsposeOcrDim api As New AsposeOcr()' Recognize imageDim result As String = api.RecognizeImage(dataDir & "Sampleocr.bmp")' Display the recognized textConsole.WriteLine(result)$vbLabelText $csharpLabel下面的代码片段演示了使用识别线方法对包含单行的图像执行 OCR 操作。// For complete examples and data files, please go to The path to the documents directory.string dataDir = RunExamples.GetDataDir_OCR();// Initialize an instance of AsposeOcrAsposeOcr api = new AsposeOcr();// Recognize imagestring result = api.RecognizeLine(dataDir + "sample_line.png");// Display the recognized textConsole.WriteLine(result);// For complete examples and data files, please go to The path to the documents directory.string dataDir = RunExamples.GetDataDir_OCR();// Initialize an instance of AsposeOcrAsposeOcr api = new AsposeOcr();// Recognize imagestring result = api.RecognizeLine(dataDir + "sample_line.png");// Display the recognized textConsole.WriteLine(result);' For complete examples and data files, please go to The path to the documents directory.Dim dataDir As String = RunExamples.GetDataDir_OCR()' Initialize an instance of AsposeOcrDim api As New AsposeOcr()' Recognize imageDim result As String = api.RecognizeLine(dataDir & "sample_line.png")' Display the recognized textConsole.WriteLine(result)$vbLabelText $csharpLabel4.2 使用 IronOCRvar Ocr = new IronTesseract(); // nothing to configureOcr.Language = OcrLanguage.EnglishBest;Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5;using (var Input = new OcrInput()){ Input.AddImage(@"3.png"); var Result = Ocr.Read(Input); Console.WriteLine(Result.Text); Console.ReadKey();}var Ocr
2025-04-25