PdfDocumentAddPdfTemplate Method
Creates a PDF template object with the specified position and size in the PDF page.
Static content added to this template is rendered on the current page immediately.
Dynamic text containing {page_number} or {total_pages} is rendered when the document is saved
Namespace: HiQPdf.NextAssembly: HiQPdf.Next (in HiQPdf.Next.dll) Version: 18.9.2
public PdfTemplate AddPdfTemplate(
int x,
int y,
int width,
int height,
PdfTemplateHorizontalAlign hAlign = PdfTemplateHorizontalAlign.None,
PdfTemplateVerticalAlign vAlign = PdfTemplateVerticalAlign.None
)
- 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
PdfTemplateThe created PDF template object which can be customized and added to one or more pages
| Exception | Thrown if the template could not be created |