跳過到頁腳內容
USING IRONPDF

How to Create an Azure PDF Generator Using IronPDF

將 IronPDF 的專業渲染引擎與 Azure 靈活的雲端基礎架構結合,即可輕鬆產生 Azure PDF 檔案。 本指南將向您展示如何建置、部署和改進可用於生產的 PDF 產生器,該產生器可以處理從 HTML 轉換到複雜文件操作的所有操作。

建立可靠的雲端 PDF 生成器面臨著獨特的挑戰。 由於沙箱限制、記憶體限制和分散式系統複雜性等因素,許多開發人員難以找到可用於生產環境的解決方案。 這正是AzureIronPDF 的優勢所在——IronPDF 提供專業的PDF 生成功能,可以輕鬆擴展,同時保持基本功能。

無論您是產生發票、報告,還是將 Web 內容轉換為 PDF ,本指南都會向您展示如何建立可靠的 Azure PDF 產生器。 您將負責從簡單的HTML 轉換為複雜的文件操作的所有工作,同時提高效能並降低成本。

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

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

並非所有PDF解決方案都能在雲端環境中運作良好。 一個可用於生產環境的 Azure PDF 產生器,除了基本的文件建立功能外,還必須滿足關鍵要求。 了解 Azure Functions 部署選項是成功的關鍵。 IronPDF 為部署到 Azure提供了完整的支援和最佳化功能。

為什麼效能對雲端 PDF 生成至關重要?

效能和可擴展性決定了解決方案的成敗。 您的生成器必須能夠處理並發請求而不會出現瓶頸,在高峰期自動擴展,並能對複雜文件保持一致的回應時間。 選擇一個能夠改善雲端環境並理解無伺服器架構細微差別的程式庫。 IronPDF 的非同步和多執行緒功能可確保 Azure 的最佳效能。

我應該考慮哪些 Azure 特有的限制?

Azure平台有一些特殊需要考慮的因素。 應用程式服務沙盒限制了 Win32/圖形 API——使用桌面圖形堆疊的函式庫可能會失敗。 消費計畫中的記憶體限制會導致處理較大文件時發生故障。 分散式特性需要高效率的無狀態操作。 有關Azure 部署故障排除的詳細說明,請參閱我們的完整文件。

哪些企業功能是不可或缺的?

企業應用需要的不只是HTML轉換。 現代 PDF 產生器必須支援JavaScript 渲染,處理複雜的 CSS,並提供加密和數位簽章等安全功能。 IronPDF 透過其基於 Chrome 的渲染引擎解決了這些問題,使其成為 Azure 部署的理想選擇。 該庫支援符合法規要求的PDF/A 合規性PDF/UA 可訪問性

Azure 應用程式服務和 Azure 函數有什麼不同?

Azure 應用程式服務和 Azure Functions 都託管雲端應用程序,但用途不同:

何時應該使用 Azure 應用程式服務?

Azure 應用程式服務為 Web 應用、REST API 和行動後端提供完全託管服務。 它提供持久資源,支援長時間運行的進程,並包含內建的擴充、部署槽位和 CI/CD 整合。 這些特性使其成為持續運行應用程式的理想選擇。 對於ASP.NET Core 應用程序,App Services 與 IronPDF 無縫整合。

何時 Azure Functions 是更好的選擇?

Azure Functions為事件驅動型、短生命週期任務提供無伺服器運算。 函數僅在觸發時運行(例如 HTTP 請求、定時器或訊息佇列觸發),您只需為執行時間付費。它們非常適合後台作業、資料處理、自動化腳本和微服務,無需持續執行主機。 學習如何建立專門用於產生 PDF 的 Azure 函數

如何在 Azure Functions 中設定 IronPDF?

在 Azure Functions 中設定 IronPDF 需要選擇正確的套件。 該庫提供三個主要軟體包,每個軟體包都針對不同的環境進行了改進。 根據微軟 Azure Functions 文檔,正確選擇軟體包可確保最佳效能。 我們的安裝指南詳細介紹了每種情況。

我應該安裝哪個 IronPDF 軟體包?

對於基於 Windows 的 Azure Functions,請使用標準 IronPDF 套件。 對於 Linux/容器,請使用IronPdf.Linux並採用從軟體包運行的部署方式,以加快冷啟動速度。 使用 IronPdf.Linux 進行容器部署可提供最大的靈活性。 了解如何在 Docker 中執行 IronPDF以實現容器化部署。

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

如何在 Azure 上配置 IronPDF?

以下是一個完整的 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;
        }
    }
}
$vbLabelText   $csharpLabel

這些配置設定為何重要?

配置設定可確保 Azure 部署成功。 LinuxAndDockerDependenciesAutoConfig可以正確配置 Chrome 依賴項,同時停用 GPU 模式可以防止無伺服器渲染問題。 將部署目錄設定為 /tmp 可在受限的 Azure Functions 環境中提供寫入權限。 如需了解自訂授權配置,請參閱我們的授權指南。了解渲染選項有助於提高 PDF 輸出品質。

範例輸出 PDF 文件

由 Azure 函數產生的月度報告 PDF,顯示銷售指標、區域資料表和公司亮點,並附有專業的綠色標題

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

使用 IronPDF 產生 PDF 檔案比產生輕量級工作負載需要更多的計算和圖形支援。 微軟和 IronPDF 都建議避免使用免費、共享和消耗層級,因為有 GDI+ 限制、共享運算限制和記憶體不足等問題。 請參考本文選擇適當的層級。 我們的效能優化指南提供了更多見解。

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

使用 Azure Functions 建置無伺服器 PDF API 可實現自動擴充、按需付費定價和極少的基礎架構管理。 以下是如何建立可處理各種 PDF 場景的生產就緒 API。 請參閱IronPDF 文件以取得完整的 API 參考。 探索如何針對複雜場景建立 PDF 報告

如何建構生產環境的 PDF API?

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; }
}
$vbLabelText   $csharpLabel

我可以新增哪些安全功能?

這種API結構既提供了靈活性,也保持了清晰的分離。 此函數接受 JSON 請求,對其進行錯誤處理,並傳回具有可選安全性設定的 PDF 檔案。 新增浮水印、實施密碼保護、應用數位簽章或整合硬體安全模組以提高安全性。

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

生產環境 PDF 產生需要格外關注效能、可靠性和資源管理。 這些最佳實務可確保 Azure PDF 產生器在實際條件下發揮最佳效能。 請參閱我們的PDF 效能最佳化教程,以取得完整指導。

我應該如何管理記憶體和資源?

當請求並發時,記憶體管理變得至關重要。 務必使用語句正確釋放 PDF 物件。 對於大型文檔,採用串流輸出而不是將整個 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();
        }
    }
}
$vbLabelText   $csharpLabel

我應該實施哪些效能優化?

效能最佳化策略包括預熱功能以消除冷啟動、在本地快取常用資源、使用連接池以及實現指數退避重試邏輯。 瀏覽我們關於並行 PDF 產生多執行緒處理的指南。 使用WaitFor 延遲可以確保 JavaScript 完全渲染。

如何監控PDF產生運作狀況?

監控功能可讓您了解 PDF 產生器的運作狀況。 使用 Application Insights 追蹤產生時間、故障率和資源消耗。 設定異常警報,例如錯誤率增加或響應速度下降。 記錄每次請求的詳細信息,以便進行故障排除。 實作自訂日誌記錄以取得更詳細的分析結果。 啟用像素級精確 HTML 渲染,以提高偵錯輸出精確度。

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

IronPDF 的進階功能可將您的 PDF 產生器功能提升到基本建立之外的更高水準。 這些功能完全由 Azure 提供支持,可實現專業的文件處理。 了解如何建立PDF 表單和新增註解。 該庫支援目錄書籤PDF 壓縮

如何使用加密和權限控制來保護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;
}
$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);
$vbLabelText   $csharpLabel

進階操作包括新增/複製/刪除頁面分割 PDF提取文字/圖像替換文字。 您可以旋轉頁面新增頁碼控制分頁符號

如何在 Azure 中使用 PDF 表單?

IronPDF 支援產生表單欄位的 PDF、以程式方式填入現有表單以及提取表單資料——非常適合自動化 Azure 工作流程。 了解如何建立互動式表單編輯表單資料以實現完全自動化。

new ChromePdfRenderer()
    .RenderHtmlAsPdf("<h1>Secure Document</h1>")
    .SaveAs("azure-secure.pdf");
new ChromePdfRenderer()
    .RenderHtmlAsPdf("<h1>Secure Document</h1>")
    .SaveAs("azure-secure.pdf");
$vbLabelText   $csharpLabel

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

即使設定正確,將 PDF 產生器部署到 Azure 時也經常會出現一些問題。 了解這些問題可以節省寶貴的故障排除時間。請參閱我們的 Azure 和Azure Blob 伺服器故障排除指南。常見問題包括502 Bad Gateway 錯誤GPU 進程錯誤

為什麼我會收到"訪問被拒絕"錯誤?

當 IronPDF 無法寫入臨時檔案時,會出現"拒絕存取路徑"錯誤。 設定安裝目錄CustomDeploymentDirectory = "/tmp" 以確保可寫入性。 了解IronPDF 運行時資料夾存取路徑問題

如果使用Run-from-Package部署,請確保應用程式具有單獨的可寫入路徑,因為 /home/site/wwwroot 是唯讀的。

如何處理超時和渲染問題?

當渲染複雜文件超過 Azure 的函數逾時時間時,會發生逾時異常。 實現渲染延遲和超時機制,以便優雅地處理渲染過程。

字體渲染問題表現為字體缺失或錯誤。 使用 Base64 編碼嵌入字體,使用 Azure 原生支援的 Web 安全性字體,或升級到容器部署以實現完全的字體控制。 我們的字體管理指南提供了解決方案。 有關網頁字體,請參閱"使用網頁字體和圖示"

PDF產生過程中出現記憶體異常的原因是什麼?

PDF 生成過程佔用大量內存,因此會出現內存異常。 常見問題包括大型/並發請求期間出現記憶體不足異常。

最佳實踐包括:

立即釋放PdfDocument物件(使用語句)

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

1. 部署最佳實踐

*自動化 CI/CD:*使用 Azure DevOps或 GitHub Actions 實現可重複部署 許可證金鑰:**將 IronPDF 許可證儲存在 Azure Key Vault 中,而不是原始碼控制中。 請參閱Web.config 中的"應用許可證金鑰"和"使用許可證"部分。 *可寫入路徑:配置 IronPDF 暫存資料夾(Linux/容器為 /tmp)。 了解如何在跨雲場景中部署到 AWS

2. 監控和指標

Application Insights:使用TelemetryClient TrackMetric自訂指標:

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);
$vbLabelText   $csharpLabel

若要在本機上偵錯 Azure Functions,請按照我們的 偵錯指南進行操作。

3. 預熱與資源管理

如何開始使用 Azure PDF 產生功能?

您已建立了一個可用於生產的 Azure PDF 產生器,能夠處理從 HTML 轉換到複雜文件操作的所有操作,並具備安全功能。 您的解決方案可自動擴展,高效管理資源,並提供企業級可靠性。 瀏覽我們的程式碼範例庫完整教程,以了解更多資訊。

Azure 的雲端基礎架構與 IronPDF 的渲染功能結合,創建了一個可隨您的需求擴展的 PDF 生成平台。 無論每小時處理少量文件還是數千份文件,您的產生器都能保持穩定的效能和可預測的成本。 如有其他文件處理需求,請考慮使用我們的其他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 Library "功能列表中確認了對 .NET 10 的支援。

Curtis Chau
技術撰稿人

Curtis Chau 擁有電腦科學學士學位(卡爾頓大學),專長於前端開發,精通 Node.js、TypeScript、JavaScript 和 React。Curtis 對製作直覺且美觀的使用者介面充滿熱情,他喜歡使用現代化的架構,並製作結構良好且視覺上吸引人的手冊。

除了開發之外,Curtis 對物聯網 (IoT) 也有濃厚的興趣,他喜歡探索整合硬體與軟體的創新方式。在空閒時間,他喜歡玩遊戲和建立 Discord bots,將他對技術的熱愛與創意結合。