BookStack\Http\Controllers\PageController::exportPdf PHP Method

exportPdf() public method

https://github.com/barryvdh/laravel-dompdf
public exportPdf ( string $bookSlug, string $pageSlug ) : Illuminate\Http\Response
$bookSlug string
$pageSlug string
return Illuminate\Http\Response
    public function exportPdf($bookSlug, $pageSlug)
    {
        $book = $this->bookRepo->getBySlug($bookSlug);
        $page = $this->pageRepo->getBySlug($pageSlug, $book->id);
        $pdfContent = $this->exportService->pageToPdf($page);
        return response()->make($pdfContent, 200, ['Content-Type' => 'application/octet-stream', 'Content-Disposition' => 'attachment; filename="' . $pageSlug . '.pdf']);
    }