背景與前景 You may want to use a specific background and foreground as you create and render your PDF documents in IronPDF. In such a case, you can use an existing or rendered PDF as the background or foreground for another PDF document. This is particularly useful for design consistency and templating. This example shows you how to use a PDF document as the background or foreground of another PDF document. You can do this in C# by loading or creating a multi-page PDF as an IronPdf.PdfDocument object. You can add backgrounds using PdfDocument.AddBackgroundPdf. For more details on background insertion methods, refer to the IronPDF.PdfDocument background documentation; it describes several background insertion methods and their overrides. This adds a background to each page of your working PDF. The background is copied from a page in another PDF document. You can add foregrounds, also known as "Overlays," using PdfDocument.AddForegroundOverlayPdfToPage. For detailed information on foreground insertion methods, consult the IronPDF.PdfDocument overlay documentation. This code illustrates how to integrate additional design elements on top of a base PDF using IronPDF. Always refer to the official documentation for more advanced techniques and additional options. Explore our Guide on Adding Backgrounds and Foregrounds 在 GitHub 上查看 代碼 https://github.com/irondarrius/IronPdf.Examples/tree/main/examples/backgrounds-and-foregrounds 下載 ZIP 相關教學 相關操作指南 類別文檔 取得語言包 下載 IronPDF DLL 回報此頁面的問題 準備好開始了嗎? Nuget 下載 16,154,058 | 版本: 2025.11 剛剛發布 免費 NuGet 下載 總下載量:16,154,058 查看許可證