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

exportHtml() public method

Export a page to a self-contained HTML file.
public exportHtml ( string $bookSlug, string $pageSlug ) : Illuminate\Http\Response
$bookSlug string
$pageSlug string
return Illuminate\Http\Response
    public function exportHtml($bookSlug, $pageSlug)
    {
        $book = $this->bookRepo->getBySlug($bookSlug);
        $page = $this->pageRepo->getBySlug($pageSlug, $book->id);
        $containedHtml = $this->exportService->pageToContainedHtml($page);
        return response()->make($containedHtml, 200, ['Content-Type' => 'application/octet-stream', 'Content-Disposition' => 'attachment; filename="' . $pageSlug . '.html']);
    }