| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
}
}
+ /**
+ * Convert html to tcpdf.
+ *
+ * @param $paper_size
+ * @param $orientation
+ * @param $margins
+ * @param $html
+ * @param $output
+ * @param $fileName
+ * @param $stationery_path
+ */
public static function _html2pdf_tcpdf($paper_size, $orientation, $margins, $html, $output, $fileName, $stationery_path) {
// Documentation on the TCPDF library can be found at: http://www.tcpdf.org
// This function also uses the FPDI library documented at: http://www.setasign.com/products/fpdi/about/
* @return string
*/
public static function _html2pdf_dompdf($paper_size, $orientation, $html, $output, $fileName) {
- require_once 'packages/dompdf/dompdf_config.inc.php';
- spl_autoload_register('DOMPDF_autoload');
+ // CRM-12165 - Remote file support required for image handling.
+ define('DOMPDF_ENABLE_REMOTE', TRUE);
+ define('DOMPDF_ENABLE_AUTOLOAD', FALSE);
+ require_once 'vendor/dompdf/dompdf/dompdf_config.inc.php';
+
$dompdf = new DOMPDF();
$dompdf->set_paper($paper_size, $orientation);
$dompdf->load_html($html);
}
/**
- * convert value from one metric to another
+ * convert value from one metric to another.
*
* @param $value
* @param $from
* @param string $author
* @param string $title
*/
- static function &pdflib(
+ public static function &pdflib(
$fileName,
$searchPath,
&$values,
CRM_Core_Error::statusBounce("PDFlib Error: " . $excp->get_errmsg());
}
}
+
}