PdfEditorAddPdfTemplate Method

Creates a blank PDF Template object with the specified position and size in the PDF page. Specifies the horizontal and vertical alignment of the template on the page. The alignment takes precedence over the X and Y coordinates when set to a value other than None. The template can later be filled with custom content such as text, images or graphics

Definition

Namespace: HiQPdf.Chromium
Assembly: HiQPdf.Chromium (in HiQPdf.Chromium.dll) Version: 17.5.0
C#
public PdfTemplate AddPdfTemplate(
	int x,
	int y,
	int width,
	int height,
	PdfTemplateHorizontalAlign hAlign = PdfTemplateHorizontalAlign.None,
	PdfTemplateVerticalAlign vAlign = PdfTemplateVerticalAlign.None
)

Parameters

x  Int32
The X position of the template in the PDF pages relative to the top left of the page
y  Int32
The Y position of the template in the PDF pages relative to the top left of the page
width  Int32
The width of the PDF template
height  Int32
The height of the PDF template
hAlign  PdfTemplateHorizontalAlign  (Optional)
The horizontal alignment of the template on the PDF page
vAlign  PdfTemplateVerticalAlign  (Optional)
The vertical alignment of the template on the PDF page

Return Value

PdfTemplate
The created PDF template object which can be customized and added to one or more pages

Exceptions

ExceptionThrown if the template could not be created

See Also