 |
PdfTemplateCollectionAdd(Single, Single) Method |
Adds a new template with the specified width and height. The template location is the top-left
corner of the page; use
Add(RectangleF) to specify another location.
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntaxpublic PdfTemplate Add(
float width,
float height
)
Public Function Add (
width As Single,
height As Single
) As PdfTemplate
Parameters
- width Single
- The template width, in points.
- height Single
- The template height, in points.
Return Value
PdfTemplateThe newly created template.
ExamplePdfTemplate watermark = doc.Templates.Add(200, 40);
watermark.Add(new PdfTextElement(0, 0, "DRAFT",
PdfFont.CreateStandardFont(PdfStandardFont.HelveticaBold, 24),
new PdfColor(220, 30, 30)));Dim watermark As PdfTemplate = doc.Templates.Add(200, 40)
watermark.Add(New PdfTextElement(0, 0, "DRAFT", _
PdfFont.CreateStandardFont(PdfStandardFont.HelveticaBold, 24), _
New PdfColor(220, 30, 30)))
See Also