diff --git a/src/Factory/HttpFactory.php b/src/Factory/HttpFactory.php index aeec5fa..6f32edc 100644 --- a/src/Factory/HttpFactory.php +++ b/src/Factory/HttpFactory.php @@ -33,9 +33,9 @@ class HttpFactory return new EmptyResponse($code, $headers); } - public static function createPdfResponse(string $binary, int $code = 200, array $headers = []) : ResponseInterface + public static function createPdfResponse(\Stringable $binary, int $code = 200, array $headers = []) : ResponseInterface { - return new PdfResponse($binary, $code, $headers); + return new PdfResponse((string) $binary, $code, $headers); } public static function createDownloadableResponse(string $data, string $filename, int $code = 200, array $headers = []) : ResponseInterface @@ -52,4 +52,4 @@ class HttpFactory { return new FileDownloadResponse($path, $code, $headers); } -} \ No newline at end of file +}