Home > PHP > Function > PS > ps_begin_page()

ps_begin_page()

ps_begin_page - Start a new page

Syntax

bool ps_begin_page (resource $psdoc, float $width, float $height)

Arguments

  • psdoc - Resource identifier of the postscript file as returned by ps_new().
  • width - The width of the page in pixel, e.g. 596 for A4 format.
  • height - The height of the page in pixel, e.g. 842 for A4 format.

Description

Starts a new page. Although the parameters width and height imply a different page size for each page, this is not possible in PostScript. The first call of ps_begin_page() will set the page size for the whole document. Consecutive calls will have no effect, except for creating a new page. The situation is different if you intent to convert the PostScript document into PDF. This function places pdfmarks into the document which can set the size for each page indiviually. The resulting PDF document will have different page sizes.

Version

PHP PECL ps >= 1.1.0

Return value

Returns TRUE on success or FALSE on failure.