ob_start();
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Payment extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('form_validation');
$this->load->library('session');
$this->load->helper('form');
$this->load->helper('url');
$this->load->library('cart');
$this->load->database();
$this->load->model('user_model');
$this->load->helper('string');
$this->load->library('email');
$this->load->library("Pdf");
}
public function pdf(){
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 061');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 061', PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
$html = <<<eof>
<style>
body { margin: 0 auto; padding: 0; background: #f1f2f4; }
img {border: 0;}
.ie8 {backgound: #f1f2f4;}
.voucher {
font-family:Arial, Helvetica, sans-serif;
font-size:26px;
text-decoration:none;
font-weight:normal;
color:#000;
padding-left:20px;
text-shadow:1px 1px 1px #FFF;
}
.work {
float:left;
width:48%;
height:auto;
margin-right:20px;
}
.work1 {
float:left;
width:48%;
height:auto;
}
.work1_head {
float:left;
width:100%;
height:auto;
margin-bottom:10px;
}
.work1_head1 {
float:left;
width:auto;
height:auto;
margin-right:10px;
margin-top:10px;
}
.work1_head2 {
float:left;
width:230px;
height:auto;
font-size:13px;
font-family:Arial, Helvetica, sans-serif;
font-weight:normal;
color:#000;
line-height:20px;
}
.back {
background-color:#000;
color:#FFF;
text-align:center;
padding:5px 10px 5px 10px;
-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;
}
</style>
<body>
<!-- Start Top Line -->
<!-- End Top Line -->
<!-- Start Page -->
<!-- Start Logo -->
<!-- End Logo -->
<!-- Start Last News -->
<!-- Start Last News -->
<!-- Start Last News - Title -->
<img src="images/side.jpg" width="100%"/> | World of Bowling: 2 hours of bowling and pizza for two. | Voucher Number:
VFG – 2412536
| Purchased by:
Ruaridh Kilgour
| Expiry Date:
22/05/2013
| Introduction |
- Lorem Ipsum is simply dummy text of the
- Lorem Ipsum is simply dummy text
- Lorem Ipsum is simply dummy text of the printing and typesetting industry.
- Lorem Ipsum is simply dummy text
- Lorem Ipsum is simply dummy text of the printing and typesetting industry.
- Lorem Ipsum is simply dummy text.
| Problem? | Get in contact: | help@studentsponge.com |
| |
<img src="images/logo.png" width="100%"/> | Voucher |
Deal Information
Loremipsum sample text, loremipsum sample text loremipsum sample text.Loremipsum sample text, loremipsum sample text loremipsum sample text.Loremipsum sample text, loremipsum sample text loremipsum sample text.
Loremipsum sample text, loremipsum sample text loremipsum sample text.
- Loremipsum sample text.
- Loremipsum sample text.
- Loremipsum sample text.
- Loremipsum sample text.
- Loremipsum sample text.
- Loremipsum sample text.
|
Cancellation and Refund Policys
You may cancel your purchase of this deal within seven working days following the date on which we issued you the voucher provided that the voucher has not yet been redeemed with the merchant.
To cancel your voucher and receive your refund, please email help@studentsponge.com informing us of your decision and your reason behind cancellation.
Provided that the voucher has not been redeemed and you have requested your refund within 7 working days of the voucher being issued, we will happily give you a refund.
|
|
|
| | <!-- End Last News -->
!-- Start Our Store -->
<!-- Start Our Store - Title -->
| <img src="images/line.png" alt="" style="display: block;"/>
| <!-- End OurStore - Title -->
| <!-- End Our Store -->
|
|
EOF;
$pdf->writeHTML($html, true, false, true, false, '');
$pdf->lastPage();
$pdf->Output('example_061.pdf', 'I');
}
}
?>