Adding HTML Content Efficiently
IronPDF for Python supports applying multiple different stamps — HTML, text, image, and barcode — to a PDF document in a single operation using ApplyMultipleStamps.
Getting Started
Create individual stamper objects for each stamp type, add them to a List[Stamper] collection, then call ApplyMultipleStamps on a PdfDocument to apply all stamps at once.
Understanding the Code
HtmlStamper(html): Stamps an HTML fragment onto the PDF. SupportsVerticalOffsetandHorizontalOffsetto fine-tune position using pixel-basedLengthvalues.TextStamper(text): Stamps plain text with custom font settings. SetUseGoogleFont = TrueandFontFamilyto use any Google Font by name.ImageStamper(path): Stamps an image file onto the PDF. UseMinWidthandMinHeightto control the stamp dimensions.BarcodeStamper(value, encoding): Generates and stamps a barcode or QR code.BarcodeEncoding.Code39produces a standard Code 39 barcode.List[Stamper](): A typed collection that holds stamper objects of mixed types.ApplyMultipleStamps(stamps_list): Applies all stamps in the list to every page of the document in a single efficient pass.
Alignment and Positioning
Each stamper supports VerticalAlignment, HorizontalAlignment, VerticalOffset, and HorizontalOffset for precise placement on the page.






