Package com.ironsoftware.ironpdf.stamp
Class HtmlStamper
java.lang.Object
com.ironsoftware.ironpdf.stamp.Stamper
com.ironsoftware.ironpdf.stamp.HtmlStamper
Defines an HTML stamper allowing developers to edit a 
PdfDocument by adding new content designed in HTML, CSS and JavaScript.
 An implementation of Stamper.
- 
Constructor SummaryConstructorsConstructorDescriptionInitializes a new instance of theHtmlStamperclass.HtmlStamper(String html) Initializes a new instance of theHtmlStamperclass.HtmlStamper(String html, String baseUrlString) Initializes a new instance of theHtmlStamperclass.HtmlStamper(String html, Path baseUrl) Initializes a new instance of theHtmlStamperclass.
- 
Method SummaryModifier and TypeMethodDescriptionfinal CssMediaTypeGets css media type.final StringGets the HTML base URL for which references to external CSS, Javascript and Image files will be relative.final intGets render delay.final intGets timeout.final voidsetCssMediaType(CssMediaType value) Sets css media type.final voidsetHtmlBaseUrl(String value) Sets the HTML base URL for which references to external CSS, Javascript and Image files will be relative.final voidsetRenderDelay(int value) Sets render delay.final voidsetTimeout(int value) Sets timeout.Methods inherited from class com.ironsoftware.ironpdf.stamp.StampergetHorizontalAlignment, getHorizontalOffset, getHtml, getHyperlink, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpacity, getRotation, getScale, getVerticalAlignment, getVerticalOffset, isStampBehindContent, setHorizontalAlignment, setHorizontalOffset, setHtml, setHyperlink, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOpacity, setRotation, setScale, setStampBehindContent, setVerticalAlignment, setVerticalOffset
- 
Constructor Details- 
HtmlStamperInitializes a new instance of theHtmlStamperclass.- Parameters:
- html- The HTML string.
 
- 
HtmlStamperInitializes a new instance of theHtmlStamperclass.- Parameters:
- html- The HTML string.
- baseUrlString- The HTML base URL for which references to external CSS, Javascript and Image files will be relative.
 
- 
HtmlStamperInitializes a new instance of theHtmlStamperclass.- Parameters:
- html- The HTML string.
- baseUrl- The HTML base URL for which references to external CSS, Javascript and Image files will be relative.
 
- 
HtmlStamperpublic HtmlStamper()Initializes a new instance of theHtmlStamperclass.
 
- 
- 
Method Details- 
getHtmlBaseUrlGets the HTML base URL for which references to external CSS, Javascript and Image files will be relative.- Returns:
- the html base url
 
- 
setHtmlBaseUrlSets the HTML base URL for which references to external CSS, Javascript and Image files will be relative.- Parameters:
- value- the value
 
- 
getRenderDelaypublic final int getRenderDelay()Gets render delay. Milliseconds to wait after Html is rendered before printing. This can use useful when considering the rendering of JavaScript, WebFonts, Ajax or animations.Default value is 0. - Returns:
- the render delay
 
- 
setRenderDelaypublic final void setRenderDelay(int value) Sets render delay. Milliseconds to wait after Html is rendered before printing. This can use useful when considering the rendering of JavaScript, WebFonts, Ajax or animations.Default value is 0. - Parameters:
- value- the value
 
- 
getTimeoutpublic final int getTimeout()Gets timeout. Render timeout in secondsDefault value is 60. - Returns:
- the timeout
 
- 
setTimeoutpublic final void setTimeout(int value) Sets timeout. Render timeout in secondsDefault value is 60. - Parameters:
- value- the value
 
- 
getCssMediaTypeGets css media type. Enables Media="screen" CSS Styles and StyleSheetsNote: By setting CssMediaType=PRINT, IronPdf renders Stamp from HTML using CSS for media="print" as if printing a web page in a browser print dialog. It renders exactly as per Google Chrome. Default value is CssMediaType.SCREEN. - Returns:
- the css media type
 
- 
setCssMediaTypeSets css media type. Enables Media="screen" CSS Styles and StyleSheetsNote: By setting CssMediaType=PRINT, IronPdf renders Stamp from HTML using CSS for media="print" as if printing a web page in a browser print dialog. It renders exactly as per Google Chrome. Default value is CssMediaType.SCREEN. - Parameters:
- value- the value
 
 
-