Barryvdh\Snappy\PdfWrapper::setPaper PHP Method

setPaper() public method

Set the paper size (default A4)
public setPaper ( string $paper, string $orientation = null )
$paper string
$orientation string
    public function setPaper($paper, $orientation = null)
    {
        $this->snappy->setOption('page-size', $paper);
        if ($orientation) {
            $this->snappy->setOption('orientation', $orientation);
        }
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Set the paper size (default A4)
  *
  * @param string $paper
  * @param string $orientation
  * @return $this 
  * @static 
  */
 public static function setPaper($paper, $orientation = null)
 {
     return \Barryvdh\Snappy\PdfWrapper::setPaper($paper, $orientation);
 }