整理PDF
在幾秒鐘內組織您的PDF文件中的頁面和書籤。
掌控您的PDF結構
1
新增、複製和刪除頁面
透過新增、複製或刪除頁面來管理您的PDF結構。此功能允許輕鬆地組織和重排內容。
學習如何:管理PDF頁面using IronPdf;
// Import cover page
PdfDocument coverPage = PdfDocument.FromFile("coverPage.pdf");
// Import content document
PdfDocument contentPage = PdfDocument.FromFile("contentPage.pdf");
// Insert PDF
contentPage.InsertPdf(coverPage, 0);
contentPage.SaveAs("report_final.pdf");
// Copy a single page into a new PDF object
PdfDocument myReport = PdfDocument.FromFile("report_final.pdf");
PdfDocument copyOfPageOne = myReport.CopyPage(0);Imports IronPdf
' Import cover page
Dim coverPage As PdfDocument = PdfDocument.FromFile("coverPage.pdf")
' Import content document
Dim contentPage As PdfDocument = PdfDocument.FromFile("contentPage.pdf")
' Insert PDF
contentPage.InsertPdf(coverPage, 0)
contentPage.SaveAs("report_final.pdf")
' Copy a single page into a new PDF object
Dim myReport As PdfDocument = PdfDocument.FromFile("report_final.pdf")
Dim copyOfPageOne As PdfDocument = myReport.CopyPage(0)2
合併和拆分PDF
將多個PDF合併為一個文件或將大型PDF分成較小的部分,讓您的文件更易於管理和分發。
學習如何:合併和拆分PDFusing IronPdf;
// Import two pdfs
PdfDocument pdf_A = PdfDocument.FromFile("merge_docA.pdf");
PdfDocument pdf_B = PdfDocument.FromFile("merge_docB.pdf");
// Merge the two pdfs A and B
var merged = PdfDocument.Merge(pdf_A, pdf_B);
merged.SaveAs("Merged.pdf");Imports IronPdf
' Import two pdfs
Dim pdf_A As PdfDocument = PdfDocument.FromFile("merge_docA.pdf")
Dim pdf_B As PdfDocument = PdfDocument.FromFile("merge_docB.pdf")
' Merge the two pdfs A and B
Dim merged = PdfDocument.Merge(pdf_A, pdf_B)
merged.SaveAs("Merged.pdf")
補充組織工具
1
書籤和大綱
在您的PDF中建立書籤和大綱,以增強導航並提供讀者一種直觀的方式來定位關鍵部件。
學習如何:建立書籤和大綱using IronPdf;
// Create a new PDF or edit an existing document.
PdfDocument pdf = PdfDocument.FromFile("existing.pdf");
// Add a bookmark
var mainBookmarks = pdf.Bookmarks.AddBookMarkAtEnd("NameOfBookmark", 0);
//Add a sub-bookmark
var subBookmarks = mainBookmarks.Children.AddBookMarkAtEnd("Conclusion", 1);
pdf.SaveAs("singleLayerBookmarks.pdf");Imports IronPdf
' Create a new PDF or edit an existing document.
Dim pdf As PdfDocument = PdfDocument.FromFile("existing.pdf")
' Add a bookmark
Dim mainBookmarks = pdf.Bookmarks.AddBookMarkAtEnd("NameOfBookmark", 0)
'Add a sub-bookmark
Dim subBookmarks = mainBookmarks.Children.AddBookMarkAtEnd("Conclusion", 1)
pdf.SaveAs("singleLayerBookmarks.pdf")2
附件
為您的PDF文件新增附件,如額外的文件、圖像或相關內容,以提供補充的資訊或上下文。
學習如何:管理PDF附件using IronPdf;
using System.IO;
// Import attachment file
byte[] fileData = File.ReadAllBytes(@"path/to/file");
// Open existing PDF
PdfDocument pdf = PdfDocument.FromFile("sample.pdf");
// Add attachment to the PDF
pdf.Attachments.AddAttachment("Example", fileData);
pdf.SaveAs("addAttachment.pdf");Imports IronPdf
Imports System.IO
' Import attachment file
Dim fileData As Byte() = File.ReadAllBytes("path/to/file")
' Open existing PDF
Dim pdf As PdfDocument = PdfDocument.FromFile("sample.pdf")
' Add attachment to the PDF
pdf.Attachments.AddAttachment("Example", fileData)
pdf.SaveAs("addAttachment.pdf")準備開始了嗎?
Nuget Downloads 21,105,021|版本:2026.9剛剛發布