跳至页脚内容
.NET 帮助

.NET MAUI Blazor 用于(PDF、EXCEL、OCR、条形码、二维码)

.NET 多平台应用程序 UI (.NET MAUI) 包括 BlazorWebView 控件,允许开发人员使用 Visual Studio 将 MAUI Blazor 服务器应用程序集成到 .NET MAUI 项目中。 这些被称为 .NET MAUI Blazor 应用程序的 Blazor 混合应用程序,实现了 Blazor 混合应用程序与特定平台功能的集成,并呈现 Web UI(用户界面)控件。 这些 .NET MAUI Blazor 应用程序是跨平台应用程序,因为 .NET MAUI 是一个跨平台框架,不需要特定平台的代码。 我们可以在 Android 设备/Android 模拟器、iOS、macOS、Mac Catalyst 和 Windows 操作系统计算机上使用 .NET MAUI 应用程序。

可以将BlazorWebView控件添加到.NET MAUI原生应用的任何页面,并指向MAUI Blazor Web应用程序的根目录。 .NET MAUI Blazor Web 应用程序的 Razor 组件将在 .NET 进程中原生运行,并通过嵌入的 Web 视图控件呈现 Web UI 组件。 MAUI Blazor 混合应用程序、桌面应用程序或 Windows 表单可以在 .NET MAUI 支持的所有不同平台上使用,包括浏览器沙盒。

IronPDF: A .NET PDF 库

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 1: IronPDF

IronPDF

作为一名 C# 开发人员,您知道拥有正确工作工具的重要性。 这就是 IronPDF 的作用。 这个强大的 .NET 类库使得使用 .NET Core 和 .NET 技术通过跨平台 API 创建 PDF 处理应用程序变得容易。IronPDF 使用 .NET Chromium 引擎将 HTML 页面(代码或 URL 形式)转换为 PDF 文件,从而消除对复杂 API 和手动设计工作的需求。 它支持标准的网络文档,如 HTML、ASPX、JS、CSS 和图像。

与 Blazor 和 .NET MAUI 的兼容性

IronPDF 可以轻松集成到使用 Blazor 组件和 .NET MAUI 框架构建的应用程序中,为开发人员提供多种用于创建和操作 PDF 文档的功能。 这些功能包括生成 HTML、XML 和其他文件格式的 PDF 的能力,以及通过添加或修改文本、图像和其他 .NET MAUI 工作负载元素来编辑现有的 PDF。

创建 .NET MAUI Blazor 应用的步骤

请按照以下步骤在 Visual Studio 中创建 .NET MAUI 应用。

步骤 1:打开 Visual Studio

打开最新版本的 Visual Studio 并启用开发者模式。 建议使用最新版本的 Visual Studio。

步骤 2:搜索 .NET Blazor

现在单击创建新项目按钮并搜索 .NET MAUI Blazor 模板。 从搜索结果中选择 ".NET MAUI Blazor 应用" 并单击下一步按钮。

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 2: Search .NET MAUI Blazor App

创建 Visual Studio .NET MAUI 应用程序

步骤 3:设置项目名称

为项目取一个合适的名称并单击下一步按钮。

步骤 4:.NET Framework

选择 .NET 目标框架。 建议使用最新的框架以确保工作顺利。 选择框架后,单击创建按钮。

通过遵循上述步骤,将创建一个 .NET MAUI Blazor 应用。

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 3: Search .NET MAUI Blazor App

创建 Visual Studio .NET MAUI 应用程序

让我们看看如何使用这个根 Blazor 组件项目来实现 IronPDF。

将 Blazor 内容导出为 PDF

我们可以非常轻松地使用以下代码将 Blazor 内容转换为 PDF。

首先,打开Index.razor文件,并将代码替换为以下代码:

@page "/"

<input @bind="InputValue" placeholder="Enter HTML content" />
<button @onclick="SubmitHTML">Render HTML</button>

@code {
    // Property to bind input value
    private string InputValue { get; set; }

    // Async method to render HTML as PDF and save
    private async Task SubmitHTML()
    {
        // Create an instance of ChromePdfRenderer
        var renderer = new IronPdf.ChromePdfRenderer();

        // Render the HTML input value as a PDF document
        var doc = renderer.RenderHtmlAsPdf(InputValue);

        // Save the document as 'Test.pdf' on the local file system
        doc.SaveAs("Test.pdf");
    }
}
@page "/"

<input @bind="InputValue" placeholder="Enter HTML content" />
<button @onclick="SubmitHTML">Render HTML</button>

@code {
    // Property to bind input value
    private string InputValue { get; set; }

    // Async method to render HTML as PDF and save
    private async Task SubmitHTML()
    {
        // Create an instance of ChromePdfRenderer
        var renderer = new IronPdf.ChromePdfRenderer();

        // Render the HTML input value as a PDF document
        var doc = renderer.RenderHtmlAsPdf(InputValue);

        // Save the document as 'Test.pdf' on the local file system
        doc.SaveAs("Test.pdf");
    }
}
$vbLabelText   $csharpLabel

此代码有助于将生成的 PDF 文件下载到本地计算机上。通过这种方式,我们可以利用 IronPDF 在不使用任何外部库的情况下将 Blazor 内容转换为 PDF 文件。

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 4: Blazor Content to PDF

使用 .NET MAUI Blazor 生成 PDF

我们将在文本框中输入以下 HTML:

<!DOCTYPE html>
<html>
  <head>
    <link href='https://fonts.googleapis.com/css2?family=Popin&display=swap' rel='stylesheet'>
    <style>
      /* Add CSS styles for the invoice here */
      body{
        font-family: 'Popin', cursive;
      }
      .invoice {
        width: 80%;
        margin: 0 auto;
        border: 1px solid #ccc;
        padding: 20px;
        background-color: #f5f5f5;
        color: #333;
      }
      .invoice h1 {
        text-align: center;
      }
      .invoice .invoice-info {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
      }
      .invoice .invoice-info div {
        width: 45%;
      }
      .invoice table {
        width: 100%;
        border-collapse: collapse;
      }
      .invoice table th, .invoice table td {
        border: 1px solid #ccc;
        padding: 10px;
      }
      .invoice table th {
        text-align: left;
        background-color: #f5f5f5;
      }
      .invoice table td {
        text-align: right;
      }
      .invoice table td.total {
        font-weight: bold;
      }
    </style>
  </head>
  <body>
    <div class="invoice">
      <h1>Invoice</h1>
      <div class="invoice-info">
        <div>
          <p><strong>From:</strong></p>
          <p>Your Company Name</p>
          <p>123 Main St</p>
          <p>City, State ZIP</p>
        </div>
        <div>
          <p><strong>To:</strong></p>
          <p>Customer Name</p>
          <p>456 Park Ave</p>
          <p>City, State ZIP</p>
        </div>
      </div>
      <table>
        <thead>
          <tr>
            <th>Product</th>
            <th>Quantity</th>
            <th>Price</th>
            <th>Total</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Product 1</td>
            <td>1</td>
            <td>$10.00</td>
            <td>$10.00</td>
          </tr>
          <tr>
            <td>Product 2</td>
            <td>2</td>
            <td>$5.00</td>
            <td>$10.00</td>
          </tr>
          <tr>
            <td colspan="3" class="total">Total:</td>
            <td class="total">$20.00</td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>
<!DOCTYPE html>
<html>
  <head>
    <link href='https://fonts.googleapis.com/css2?family=Popin&display=swap' rel='stylesheet'>
    <style>
      /* Add CSS styles for the invoice here */
      body{
        font-family: 'Popin', cursive;
      }
      .invoice {
        width: 80%;
        margin: 0 auto;
        border: 1px solid #ccc;
        padding: 20px;
        background-color: #f5f5f5;
        color: #333;
      }
      .invoice h1 {
        text-align: center;
      }
      .invoice .invoice-info {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
      }
      .invoice .invoice-info div {
        width: 45%;
      }
      .invoice table {
        width: 100%;
        border-collapse: collapse;
      }
      .invoice table th, .invoice table td {
        border: 1px solid #ccc;
        padding: 10px;
      }
      .invoice table th {
        text-align: left;
        background-color: #f5f5f5;
      }
      .invoice table td {
        text-align: right;
      }
      .invoice table td.total {
        font-weight: bold;
      }
    </style>
  </head>
  <body>
    <div class="invoice">
      <h1>Invoice</h1>
      <div class="invoice-info">
        <div>
          <p><strong>From:</strong></p>
          <p>Your Company Name</p>
          <p>123 Main St</p>
          <p>City, State ZIP</p>
        </div>
        <div>
          <p><strong>To:</strong></p>
          <p>Customer Name</p>
          <p>456 Park Ave</p>
          <p>City, State ZIP</p>
        </div>
      </div>
      <table>
        <thead>
          <tr>
            <th>Product</th>
            <th>Quantity</th>
            <th>Price</th>
            <th>Total</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Product 1</td>
            <td>1</td>
            <td>$10.00</td>
            <td>$10.00</td>
          </tr>
          <tr>
            <td>Product 2</td>
            <td>2</td>
            <td>$5.00</td>
            <td>$10.00</td>
          </tr>
          <tr>
            <td colspan="3" class="total">Total:</td>
            <td class="total">$20.00</td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>
HTML

MAUI Blazor 应用生成的输出如下所示。

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 5: PDF Output

使用 .NET MAUI Blazor 生成 PDF

通过 Blazor PDF 创建教程.NET MAUI 应用程序获取有关 IronPDF 的更多信息。

IronXL

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 6: IronXL

IronXL

IronXL 是一个 .NET 库,允许开发人员以 C# 读取、编辑和创建 Excel 电子表格。 它不需要安装 Microsoft Excel,并支持包括 Android、iOS、macOS、Windows 计算机和 Azure 在内的所有平台。 它提供了一系列功能,例如从各种格式加载和编辑数据、保存和导出到各种格式,并处理System.Data对象、处理公式、排序数据和样式单元格。 此外,它可作为 NuGet 包提供,并在其网站和 GitHub 仓库中提供文档和示例。

IronXL 支持 .NET MAUI 和 Blazor,使用户能够从包括 Excel 电子表格、Web 或 Azure 服务和其他应用程序在内的各种来源访问或获取数据。 借助 IronXL 对 .NET MAUI 和 Blazor 的支持,开发人员能够获得最强大工具来开发引人入胜的用户界面,无论是在 iOS、macOS、Windows 还是 Android 设备上。

让我们看看 IronXL 的示例代码:

using IronXL;
using IronXl.Formatting;
using IronXl.Formatting.Enums;
using IronXl.Styles;

// Load an existing Excel workbook
WorkBook workbook = WorkBook.Load("test.xlsx");
WorkSheet sheet = workbook.DefaultWorkSheet;

// Create a specific conditional formatting rule for cells with values less than 8
ConditionalFormattingRule rule = sheet.ConditionalFormatting.CreateConditionalFormattingRule(ComparisonOperator.LessThan, "8");

// Set different style options for the rule
rule.FontFormatting.IsBold = true; // Bold text
rule.FontFormatting.FontColor = "#123456"; // Custom font color
rule.BorderFormatting.RightBorderColor = "#ffffff"; // Right border color
rule.BorderFormatting.RightBorderType = BorderType.Thick; // Right border thickness
rule.PatternFormatting.BackgroundColor = "#54bdd9"; // Background color
rule.PatternFormatting.FillPattern = FillPattern.Diamonds; // Fill pattern

// Add the formatting rule to the specified cell range
sheet.ConditionalFormatting.AddConditionalFormatting("A3:A8", rule);

// Create another conditional formatting rule for values between 7 and 10
ConditionalFormattingRule rule1 = sheet.ConditionalFormatting.CreateConditionalFormattingRule(ComparisonOperator.Between, "7", "10");

// Set additional style options for the new rule
rule1.FontFormatting.IsItalic = true; // Italic text
rule1.FontFormatting.UnderlineType = FontUnderlineType.Single; // Single underline

// Add this formatting rule to a different range of cells
sheet.ConditionalFormatting.AddConditionalFormatting("A3:A9", rule1);

// Save the workbook with the applied conditional formatting
workbook.SaveAs("ApplyConditionalFormatting.xlsx");
using IronXL;
using IronXl.Formatting;
using IronXl.Formatting.Enums;
using IronXl.Styles;

// Load an existing Excel workbook
WorkBook workbook = WorkBook.Load("test.xlsx");
WorkSheet sheet = workbook.DefaultWorkSheet;

// Create a specific conditional formatting rule for cells with values less than 8
ConditionalFormattingRule rule = sheet.ConditionalFormatting.CreateConditionalFormattingRule(ComparisonOperator.LessThan, "8");

// Set different style options for the rule
rule.FontFormatting.IsBold = true; // Bold text
rule.FontFormatting.FontColor = "#123456"; // Custom font color
rule.BorderFormatting.RightBorderColor = "#ffffff"; // Right border color
rule.BorderFormatting.RightBorderType = BorderType.Thick; // Right border thickness
rule.PatternFormatting.BackgroundColor = "#54bdd9"; // Background color
rule.PatternFormatting.FillPattern = FillPattern.Diamonds; // Fill pattern

// Add the formatting rule to the specified cell range
sheet.ConditionalFormatting.AddConditionalFormatting("A3:A8", rule);

// Create another conditional formatting rule for values between 7 and 10
ConditionalFormattingRule rule1 = sheet.ConditionalFormatting.CreateConditionalFormattingRule(ComparisonOperator.Between, "7", "10");

// Set additional style options for the new rule
rule1.FontFormatting.IsItalic = true; // Italic text
rule1.FontFormatting.UnderlineType = FontUnderlineType.Single; // Single underline

// Add this formatting rule to a different range of cells
sheet.ConditionalFormatting.AddConditionalFormatting("A3:A9", rule1);

// Save the workbook with the applied conditional formatting
workbook.SaveAs("ApplyConditionalFormatting.xlsx");
$vbLabelText   $csharpLabel

上面的代码帮助您打开已经存在的 Excel 文件并对不同的单元格范围应用条件格式。 通过以下 Excel 条件格式化教程了解更多关于 IronXL 的教程。

IronOCR

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 7: IronOCR

IronOCR

IronOCR 是一个广泛使用的 OCR 工具,广受 C# 开发者欢迎,提供了一个简单的 API 以便在 C# 应用程序中集成 OCR 功能。 它可以有效地从扫描文档、PDF 和图像等多种来源中提取文本,采用高级机器学习算法,即便是扭曲或难以辨认的文本也能准确识别。 IronOCR 为 C# 开发人员提供了一系列自定义选项,包括调整识别文本的语言、字体和字符集、预测集合,以及预处理图像以提高 OCR 准确性。 这些自定义功能允许开发人员根据特定需求优化 IronOCR 的性能。

IronOCR 是一个强大的 OCR 识别库,支持 .NET MAUI 和 Blazor。 借助 IronOCR,开发人员可以快速创建跨平台应用程序,而无需担心扫描、读取和编写大量文本数据的复杂性。 没有其他 OCR 软件可以为用户提供如此简单集成的开发工具。

查看 IronOCR 示例,演示如何使用 IronOCR 从 PDF 文件中提取文本。

using IronOcr;

var ocrTesseract = new IronTesseract();

using (var ocrInput = new OcrInput())
{
    // OCR the entire document
    ocrInput.AddPdf("example.pdf", "password");

    // Alternatively OCR selected page numbers
    ocrInput.AddPdfPages("example.pdf", new[] { 1, 2, 3 }, "password");

    var ocrResult = ocrTesseract.Read(ocrInput);
    Console.WriteLine(ocrResult.Text);
}
using IronOcr;

var ocrTesseract = new IronTesseract();

using (var ocrInput = new OcrInput())
{
    // OCR the entire document
    ocrInput.AddPdf("example.pdf", "password");

    // Alternatively OCR selected page numbers
    ocrInput.AddPdfPages("example.pdf", new[] { 1, 2, 3 }, "password");

    var ocrResult = ocrTesseract.Read(ocrInput);
    Console.WriteLine(ocrResult.Text);
}
$vbLabelText   $csharpLabel

通过访问这个 .NET MAUI OCR 教程了解更多关于如何在 .NET Maui 中使用 IronOCR 的教程。

通过以下 PDF OCR 教程了解更多关于 IronOCR 的教程。

IronBarcode

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 8: IronBarcode

IronBarcode

IronBarcode 是一个 C# 库,使开发人员可以轻松地在他们的 C# 应用程序中添加条码读取和写入功能。 这个库特别适用于那些涉及扫描或生成条码的项目,例如库存管理系统或销售点系统。 IronBarcode 的一个关键功能是其读取和写入多种条码格式的能力,包括 QR 码、Code 39、Code 128 以及其他。 这意味着开发人员可以根据项目的需求使用它来处理各种不同的条码类型。

IronBarcode 支持 .NET MAUI 和 Blazor,这两个框架被开发人员广泛用于构建现代跨平台应用程序。 这对开发人员来说很有利,因为这使他们能够轻松将 IronBarcode 强大的条码生成和扫描功能集成到他们的 .NET MAUI 和 Blazor 项目中。

以下代码示例展示了如何使用 IronBarcode 读取多种类型的条码。 这是一个非常简单且易于理解的过程。

using IronBarCode;
using IronSoftware.Drawing;

// Reading a barcode is easy with IronBarcode.
// Read from a File, Bitmap, Image, or Stream:

var resultFromFile = BarcodeReader.Read(@"file/barcode.png"); // From a file

var resultFromBitMap = BarcodeReader.Read(new Bitmap("barcode.bmp")); // From a bitmap

var resultFromAnyBitmap = BarcodeReader.Read(new AnyBitmap("barcode.bmp")); // From AnyBitmap

var resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg")); // From an image

var resultFromStream = BarcodeReader.Read(myStream); // From a stream

// PDFs are more intricate and must be read using ReadPdf:
var resultFromPdf = BarcodeReader.ReadPdf(@"file/mydocument.pdf");
using IronBarCode;
using IronSoftware.Drawing;

// Reading a barcode is easy with IronBarcode.
// Read from a File, Bitmap, Image, or Stream:

var resultFromFile = BarcodeReader.Read(@"file/barcode.png"); // From a file

var resultFromBitMap = BarcodeReader.Read(new Bitmap("barcode.bmp")); // From a bitmap

var resultFromAnyBitmap = BarcodeReader.Read(new AnyBitmap("barcode.bmp")); // From AnyBitmap

var resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg")); // From an image

var resultFromStream = BarcodeReader.Read(myStream); // From a stream

// PDFs are more intricate and must be read using ReadPdf:
var resultFromPdf = BarcodeReader.ReadPdf(@"file/mydocument.pdf");
$vbLabelText   $csharpLabel

通过访问这个 .NET MAUI 条码扫描器教程了解更多关于如何在 .NET Maui 中使用 IronBarcode 的教程。

通过以下 条码扫描器阅读教程获取更多用例和 IronBarcode 教程。

IronDrawing

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 9: IronDrawing

IronDrawing

IronDrawing 是一个免费的,开源库,为需要创建使用图形、图像和字体的跨平台应用程序的 .NET 开发人员提供了解决方案。 它充当不同图形库之间的桥梁,允许开发人员在代码中使用单一、一致的格式,同时仍然可以使用他们选择的底层库。IronDrawing 兼容 .NET Framework 4.6.2 及更新版本,包括 .NET 5、6 和 7。

Iron Software,是由一群有经验的 .NET 开发者所组成的团队,他们致力于 .NET 的成长和成功。 他们创建了 IronDrawing,旨在使类库和 NuGet 开发更容易,并帮助 NuGet 生态系统蓬勃发展。

开发 IronDrawing 的原因

IronDrawing是为了回应微软宣布的重大更改而开发的,该更改仅支持在Windows平台上使用System.Drawing.Common。 此更改对使用System.Drawing.Common的跨平台库的开发人员构成了问题,因为这要求他们重建库以支持非Windows用户,如Android、iOS。 IronDrawing 被创建为中介格式,在不同图形库之间进行转换,使开发人员在新图形标准出现时更容易过渡。

IronDrawing 的功能

IronDrawing提供了多项功能以协助开发人员工作,包括Bitmap类,可以转换为各种其他Bitmap实现; Color类; CropRectangle,一个通用兼容的Rectangle类; 以及AnyFont,一个通用兼容的Font类。 它还提供了这些类与不同图形库中的对应对象之间的隐式转换,便于它们之间的轻松转换。 你可以在 NuGet 网站上获取它。

IronDrawing 支持几乎所有 .NET 模板,包括 .NET MAUI 和 Blazor。 其平台独立性使其易于用于各种应用程序,从 Windows 桌面到移动或基于 Web 的项目。

开源的优势

IronDrawing 是一个开源库。 任何人都可以从 GitHub 仓库访问代码,这使得更容易根据个体项目和需求来定制和修改库。 不仅如此,拥有源代码公开可用的现状鼓励开发人员之间的协作,因为他们可以分享和继承彼此的想法。 IronDrawing C# 库的可能性是无穷无尽的 —— 去看看 GitHub,开始探索吧!

让我们看看IronDrawing的代码示例,以从多种文件格式生成AnyBitmap

using IronSoftware.Drawing;

AnyBitmap bitmap;

// Generate AnyBitmap using filepath
bitmap = AnyBitmap.FromFile(@"FILE_PATH");
bitmap.SaveAs("output.bmp");

// Generate AnyBitmap from bytes
byte[] bytes = File.ReadAllBytes(@"FILE_PATH");
bitmap = AnyBitmap.FromBytes(bytes);
bitmap.SaveAs("result.bmp"); 

// Generate AnyBitmap from memory stream
byte[] bytes = File.ReadAllBytes(@"FILE_PATH");
MemoryStream ms = new MemoryStream(bytes);
bitmap = AnyBitmap.FromStream(ms);
bitmap.SaveAs("output.bmp");  

// Generate AnyBitmap from Uri
Uri uri = new Uri("URI_PATH");
bitmap = AnyBitmap.FromUri(uri);
bitmap.SaveAs("uriImage.bmp"); 

// Generate AnyBitmap file from SVG file
bitmap = AnyBitmap.FromFile(@"FILE_PATH.svg");
bitmap.SaveAs("result.bmp"); 
using IronSoftware.Drawing;

AnyBitmap bitmap;

// Generate AnyBitmap using filepath
bitmap = AnyBitmap.FromFile(@"FILE_PATH");
bitmap.SaveAs("output.bmp");

// Generate AnyBitmap from bytes
byte[] bytes = File.ReadAllBytes(@"FILE_PATH");
bitmap = AnyBitmap.FromBytes(bytes);
bitmap.SaveAs("result.bmp"); 

// Generate AnyBitmap from memory stream
byte[] bytes = File.ReadAllBytes(@"FILE_PATH");
MemoryStream ms = new MemoryStream(bytes);
bitmap = AnyBitmap.FromStream(ms);
bitmap.SaveAs("output.bmp");  

// Generate AnyBitmap from Uri
Uri uri = new Uri("URI_PATH");
bitmap = AnyBitmap.FromUri(uri);
bitmap.SaveAs("uriImage.bmp"); 

// Generate AnyBitmap file from SVG file
bitmap = AnyBitmap.FromFile(@"FILE_PATH.svg");
bitmap.SaveAs("result.bmp"); 
$vbLabelText   $csharpLabel

IronDrawing 使用多种方法将文件从路径转换为位图。你可以看到 IronDrawing 使用内存流来将文件转换为 BMP,这在基于服务器的应用程序中非常有帮助。 类似地,你可以使用 SVG 文件生成 BMP。

.NET MAUI Blazor for (PDF,EXCEL,OCR,BARCODE,QR Code) - Figure 10: BMP File

由 IronDrawing 开源库生成的位图文件

定价

Iron Software 提供了一套被称为 Iron Suite 的五款软件产品。该套件包括 IronPDF、IronXL、IronOCR、IronWebscraper 和 IronBarcode,这些都是用于与 PDF、电子表格、图像、网络抓取和条码交互的工具。

这些产品的单独价格从每个许可证的$799开始,但Iron Software为整个软件套件提供特别捆绑价,起价为$1498。Iron Suite是一个很好的解决方案,适合那些需要处理多种文件类型并需要自动化转换、分析和操作过程的人。

结论

总之,.NET MAUI 是一个用于构建跨平台桌面和移动应用程序的框架。 在文章中,我们讨论了多个库,如 IronPDF、IronXL、IronBarcode、IronOCR 和 IronDrawing,它们提供了各种功能用于创建和操作 PDF 文档、读取和写入 Excel 文件、生成和扫描条码、光学字符识别以及绘制和操作图形。

在这些库中,IronDrawing 作为一个强大的工具脱颖而出,允许开发人员在他们的 .NET 应用程序中创建和编辑矢量图形。 它提供了一系列广泛的功能且使用简单,使其成为 .NET MAUI 框架的重要补充。 整体而言,.NET MAUI 和这些库的组合为开发人员提供了一个多功能的工具包,用于在各种平台上构建现代和功能丰富的应用程序。

常见问题解答

如何将 PDF 功能集成到 .NET MAUI 应用程序中?

您可以使用 IronPDF 通过 .NET Chromium 引擎将 HTML 转换为 PDF,从而集成 PDF 功能。此集成支持在 .NET MAUI 应用程序中创建和操作 PDF 文档。

在 .NET MAUI 项目中使用 Excel 库有什么优势?

在 .NET MAUI 项目中使用 IronXL,您无需安装 Microsoft Excel 就可以操作 Excel 电子表格。它支持跨平台(如 Android、iOS、macOS 和 Windows)读取、编辑和创建电子表格。

IronOCR 如何增强 .NET MAUI 应用中的文本提取?

IronOCR 在 .NET MAUI 应用中提供高级的 OCR 能力,能够从扫描文档、PDF 和图像中准确提取文本。它使用机器学习算法,并提供语言和字体的自定义功能。

在 .NET MAUI 和 Blazor 应用中可以实现哪些条形码功能?

IronBarcode 可以集成到 .NET MAUI 和 Blazor 应用中,以添加条形码读取和写入功能。它支持多种条形码格式,包括 QR 码和 Code 128,适合于库存管理之类的应用程序。

IronDrawing 如何有利于跨平台图形开发?

IronDrawing 是一个免费、开源的库,用于在 .NET 中创建跨平台图形应用程序。它为图形提供一致的格式,填补了 Microsoft 对 System.Drawing.Common 支持变更留下的空白。

BlazorWebView 在 .NET MAUI 应用程序中担任什么角色?

BlazorWebView 是 .NET MAUI 中的一个控件,允许开发人员将 MAUI Blazor 服务器应用集成到 .NET MAUI 项目中。它通过在本机应用中渲染网页 UI 控件,促进了跨平台应用的创建。

如何通过 .NET MAUI 实现跨平台开发?

使用 .NET MAUI 的框架可实现跨平台开发,构建可在 Android、iOS、macOS 和 Windows 上运行的应用程序。与 BlazorWebView 的集成通过允许使用 web UI 控件进一步增强了这一点。

.NET MAUI 的关键功能是什么,用于现代应用程序开发?

.NET MAUI 为构建具有原生性能的跨平台应用程序提供框架。关键功能包括 BlazorWebView 的集成用于 web UI 控件,以及与 IronPDF、IronXL、IronOCR、IronBarcode 和 IronDrawing 等库的兼容性以增强功能。

Jacob Mellor,Team Iron 的首席技术官
首席技术官

Jacob Mellor 是 Iron Software 的首席技术官,也是一位开创 C# PDF 技术的有远见的工程师。作为 Iron Software 核心代码库的原始开发者,他从公司成立之初就开始塑造公司的产品架构,与首席执行官 Cameron Rimington 一起将公司转变为一家拥有 50 多名员工的公司,为 NASA、特斯拉和全球政府机构提供服务。

Jacob 拥有曼彻斯特大学土木工程一级荣誉工程学士学位(BEng)(1998-2001 年)。他的旗舰产品 IronPDF 和 Iron Suite for .NET 库在全球的 NuGet 安装量已超过 3000 万次,其基础代码继续为全球使用的开发人员工具提供动力。Jacob 拥有 25 年的商业经验和 41 年的编码专业知识,他一直专注于推动企业级 C#、Java 和 Python PDF 技术的创新,同时指导下一代技术领导者。

Iron Support Team

We're online 24 hours, 5 days a week.
Chat
Email
Call Me