0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
marketting
/
system
/
plugins
/
[
Home
]
File: dompdf_pi.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------------- | COPYRIGHT NOTICE | Copyright 2008 JROX Technologies, Inc. All Rights Reserved. | ------------------------------------------------------------------------- | This script may be only used and modified in accordance to the license | agreement attached (license.txt) except where expressly noted within | commented areas of the code body. This copyright notice and the | comments above and below must remain intact at all times. By using this | code you agree to indemnify JROX Technologies, Inc, its corporate agents | and affiliates from any liability that might arise from its use. | | Selling the code for this program without prior written consent is | expressly forbidden and in violation of Domestic and International | copyright laws. | | ------------------------------------------------------------------------- | FILENAME - dompdf_pi.php | ------------------------------------------------------------------------- | | This plugin generates PDFs | */ function pdf_create($html = '', $filename = '', $stream = true) { $CI =& get_instance(); require_once("dompdf/dompdf_config.inc.php"); require_once("convertcharset/ConvertCharset.class.php"); //initialize the DOMPDF and charset classes $dompdf = new DOMPDF(); $convertcharset = new ConvertCharset(); //convert to UTF8 $html = $convertcharset->Convert($html, 'utf-8', 'iso-8859-1'); $dompdf->load_html($html); $dompdf->set_paper($CI->config->item('module_affiliate_marketing_viral_pdfs_paper_size'), $CI->config->item('module_affiliate_marketing_viral_pdfs_orientation')); $dompdf->render(); if ($stream) { $dompdf->stream($filename.".pdf"); } else { $CI->load->helper('file'); write_file("./images/pdfs/$filename.pdf", $dompdf->output()); } } ?>