At any time page graphics state (current font, font size, line color, fill color, line style, page rotation, clip area) can be saved and then restored. Save operation puts data to a graphics state stack, restore operation retrieves it from there.
There are two methods in Zend_Pdf_Page class for these
operations:
<?php
/**
* Save the graphics state of this page.
* This takes a snapshot of the currently applied style, position,
* clipping area and any rotation/translation/scaling that has been
* applied.
*
* @return Zend_Pdf_Page
*/
public function saveGS();
/**
* Restore the graphics state that was saved with the last call to
* saveGS().
*
* @return Zend_Pdf_Page
*/
public function restoreGS();




