Package com.ironsoftware.ironpdf.stamp
Class HtmlStamper
- java.lang.Object
- 
- com.ironsoftware.ironpdf.stamp.Stamper
- 
- com.ironsoftware.ironpdf.stamp.HtmlStamper
 
 
- 
 public class HtmlStamper extends Stamper Defines an HTML stamper allowing developers to edit aPdfDocumentby adding new content designed in HTML, CSS and JavaScript.An implementation of Stamper.
- 
- 
Constructor SummaryConstructors Constructor Description HtmlStamper()Initializes 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 SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CssMediaTypegetCssMediaType()Gets css media type.StringgetHtmlBaseUrl()Gets the HTML base URL for which references to external CSS, Javascript and Image files will be relative.intgetRenderDelay()Deprecated.useStamper.getWaitFor()insteadintgetTimeout()Gets timeout.voidsetCssMediaType(CssMediaType value)Sets css media type.voidsetHtmlBaseUrl(String value)Sets the HTML base URL for which references to external CSS, Javascript and Image files will be relative.voidsetRenderDelay(int value)Deprecated.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, getWaitFor, isStampBehindContent, setHorizontalAlignment, setHorizontalOffset, setHtml, setHyperlink, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOpacity, setRotation, setScale, setStampBehindContent, setVerticalAlignment, setVerticalOffset, setWaitFor
 
- 
 
- 
- 
- 
Constructor Detail- 
HtmlStamperpublic HtmlStamper(String html) Initializes a new instance of theHtmlStamperclass.- Parameters:
- html- The HTML string.
 
 - 
HtmlStamperpublic HtmlStamper(String html, String baseUrlString) Initializes 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.
 
 - 
HtmlStamperpublic HtmlStamper(String html, Path baseUrl) Initializes 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 Detail- 
getHtmlBaseUrlpublic final String getHtmlBaseUrl() Gets the HTML base URL for which references to external CSS, Javascript and Image files will be relative.- Returns:
- the html base url
 
 - 
setHtmlBaseUrlpublic final void setHtmlBaseUrl(String value) Sets the HTML base URL for which references to external CSS, Javascript and Image files will be relative.- Parameters:
- value- the value
 
 - 
getRenderDelay@Deprecated public final int getRenderDelay() Deprecated.useStamper.getWaitFor()instead
 - 
setRenderDelay@Deprecated public final void setRenderDelay(int value) Deprecated.
 - 
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
 
 - 
getCssMediaTypepublic final CssMediaType getCssMediaType() Gets 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
 
 - 
setCssMediaTypepublic final void setCssMediaType(CssMediaType value) Sets 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
 
 
- 
 
-