Dividir un PDF y extraer páginas en C# IronPDF makes the process of editing your PDF document layouts through splitting and extracting pages a breeze. With IronPDF, you can extract singular or ranges of pages into new PdfDocument objects, which can then be saved or further edited. This is all done thanks to the PdfDocument.CopyPage method. Before we get into the core process behind splitting PDF files, we create the HTML string which will be used to make the example PDF. The ChromePdfRenderer class is then used to convert the HTML string into a PDF document. The RenderHtmlAsPdf method performs the conversion, and the resulting PDF is stored in the PdfDocument object. Now, we can start splitting the PDF. First, we use the CopyPage(0) method to copy the first page of the PDF, storing it in the page1Doc variable. This simple line of code extracts the specified page from the PDF. Then, using the SaveAs method, we save the page we extracted as a new, separate PDF file. For extracting page ranges, the CopyPages method is used to extract the pages within the specified page range from the original PDF. (Remember that pages are zero-indexed, so 1 and 2 refer to the second and third pages). The resulting extracted pages are stored in the page23Doc variable. Now, you can go on to further manipulate these extracted pages, or utilize the SaveAs method to save the extracted pages as a new PDF document. Learn to Split Multi-Page PDFs with IronPDF Now Ver en GitHub Código https://github.com/iron-software/IronPdf.Examples/tree/main/examples/split-pdf-pages-csharp Descargar ZIP Tutorial Relacionado Guía de Cómo Hacer Relacionada Documentación de Clase Obtener Paquetes de Idiomas Descargar IronPDF DLL Reportar un problema en esta página ¿Listo para empezar? Nuget Descargas 16,154,058 | Versión: 2025.11 recién lanzado Descarga Gratis de NuGet Descargas totales: 16,154,058 Ver Licencias
Producto completamente funcional Obtén 30 días de producto completamente funcional.Instálalo y ejecútalo en minutos.
Soporte técnico 24/5 Acceso completo a nuestro equipo de soporte técnico durante tu prueba del producto
Producto completamente funcional Obtén 30 días de producto completamente funcional.Instálalo y ejecútalo en minutos.
Soporte técnico 24/5 Acceso completo a nuestro equipo de soporte técnico durante tu prueba del producto