Smart.Framework Logo

final class \SmartModExtLib\PdfGenerate\HtmlToPdfExport
{ } ::

Class: HtmlToPdfExport - Exports HTML Code to PDF Document using HTMLDoc and RSvg.
This is a very safe but limited PDF export of HTML code.
It does support most of the HTML5 and CSS3.
It does not support Javascript.
It does support images: PNG, GIF, JPG as link or base64 embedded.
It does support SVG vector images as link or base64 embedded (requires RSvg to convert them to PNG format).


class Methods

public static function is_active ( ) {} :: ''
@return: {''} OR '/path/to/htmldoc.exe'
Check if HTMLDoc exists and is set correctly
public static function generate ( STRING $y_html_content, ENUM $y_orientation = "normal", ENUM $y_allow_set_credentials = "no" ) {} :: STRING
@param: {STRING} $y_html_content: The HTML Code
@param: {ENUM} $y_orientation: Page Orientation: 'normal' | 'wide'
@param: {ENUM} $y_allow_set_credentials: DEFAULT IS SET to 'no' ; set this value to 'yes' must be set just for internal URLs as this can be a security issue ; if set to 'auto' (this is safe) will auto detect if can trust based on admin.php / index.php local framework scripts
Generate a PDF Document on the fly from a piece of HTML code.
Notice: this is using a secured cache folder, unique per visitor ID
public static function tag_remove_start ( ) {} :: HTML
@return: {HTML} Comment
Set an HTML Comment TAG END (all code between START/END like these tags will be removed)
public static function tag_remove_end ( ) {} :: HTML
@return: {HTML} Comment
Set an HTML Comment TAG START (all code between START/END like these tags will be removed)
public static function tag_page_break ( ) {} :: HTML
@return: {HTML} Comment
Set an HTML Comment TAG HTMLDoc PageBreak
public static function tag_page_size ( ) {} :: HTML
@return: {HTML} Comment
Set an HTML Comment TAG HTMLDoc Page SIZE
public static function tag_page_normal ( ) {} :: HTML
@return: {HTML} Comment
Set an HTML Comment TAG HTMLDoc Page PORTRAIT
public static function tag_page_wide ( ) {} :: HTML
@return: {HTML} Comment
Set an HTML Comment TAG HTMLDoc Page LANDSCAPE

class Properties


class Constants



documentation generated on: 2023-10-19 23:15:59 +0000


Smart.Framework © 2009-2023 unix-world.org