Class HtmlStamp
Class HtmlStamp. Used With the StampHTML(HtmlStamp) methods to edit PDF documents by 'stamping' additional content into the foreground or background.
Inheritance
Inherited Members
Namespace: IronPdf
Assembly: IronPdf.dll
Syntax
public class HtmlStamp
Constructors
HtmlStamp()
Initializes a new instance of the HtmlStamp class.
Declaration
public HtmlStamp()
HtmlStamp(String)
Initializes a new instance of the HtmlStamp class.
Declaration
public HtmlStamp(string Html)
Parameters
Type | Name | Description |
---|---|---|
System.String | Html | The HTML fragment which will be stamped onto your PDF. |
HtmlStamp(String, Int32, Int32)
Initializes a new instance of the HtmlStamp class.
Declaration
public HtmlStamp(string Html, int WidthInMM, int HeightInMM)
Parameters
Type | Name | Description |
---|---|---|
System.String | Html | The HTML fragment which will be stamped onto your PDF. |
System.Int32 | WidthInMM | The width of the stamp in mm. |
System.Int32 | HeightInMM | The height of the stamp in mm. |
Fields
AutoCenterStampContentOnStampCanvas
The automatic centers stamp content within stamp canvas as defined by Width and Height.
Declaration
public bool AutoCenterStampContentOnStampCanvas
Field Value
Type | Description |
---|---|
System.Boolean |
Html
The HTML fragment which will be stamped onto your PDF. All external references to javascript, CSS and image files will be relative to HtmlBaseUrl.
Declaration
public string Html
Field Value
Type | Description |
---|---|
System.String |
HtmlBaseUrl
The HTML base URL for which references to external CSS, Javascript and Image files will be relative.
A trick to make references relative to a your project file is
HtmlBaseUrl = new
Uri(System.Reflection.Assembly.GetEntryAssembly().Location).AbsoluteUri
Declaration
public string HtmlBaseUrl
Field Value
Type | Description |
---|---|
System.String |
Hyperlink
Makes the entire stamp link to a web hyperlink. Note that HTML links created by <a href=''> tags are not reserved by stamping.
Declaration
public string Hyperlink
Field Value
Type | Description |
---|---|
System.String |
Location
Defines default position of the stamp on the page
Declaration
public PdfDocument.WaterMarkLocation Location
Field Value
Type | Description |
---|---|
PdfDocument.WaterMarkLocation |
Opacity
Allows the stamp to be transparent. 0 is invisible, 100 if fully opaque.
Declaration
public int Opacity
Field Value
Type | Description |
---|---|
System.Int32 |
Rotation
Rotates the stamp clockwise from 0 to 360 degrees as specified.
Declaration
public int Rotation
Field Value
Type | Description |
---|---|
System.Int32 |
ZIndex
Defines if this stamp should be placed behind or on-top of existing PDF contents.
Declaration
public HtmlStamp.StampLayer ZIndex
Field Value
Type | Description |
---|---|
HtmlStamp.StampLayer |
Properties
Bottom
The position of the stamp from the Bottom edge of the PDF document in mm. If Top or Bottom is not set, the stamp will be vertically centered in the document.
Declaration
public int Bottom { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Height
The height of the stamp in mm. Stamps can not automatically detect their own size based on their content.
Declaration
public int Height { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Left
The position of the stamp from the Left of the PDF document in mm. If Left or Right is not set, the stamp will be horizontally centered in the document.
Declaration
public int Left { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Right
The position of the stamp from the Right of the PDF document in mm. If Left or Right is not set, the stamp will be horizontally centered in the document.
Declaration
public int Right { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Top
The position of the stamp from the Top edge of the PDF document in mm. If Top or Bottom is not set, the stamp will be vertically centered in the document.
Declaration
public int Top { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Width
The width of the stamp in mm. Stamps can not automatically detect their own size based on their content.
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |