Agregar encabezados/pies en páginas específicas Adding headers and footers to freshly rendered PDFs or existing PDF documents is straightforward with IronPDF. You can use the addHtmlHeader method to add a header and the addHtmlFooter method to add a footer. These methods require an object that contains the following properties: dividerLine, dividerLineColor, htmlFragment, loadStylesAndCSSFromMainHtmlDocument, and maxHeight. dividerLine: Applies a divider line after the header or footer. dividerLineColor: Customizes the divider color. htmlFragment: Specifies the HTML string to be used for the header or footer. loadStylesAndCSSFromMainHtmlDocument: Enables loading CSS from the main HTML document. This feature only works when rendering from HTML to PDF. maxHeight: Sets a maximum height for the header and footer. Below is an example demonstrating how you could use IronPDF to add headers and footers: Afterward, you can specify the second parameter, which is the page number to which the header or footer will be applied. The specification can be for a single page, multiple pages, or all pages using the string "all". If the page number has not been specified, the method will apply the header or footer to all pages. Explore Advanced Header & Footer PDF Examples Enlaces de Documentos Ver en Github 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? Versión: 2025.11 recién lanzado Instalación gratuita con npm 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