跳過到頁腳內容
使用IRONPDF

如何使用IronPDF創建Azure PDF生成器

建立一個可靠的雲端 PDF 生成器面臨著獨特的挑戰。 由於沙箱限制、記憶體限制以及分散式系統的複雜性,許多開發人員難以找到適用於生產環境的解決方案。 這正是AzureIronPDF結合的強大之處,IronPDF 提供企業級 PDF 生成功能,可以輕鬆擴展,同時保持應用程式所需的功能。

無論您是產生發票、報告,還是將 Web 內容轉換為 PDF 文件,本指南都將向您展示如何建立強大的 Azure PDF 產生器,它可以處理從簡單的 HTML 轉換到複雜的文件操作的所有任務,同時優化效能和成本。

立即開始使用 IronPDF 的免費試用版,並跟隨教學建立您自己的雲端 PDF 解決方案。

優秀的 Azure PDF 產生器應該具備哪些特色?

並非所有 PDF 解決方案都一樣好用,尤其是在雲端部署方面。 一個可用於生產環境的 Azure PDF 產生器必須滿足幾個關鍵要求,這些要求超出了基本的文件建立範圍。 了解 Azure Functions 部署選項對於成功至關重要。

效能和可擴展性是需要考慮的關鍵方面。 您的解決方案必須能夠處理並發請求而不會出現瓶頸,在高峰負載期間自動擴展,即使在處理複雜文件時也能保持一致的回應時間。 這意味著要選擇一個針對雲端環境最佳化並了解無伺服器架構細微差別的程式庫。

Azure平台也有其自身的考量。 應用程式服務沙箱限制了某些 Win32/圖形 API;依賴桌面圖形堆疊的程式庫可能會遇到問題。 消費計畫中的記憶體限制可能會導致處理較大文件時發生故障。 此外,雲端運算的分散式特性意味著您的解決方案需要有效率地處理無狀態操作。

對於企業應用程式而言,功能需求遠遠超過簡單的 HTML 轉換。 現代 PDF 產生器必須支援JavaScript 渲染動態內容,處理複雜的現代 CSS,並提供加密和數位簽章等安全功能。 IronPDF 透過其基於 Chrome 的渲染引擎滿足了所有這些要求,使其成為 Azure 部署的理想選擇。

Azure 應用程式服務與 Azure 函數

Azure 應用程式服務和 Azure 函數都是 Microsoft Azure 中的雲端為基礎的託管選項,但它們的用途不同:

  • Azure 應用程式服務是一個完全託管的平台,用於託管 Web 應用、REST API 和行動應用程式後端。 它提供持久資源,支援長時間運行的進程,並提供內建的擴展、部署槽位以及與 CI/CD 管道的整合。 這些特性使其成為需要持續運行的應用程式的理想選擇。
  • Azure Functions則是一種無伺服器運算服務,專為事件驅動的、生命週期短的任務而設計。 函數僅在觸發時運行(例如,透過 HTTP 請求、計時器或訊息佇列),您只需為執行時間付費。它們最適合後台作業、資料處理、自動化腳本和不需要持續運行的主機環境的微服務。

如何在 Azure Functions 中設定 IronPDF?

在 Azure Functions 中設定 IronPDF 需要為您的部署方案選擇正確的套件。 該庫提供了三個主要軟體包,每個軟體包都針對不同的環境進行了最佳化。 根據微軟 Azure Functions 文檔,選擇合適的軟體包對於獲得最佳效能至關重要。

對於基於 Windows 的 Azure Functions,請使用標準 IronPDF 套件;對於 Linux/容器,請使用IronPdf.Linux :無論作業系統為何,都應使用 run-from-package 以加快冷啟動速度。 容器部署與 IronPdf.Linux 搭配使用效果最佳,可提供最大的靈活性和控制力。

Install-Package IronPdf   // For Windows with file system access
Install-Package IronPdf.Linux // For containers

以下是一個完整的 Azure 函數設置,透過正確的配置即可產生 PDF 檔案:

using System;
using System.IO;
using System.Net;
using System.Threading.Tasks;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
public class PdfGeneratorFunction
{
    private readonly ILogger _logger;
    public PdfGeneratorFunction(ILoggerFactory loggerFactory)
    {
        _logger = loggerFactory.CreateLogger<PdfGeneratorFunction>();
    }
    [Function("GeneratePdfAndStore")]
    public async Task<HttpResponseData> Run(
        [HttpTrigger(AuthorizationLevel.Function, "post", Route = "generate-pdf-store")] HttpRequestData req)
    {
        License.LicenseKey = Environment.GetEnvironmentVariable("IronPdfLicenseKey");
        Installation.LinuxAndDockerDependenciesAutoConfig = true;
        Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;
        Installation.CustomDeploymentDirectory = "/tmp";
        string htmlContent = await req.ReadAsStringAsync();
        var response = req.CreateResponse(HttpStatusCode.OK);
        if (string.IsNullOrWhiteSpace(htmlContent))
        {
            response.StatusCode = HttpStatusCode.BadRequest;
            await response.WriteStringAsync("HTML content is required.");
            return response;
        }
        try
        {
            var renderer = new ChromePdfRenderer
            {
                RenderingOptions = new ChromePdfRenderOptions
                {
                    MarginTop = 10,
                    MarginBottom = 10,
                    MarginLeft = 10,
                    MarginRight = 10,
                    EnableJavaScript = true
                }
            };
            using var pdf = renderer.RenderHtmlAsPdf(htmlContent);
            response.Headers.Add("Content-Type", "application/pdf");
            await response.WriteBytesAsync(pdf.BinaryData);
            _logger.LogInformation($"Generated PDF with {pdf.PageCount} pages.");
            return response;
        }
        catch (Exception ex)
        {
            _logger.LogError(ex, "Error generating PDF.");
            response.StatusCode = HttpStatusCode.InternalServerError;
            await response.WriteStringAsync($"PDF generation failed: {ex.Message}");
            return response;
        }
    }
}
using System;
using System.IO;
using System.Net;
using System.Threading.Tasks;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using Microsoft.Extensions.Logging;
public class PdfGeneratorFunction
{
    private readonly ILogger _logger;
    public PdfGeneratorFunction(ILoggerFactory loggerFactory)
    {
        _logger = loggerFactory.CreateLogger<PdfGeneratorFunction>();
    }
    [Function("GeneratePdfAndStore")]
    public async Task<HttpResponseData> Run(
        [HttpTrigger(AuthorizationLevel.Function, "post", Route = "generate-pdf-store")] HttpRequestData req)
    {
        License.LicenseKey = Environment.GetEnvironmentVariable("IronPdfLicenseKey");
        Installation.LinuxAndDockerDependenciesAutoConfig = true;
        Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;
        Installation.CustomDeploymentDirectory = "/tmp";
        string htmlContent = await req.ReadAsStringAsync();
        var response = req.CreateResponse(HttpStatusCode.OK);
        if (string.IsNullOrWhiteSpace(htmlContent))
        {
            response.StatusCode = HttpStatusCode.BadRequest;
            await response.WriteStringAsync("HTML content is required.");
            return response;
        }
        try
        {
            var renderer = new ChromePdfRenderer
            {
                RenderingOptions = new ChromePdfRenderOptions
                {
                    MarginTop = 10,
                    MarginBottom = 10,
                    MarginLeft = 10,
                    MarginRight = 10,
                    EnableJavaScript = true
                }
            };
            using var pdf = renderer.RenderHtmlAsPdf(htmlContent);
            response.Headers.Add("Content-Type", "application/pdf");
            await response.WriteBytesAsync(pdf.BinaryData);
            _logger.LogInformation($"Generated PDF with {pdf.PageCount} pages.");
            return response;
        }
        catch (Exception ex)
        {
            _logger.LogError(ex, "Error generating PDF.");
            response.StatusCode = HttpStatusCode.InternalServerError;
            await response.WriteStringAsync($"PDF generation failed: {ex.Message}");
            return response;
        }
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

配置設定對於 Azure 部署至關重要。 LinuxAndDockerDependenciesAutoConfig 可確保所有 Chrome 相依性都已正確配置,同時停用 GPU 模式可防止在無伺服器環境中出現渲染問題。 將部署目錄設定為 /tmp 可在受限的 Azure Functions 環境中提供寫入權限。

範例輸出 PDF 文件

如何使用 IronPDF 建立 Azure PDF 產生器:圖 2 - PDF 輸出範例

我應該選擇哪個 Azure 託管層級來產生 PDF 檔案?

在雲端使用 IronPDF 產生 PDF 檔案比處理較輕的工作負載需要更多的運算和圖形支援。 微軟文件和 IronPDF 指南都建議避免使用免費、共享消耗層級,因為這些層級對 GDI+ 等關鍵 API 有限制,共享運算能力有限,記憶體不足且執行穩定性差。 有關如何正確選擇適合您需求的套餐的更多信息,請參閱本文

我可以使用 Azure Functions 建立無伺服器 PDF API 嗎?

使用 Azure Functions 建立無伺服器 PDF API 可實現自動擴充、按需付費定價和最低限度的基礎架構管理。 以下是如何建立一個可用於生產環境的 API,以處理各種 PDF 生成場景。 有關完整的 API 參考,請參閱IronPDF 文件

public class PdfApiFunction
{
    private readonly ChromePdfRenderer _renderer;
    public PdfApiFunction()
    {
        // Initialize renderer with production settings
        _renderer = new ChromePdfRenderer
        {
            RenderingOptions = new ChromePdfRenderOptions
            {
                PaperSize = IronPdf.Rendering.PdfPaperSize.A4,
                PrintHtmlBackgrounds = true,
                CreatePdfFormsFromHtml = true,
                CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print
            }
        };
    }
    [FunctionName("ConvertUrlToPdf")]
    public async Task<IActionResult> ConvertUrl(
        [HttpTrigger(AuthorizationLevel.Function, "post")] ConvertUrlRequest request,
        ILogger log)
    {
        if (string.IsNullOrEmpty(request?.Url))
            return new BadRequestObjectResult("URL is required");
        try
        {
            var pdf = _renderer.RenderUrlAsPdf(request.Url);
            // Apply optional features
            if (request.AddWatermark)
            {
                pdf.ApplyWatermark("<h2>CONFIDENTIAL</h2>", 30, 
                    IronPdf.Editing.VerticalAlignment.Middle, 
                    IronPdf.Editing.HorizontalAlignment.Center);
            }
            if (request.ProtectWithPassword)
            {
                pdf.SecuritySettings.UserPassword = request.Password;
                pdf.SecuritySettings.AllowUserCopyPasteContent = false;
            }
            return new FileContentResult(pdf.BinaryData, "application/pdf");
        }
        catch (Exception ex)
        {
            log.LogError(ex, $"Failed to convert URL: {request.Url}");
            return new StatusCodeResult(500);
        }
    }
}
public class ConvertUrlRequest
{
    public string Url { get; set; }
    public bool AddWatermark { get; set; }
    public bool ProtectWithPassword { get; set; }
    public string Password { get; set; }
}
public class PdfApiFunction
{
    private readonly ChromePdfRenderer _renderer;
    public PdfApiFunction()
    {
        // Initialize renderer with production settings
        _renderer = new ChromePdfRenderer
        {
            RenderingOptions = new ChromePdfRenderOptions
            {
                PaperSize = IronPdf.Rendering.PdfPaperSize.A4,
                PrintHtmlBackgrounds = true,
                CreatePdfFormsFromHtml = true,
                CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print
            }
        };
    }
    [FunctionName("ConvertUrlToPdf")]
    public async Task<IActionResult> ConvertUrl(
        [HttpTrigger(AuthorizationLevel.Function, "post")] ConvertUrlRequest request,
        ILogger log)
    {
        if (string.IsNullOrEmpty(request?.Url))
            return new BadRequestObjectResult("URL is required");
        try
        {
            var pdf = _renderer.RenderUrlAsPdf(request.Url);
            // Apply optional features
            if (request.AddWatermark)
            {
                pdf.ApplyWatermark("<h2>CONFIDENTIAL</h2>", 30, 
                    IronPdf.Editing.VerticalAlignment.Middle, 
                    IronPdf.Editing.HorizontalAlignment.Center);
            }
            if (request.ProtectWithPassword)
            {
                pdf.SecuritySettings.UserPassword = request.Password;
                pdf.SecuritySettings.AllowUserCopyPasteContent = false;
            }
            return new FileContentResult(pdf.BinaryData, "application/pdf");
        }
        catch (Exception ex)
        {
            log.LogError(ex, $"Failed to convert URL: {request.Url}");
            return new StatusCodeResult(500);
        }
    }
}
public class ConvertUrlRequest
{
    public string Url { get; set; }
    public bool AddWatermark { get; set; }
    public bool ProtectWithPassword { get; set; }
    public string Password { get; set; }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

這種 API 結構為不同的使用情境提供了靈活性,同時保持了清晰的關注點分離。 此函數接受 JSON 請求,使用適當的錯誤處理程序處理這些請求,並傳回應用了可選安全功能的 PDF 檔案。

生產環境中產生 PDF 的最佳實務是什麼?

生產環境 PDF 產生需要格外關注效能、可靠性和資源管理。 實作這些最佳實務可確保您的 Azure PDF 產生器在實際條件下發揮最佳效能。

處理多個並發請求時,記憶體管理變得至關重要。 關鍵是要始終使用 using 語句或明確釋放來正確地釋放 PDF 物件。 對於大型文檔,請考慮串流輸出,而不是將整個 PDF 文件載入到記憶體中。 另一個重要方面是實施請求限制,以防止在流量高峰期間記憶體耗盡。

public static class PdfProductionService
{
    private static readonly SemaphoreSlim _semaphore = new SemaphoreSlim(5); // Limit concurrent operations
    public static async Task<byte[]> GeneratePdfAsync(string html, ILogger log)
    {
        await _semaphore.WaitAsync();
        try
        {
            using var renderer = new ChromePdfRenderer
            {
                RenderingOptions = new ChromePdfRenderOptions
                {
                    Timeout = 60,       // Prevent hanging operations
                    UseMarginsOnHeaderAndFooter = UseMargins.None
                }
            };
            renderer.RenderingOptions.WaitFor.RenderDelay(1000);
            using var pdf = renderer.RenderHtmlAsPdf(html);
            // Log metrics for monitoring
            log.LogInformation($"PDF generated: {pdf.PageCount} pages, {pdf.BinaryData.Length} bytes");
            return pdf.BinaryData;
        }
        finally
        {
            _semaphore.Release();
        }
    }
}
public static class PdfProductionService
{
    private static readonly SemaphoreSlim _semaphore = new SemaphoreSlim(5); // Limit concurrent operations
    public static async Task<byte[]> GeneratePdfAsync(string html, ILogger log)
    {
        await _semaphore.WaitAsync();
        try
        {
            using var renderer = new ChromePdfRenderer
            {
                RenderingOptions = new ChromePdfRenderOptions
                {
                    Timeout = 60,       // Prevent hanging operations
                    UseMarginsOnHeaderAndFooter = UseMargins.None
                }
            };
            renderer.RenderingOptions.WaitFor.RenderDelay(1000);
            using var pdf = renderer.RenderHtmlAsPdf(html);
            // Log metrics for monitoring
            log.LogInformation($"PDF generated: {pdf.PageCount} pages, {pdf.BinaryData.Length} bytes");
            return pdf.BinaryData;
        }
        finally
        {
            _semaphore.Release();
        }
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

效能最佳化策略包括預熱功能以消除冷啟動,將常用資源(如字體和映像)快取到本地,利用連接池進行資料庫操作,以及對瞬態故障實施指數退避重試邏輯。

監控和診斷功能可讓您了解 PDF 產生器的運作狀況。 利用 Application Insights,我們可以追蹤產生時間、故障率和資源消耗。 此外,設定異常警報,例如錯誤率增加或回應時間下降,並記錄每個 PDF 產生請求的詳細信息,以便進行故障排除。

如何在 Azure 中處理進階 PDF 功能?

IronPDF 的進階功能讓您的 PDF 產生器超越了基本的文件建立功能。 這些功能在 Azure 環境中得到全面支持,可實現企業級文件處理。 了解更多關於建立PDF 表單和新增註解以增強文件的資訊。

IronPDF 同時支援密碼保護和權限管理,因此可以對文件存取權限進行精細控制:

public static PdfDocument SecurePdf(PdfDocument pdf, SecurityOptions options)
{
    // Apply AES-256 encryption
    pdf.SecuritySettings.UserPassword = options.UserPassword;
    pdf.SecuritySettings.OwnerPassword = options.OwnerPassword;
    // Configure permissions
    pdf.SecuritySettings.AllowUserPrinting = options.AllowPrinting;
    pdf.SecuritySettings.AllowUserCopyPasteContent = options.AllowCopying;
    pdf.SecuritySettings.AllowUserAnnotations = options.AllowAnnotations;
    // Add digital signature if certificate provided , the digital signature must be type PdfSignature
    if (options.DigitalCertificate != null)
    {
        pdf.Sign(options.DigitalCertificate);
    }
    return pdf;
}
public static PdfDocument SecurePdf(PdfDocument pdf, SecurityOptions options)
{
    // Apply AES-256 encryption
    pdf.SecuritySettings.UserPassword = options.UserPassword;
    pdf.SecuritySettings.OwnerPassword = options.OwnerPassword;
    // Configure permissions
    pdf.SecuritySettings.AllowUserPrinting = options.AllowPrinting;
    pdf.SecuritySettings.AllowUserCopyPasteContent = options.AllowCopying;
    pdf.SecuritySettings.AllowUserAnnotations = options.AllowAnnotations;
    // Add digital signature if certificate provided , the digital signature must be type PdfSignature
    if (options.DigitalCertificate != null)
    {
        pdf.Sign(options.DigitalCertificate);
    }
    return pdf;
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

我們可以添加帶有頁碼的頁眉和頁腳,插入用於品牌推廣或安全保護的水印,將多個 PDF 文件合併成一個文檔,以及提取或替換特定頁面:

// Add dynamic headers with page numbers
var header = new HtmlHeaderFooter
{
    HtmlFragment = "<div style='text-align:right'>Page {page} of {total-pages}</div>",
    Height = 20
};
pdf.AddHTMLHeaders(header);
// Apply conditional watermarks
if (document.IsDraft)
{
    pdf.ApplyWatermark("<h1>DRAFT</h1>", 45, VerticalAlignment.Middle);
}
// Merge multiple documents
var mergedPdf = PdfDocument.Merge(pdf1, pdf2, pdf3);
// Add dynamic headers with page numbers
var header = new HtmlHeaderFooter
{
    HtmlFragment = "<div style='text-align:right'>Page {page} of {total-pages}</div>",
    Height = 20
};
pdf.AddHTMLHeaders(header);
// Apply conditional watermarks
if (document.IsDraft)
{
    pdf.ApplyWatermark("<h1>DRAFT</h1>", 45, VerticalAlignment.Middle);
}
// Merge multiple documents
var mergedPdf = PdfDocument.Merge(pdf1, pdf2, pdf3);
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

IronPDF 支援產生具有表單欄位的 PDF、以程式方式填入現有 PDF 表單以及提取表單資料進行處理,使其成為 Azure 中自動化文件工作流程的理想選擇。

new ChromePdfRenderer()
    .RenderHtmlAsPdf("<h1>Secure Document</h1>")
    .SaveAs("azure-secure.pdf");
new ChromePdfRenderer()
    .RenderHtmlAsPdf("<h1>Secure Document</h1>")
    .SaveAs("azure-secure.pdf");
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

我應該注意哪些常見錯誤?

即使設定正確,將 PDF 產生器部署到 Azure 時也經常會出現一些特定問題。 了解這些問題及其解決方案可以節省寶貴的故障排除時間。如需更全面的故障排除訊息,請參閱我們的 Azure 和Azure Blob 伺服器故障排除指南。

  • 當 IronPDF 無法寫入臨時檔案時,會出現"拒絕存取路徑"錯誤。 解決此問題的方法是設定 Installation.CustomDeploymentDirectory = "/tmp",以確保可以寫入暫存檔案。 了解更多關於IronPDF 運行時資料夾的資訊。 *補充說明:如果使用Run-from-Package部署,請確保應用程式具有單獨的可寫入路徑,因為 /home/site/wwwroot 是唯讀的。 (Microsoft Docs: Azure Functions File System)
  • 當渲染複雜文件超過 Azure 的函數逾時時間時,會發生逾時異常。 *字體渲染問題表現為產生的 PDF 檔案中缺少字體或字體不正確。 可以透過以下方式解決這些問題:使用 Base64 編碼將字體嵌入 HTML 中;使用 Azure 原生支援的 Web 安全字體;或升級到容器部署以實現完全的字體控制。 我們的字體管理指南提供了詳細的解決方案。
  • 由於 PDF 生成過程佔用大量內存,因此可能會出現內存異常。常見問題包括在請求量較大或併發請求時出現記憶體不足異常。

    最佳實踐包括:

    • 立即釋放 PdfDocument 物件(使用語句)。
    • 使用信號量或佇列限制並發請求。

如何部署和監控我的 Azure PDF 產生器?

1. 部署最佳實踐

*自動化 CI/CD :使用Azure DevOpsGitHub Actions*實現可重複部署。 許可證金鑰:將 IronPDF 許可證金鑰安全地儲存在Azure Key Vault**中,並在應用程式設定中引用它們,而不是提交到原始碼控制。 *可寫入路徑:確保 IronPDF 暫存資料夾已配置(Linux/容器為 /tmp,Windows 為對應路徑)。

2. 監控和指標

  • Application Insights :使用TelemetryClient.TrackMetric (Application Insights SDK)或 OpenTelemetry 取得自訂指標。

    例子:

    var telemetryClient = new TelemetryClient();
    telemetryClient.TrackMetric("PdfGenerationTimeMs", generationTime.TotalMilliseconds);
    telemetryClient.TrackMetric("PdfPageCount", pdf.PageCount);
    telemetryClient.TrackMetric("PdfFileSizeBytes", pdf.BinaryData.Length);
    var telemetryClient = new TelemetryClient();
    telemetryClient.TrackMetric("PdfGenerationTimeMs", generationTime.TotalMilliseconds);
    telemetryClient.TrackMetric("PdfPageCount", pdf.PageCount);
    telemetryClient.TrackMetric("PdfFileSizeBytes", pdf.BinaryData.Length);
    IRON VB CONVERTER ERROR developers@ironsoftware.com
    $vbLabelText   $csharpLabel
  • 避免直接使用 ILogger.LogMetric(...),因為這無法可靠地向 Application Insights 發送指標。

3. 預熱與資源管理

  • 預熱功能以減少冷啟動。
  • 如果可能,將常用資源(如字體或範本)快取到本機。
  • 對外部服務使用連線池和重試邏輯,以保持高可靠性。

利用雲端的力量轉換您的文檔

您現在已經建立了一個可用於生產的 Azure PDF 產生器,它可以處理從簡單的 HTML 轉換到具有安全功能的複雜文件操作的所有任務。 您的解決方案可自動擴展,高效管理資源,並提供企業應用程式所需的可靠性。

Azure 的雲端基礎架構與 IronPDF 的渲染功能結合,提供了一個可隨您的需求擴展的 PDF 產生平台。 無論每小時處理少量文檔還是數千份文檔,您的生成器都能保持穩定的效能,同時保持成本可預測。

準備好將 Azure PDF 產生器投入生產環境了嗎? 首先可以免費試用,享受無限量 PDF 生成服務,無需按文件付費。

!{--01001100010010010100001001010010010000010101001001011001010 111110100011101000101010101010001011111010100110101010001000001 010100100101010001000101010001000101111101010111010010010101010 001001000010111110101000001010101000010010000101111101010000010 1001001001111010001000101010101000011010101010001011111010101000101001001001001010101010001010010010010010100001010101010101 010101011000010101000100010101001110010001000101010001000101111101000010010011000100111110100010010011000100111100

常見問題解答

在 Azure 中使用 IronPDF 生成 PDF 有哪些優勢?

IronPDF 提供企業級 PDF 生成功能,可與 Azure 無縫整合,確保可擴展性和可靠性。它克服了雲端環境中常見的沙箱限制和記憶體限制等挑戰。

IronPDF 如何處理 Azure 環境中的記憶體限制?

IronPdf 已針對 Azure 的記憶體限制進行最佳化,利用高效率的處理技術,在不超出可用資源的情況下產生 PDF。

IronPdf 可以與 Azure Functions 搭配使用嗎?

是的,IronPDF 可與 Azure Functions 整合,以建立無伺服器的 PDF 生成解決方案,並受益於自動擴充和具成本效益的執行。

在 Azure 中使用 IronPDF 時,需要考慮哪些安全因素?

IronPDF 堅持在傳輸中和靜止狀態下保護資料的最佳實踐,確保符合 Azure 的安全標準,從而支援安全的 PDF 生成。

是否可以在 Azure App Service 上部署 IronPDF?

當然,IronPDF 可以部署在 Azure App Service 上,讓開發人員可以在受管理的託管環境中利用其功能。

IronPDF 是否支持 Azure 中的 PDF 功能定制?

是的,IronPDF 為 PDF 生成提供廣泛的自訂選項,包括排版、設計和互動性,同時在 Azure 中執行。

IronPDF 如何確保分散式 Azure 系統的高效能?

IronPDF 的設計可毫不費力地在分散式系統中擴充,並利用 Azure 的基礎架構維持高效能與可靠性。

IronPDF 是否支持 .NET 10 for Azure PDF 生成?

是的,IronPDF for .NET 與 Azure 環境中的 .NET 10 完全相容 - 包括功能、App 服務和容器部署。它提供開箱即用的無縫支援,無需特殊的變通方式。IronPDF 的平台需求明確列出了其支援的運行時間,包括 .NET 10。(ironpdf.com)。

IronPDF 支援哪些 .NET 版本,與 .NET 10 的相容性如何改善效能?

IronPDF 支持广泛的 .NET 版本,包括 .NET 6、7、8、9 和 10。使用 .NET 10 意味着您将受益于最新的运行时优化、改进的垃圾回收以及 Azure 中增强的性能--特别是对于无服务器或基于容器的 PDF 生成。IronPDF.com 在其 「C# PDF 库 」功能列表中确认了对 .NET 10 的支持。

Curtis Chau
技術作家

Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。

除了開發之外,Curtis 對物聯網 (IoT) 有著濃厚的興趣,探索將硬體和軟體結合的創新方式。在閒暇時間,他喜愛遊戲並構建 Discord 機器人,結合科技與創意的樂趣。