How to Print in an ASP.NET Web Application Framework

This article was translated from English: Does it need improvement?
Translated
View the article in English

有时,网络应用程序需要打印文档作为最终输出。 然而,将打印功能与网络应用程序整合在一起是一项现实挑战。 许多网络应用程序使用异步功能,同步打印功能可能会导致问题。 但是,有一个解决方案! IronPrint 提供 PrintAsync 函数,这是网络应用程序的重要工具。 在本简短教程中,我们将演示 PrintAsync 函数与 ASP.NET Core 结合的强大功能。 这将向您展示如何模拟真实世界中的网络应用程序,将文档打印为最终输出。

as-heading:2(快速入门:在 ASP.NET 中使用 IronPrint 异步打印 PDF)</em

下面是一个最简单的示例,展示了如何轻松使用 IronPrint 的 PrintAsync API - 只需在控制器中添加一行代码,即可启动打印而不会冻结应用程序。无需模板代码,即可快速上手。

Nuget IconGet started making PDFs with NuGet now:

  1. Install IronPrint with NuGet Package Manager

    PM > Install-Package IronPrint

  2. Copy and run this code snippet.

    return await IronPrint.Printer.PrintAsync("Basic.pdf");
  3. Deploy to test on your live environment

Start using IronPrint in your project today with a free trial
arrow pointer