Agregar códigos de barras en HTML a PDF Beyond providing extensive support for custom fonts such as Google fonts, IronPDF also supports stamping barcode onto your PDF documents. This allows developers to include barcode information in your rendered PDFs with ease. Steps to Generate a PDF with a Barcode Using IronPDF First, ensure the IronPDF library is installed and imported into your project. Then, an instance of the ChromePdfRenderer class is initialized, which allows you to render HTML content into high-quality PDF documents. Next, you need to create your barcode content. In our case, we have created an HTML string that incorporates a Google Fonts link for the "Libre Barcode 128" font. Then, use the RenderHtmlAsPdf method to turn the HTML content into a new PDF document. Following the HTML rendering, a barcode stamp is created with the text "Hello World" and the Code39 encoding format. This stamp is then applied to the PDF document using the ApplyStamp method. Finally, the generated PDF is saved to a file named "bc-test.pdf" using the SaveAs method. This straightforward process enables you to produce a PDF with both styled text and barcode content efficiently in your C# applications. It should be noted that in some cases, this functionality won't support your barcode type, such as with QR Codes. In these instances, an efficient solution would be to use IronBarcode to generate this barcode or QR Code and then add it to your PDF as an image. Learn to Add Images to PDFs with IronPDF Ver en GitHub Código https://github.com/irondarrius/IronPdf.Examples/tree/main/examples/barcode-htmltopdf 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