---
name: "PS_begin_template"
section: "3"
platform: "linux"
package: "pslib-dev"
version: "0.4.8-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PS_begin_template"
---

# PS\_begin\_template(3)

Starts a new template

## NAME

PS\_begin\_template — Starts a new template

## SYNOPSIS

\#include \<pslib.h\>

int PS\_begin\_template(PSDoc \*psdoc, float width, float height)

## DESCRIPTION

Starts a new template which must be ended by  **[PS\_end\_template(3)](/PS_end_template/3.md)**. Templates are similar to  macros which can be placed on a page like images. Within a template one  can call any drawing function. Once a template has been ended by  **[PS\_end\_template(3)](/PS_end_template/3.md)** it can be placed on a page  by **[PS\_place\_image(3)](/PS_place_image/3.md)**. Templates are commonly  used for repeating objects like page headers in order to minimize  the document size.

If image reuse is not turned off (since version 0.4.5 of pslib  it is always turned on), **[PS\_place\_image(3)](/PS_place_image/3.md)** 			may also be called within a template in order to include eps or  raster images.

## RETURN VALUE

Returns an id for referencing the template.

## SEE ALSO

[PS\_end\_template(3)](/PS_end_template/3.md), [PS\_place\_image(3)](/PS_place_image/3.md)

## AUTHOR

This manual page was written by Uwe Steinmann uwe@steinmann.cx.
