ArininAV

ps_begin_page

ps_begin_page -- Start a new page

Description

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

Starts a new page. Though 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 indent 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.

Each page is encapsulated into save/restore. This means, that most of the settings made on one page will not be retained on the next page.

If there is up to the first call of ps_begin_page() no call of ps_findfont(), then the header of the PostScript document will be output and the bounding box will be set to the size of the first page. If ps_findfont() was called before the header has been output already, the document will not have a valid bounding box. In order to prevent this, one should set the info field 'BoundingBox' and possibly `Orientation' before any ps_findfont() or ps_begin_page() calls.

See also

ps_end_page(), ps_findfont(), ps_set_info()