diff --git a/src/Renderer/Pdf.php b/src/Renderer/Pdf.php index 51ae208..a60fc67 100644 --- a/src/Renderer/Pdf.php +++ b/src/Renderer/Pdf.php @@ -55,19 +55,14 @@ class Pdf extends AbstractRenderer protected $moduleSize = 0.5; /** - * Set an image resource to draw the barcode inside - * @param resource $value - * @return \Zend\Barcode\Renderer - * @throw Exception + * Set a PDF resource to draw the barcode inside + * + * @param PdfDocument $pdf + * @param integer $page + * @return Pdf */ - public function setResource($pdf, $page = 0) + public function setResource(PdfDocument $pdf, $page = 0) { - if (!$pdf instanceof PdfDocument) { - throw new Exception\InvalidArgumentException( - 'Invalid Zend\Pdf\PdfDocument resource provided to setResource()' - ); - } - $this->resource = $pdf; $this->page = intval($page);