Commit e3d925a2 authored by David Metzler's avatar David Metzler
Browse files

Added support for skin specified mpdf options.

parent 838d6a29
......@@ -27,15 +27,16 @@ class FrxMPDF extends FrxDocument {
// The option switch off links on PDF will bee good here too
$disable_links = variable_get('forena_pdf_disable_links', TRUE);
$skin_data = Frx::Data()->getContext('skin');
$page_data = isset($skin_data['mpdf']['page']) ? $skin_data['mpdf']['page'] : array('orientation' => 'P');
$html = $this->check_markup($r->html);
if ($disable_links) {
$html = preg_replace('/<a href=\"(.*?)\">(.*?)<\/a>/', "\\2", $html);
}
$mpdf = new mPDF('UTF-8');
$mpdf->AddPageByArray(array(
'orientation' => 'P'
));
$mpdf->AddPageByArray($page_data);
$output = '';
$output = '<html><head>';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment