PHP Class BookStack\Services\ExportService

Mostrar archivo Open project: ssddanbrown/bookstack

Public Methods

Method Description
pageToContainedHtml ( Page $page ) : mixed | string Convert a page to a self-contained HTML file.
pageToPdf ( Page $page ) : mixed | string Convert a page to a pdf file.
pageToPlainText ( Page $page ) : mixed Converts the page contents into simple plain text.

Protected Methods

Method Description
containHtml ( $htmlContent ) : mixed | string Bundle of the contents of a html file to be self-contained.

Method Details

containHtml() protected method

Bundle of the contents of a html file to be self-contained.
protected containHtml ( $htmlContent ) : mixed | string
$htmlContent
return mixed | string

pageToContainedHtml() public method

Includes required CSS & image content. Images are base64 encoded into the HTML.
public pageToContainedHtml ( Page $page ) : mixed | string
$page BookStack\Page
return mixed | string

pageToPdf() public method

Convert a page to a pdf file.
public pageToPdf ( Page $page ) : mixed | string
$page BookStack\Page
return mixed | string

pageToPlainText() public method

This method filters any bad looking content to provide a nice final output.
public pageToPlainText ( Page $page ) : mixed
$page BookStack\Page
return mixed