public setDisplayMode ( mixed $zoom, $layout = 'continuous' ) | ||
$zoom | mixed | The zoom to use. It can be one of the following string values: - fullpage: entire page on screen - fullwidth: maximum width of window - real: uses real size (100% zoom) - default: uses viewer default mode or a number indicating the zooming factor. |
public function setDisplayMode($zoom, $layout = 'continuous')
{
$zoom = Horde_String::lower($zoom);
if ($zoom == 'fullpage' || $zoom == 'fullwidth' || $zoom == 'real' || $zoom == 'default' || !is_string($zoom)) {
$this->_zoom_mode = $zoom;
} elseif ($zoom == 'zoom') {
$this->_zoom_mode = $layout;
} else {
throw new Horde_Pdf_Exception(sprintf('Incorrect zoom display mode: %s', $zoom));
}
$layout = Horde_String::lower($layout);
if ($layout == 'single' || $layout == 'continuous' || $layout == 'two' || $layout == 'default') {
$this->_layout_mode = $layout;
} elseif ($zoom != 'zoom') {
throw new Horde_Pdf_Exception(sprintf('Incorrect layout display mode: %s', $layout));
}
}