from ironpdf import * # Utiliza HtmlStamper para estampar Html en pdf htmlStamper = HtmlStamper("<h1>Html stamp</h1>") htmlStamper.VerticalOffset = Length(-200, MeasurementUnit.Pixel) htmlStamper.HorizontalOffset = Length(-200, MeasurementUnit.Pixel) # Utiliza TextStamper para estampar texto con fuentes personalizadas en pdf textStamper = TextStamper("Hello World! Stamp One Here!") textStamper.FontFamily = "Bungee Spice" textStamper.UseGoogleFont = True textStamper.FontSize = 30 # Utiliza ImageStamper para estampar imágenes en pdf file_path = r'C:\Users\logo.png' imageStamper = ImageStamper(file_path) imageStamper.VerticalAlignment = VerticalAlignment.Top imageStamper.MinWidth = Length(20) imageStamper.MinHeight = Length(20) # Utiliza BarcodeStamper para estampar código QR/código de barras en pdf barcodeStamper = BarcodeStamper("IronPDF", BarcodeEncoding.Code39) barcodeStamper.MaxHeight = Length(5) barcodeStamper.VerticalAlignment = VerticalAlignment.Bottom barcodeStamper.HorizontalAlignment = HorizontalAlignment.Left stamps_list = List[Stamper]() stamps_list.Add(htmlStamper) stamps_list.Add(textStamper) stamps_list.Add(imageStamper) stamps_list.Add(barcodeStamper) pdf = PdfDocument.FromFile("Unstamped.pdf") pdf.ApplyMultipleStamps(stamps_list) pdf.SaveAs("Stamped.pdf")