class CRM_Utils_PDF_Utils

Methods

static string|void
html2pdf(array $text, string $fileName = 'civicrm.pdf', bool $output = FALSE, null $pdfFormat = NULL)

No description

static 
_html2pdf_tcpdf($paper_size, $orientation, $margins, $html, $output, $fileName, $stationery_path)

Convert html to tcpdf.

static string
_html2pdf_dompdf($paper_size, $orientation, $html, $output, string $fileName)

No description

static 
_html2pdf_wkhtmltopdf($paper_size, $orientation, $margins, $html, $output, string $fileName)

No description

static float|int
convertMetric($value, $from, $to, null $precision = NULL)

convert value from one metric to another.

Details

at line 51
static string|void html2pdf(array $text, string $fileName = 'civicrm.pdf', bool $output = FALSE, null $pdfFormat = NULL)

Parameters

array $text List of HTML snippets.
string $fileName The logical filename to display. Ex: "HelloWorld.pdf".
bool $output FALSE to display PDF. TRUE to return as string.
null $pdfFormat Unclear. Possibly PdfFormat or formValues.

Return Value

string|void

at line 150
static _html2pdf_tcpdf($paper_size, $orientation, $margins, $html, $output, $fileName, $stationery_path)

Convert html to tcpdf.

Parameters

$paper_size
$orientation
$margins
$html
$output
$fileName
$stationery_path

at line 204
static string _html2pdf_dompdf($paper_size, $orientation, $html, $output, string $fileName)

Parameters

$paper_size
$orientation
$html
$output
string $fileName

Return Value

string

at line 232
static _html2pdf_wkhtmltopdf($paper_size, $orientation, $margins, $html, $output, string $fileName)

Parameters

$paper_size
$orientation
$margins
$html
$output
string $fileName

at line 264
static float|int convertMetric($value, $from, $to, null $precision = NULL)

convert value from one metric to another.

Parameters

$value
$from
$to
null $precision

Return Value

float|int