Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- //require_once(APPPATH.'libraries/pdfwatermarker/pdfwatermarker.php');
- //require_once(APPPATH.'libraries/pdfwatermarker/pdfwatermark.php');
- //require_once(APPPATH.'libraries/fpdf/fpdi.php');
- require_once(APPPATH.'libraries/fpdf/rotation.php');
- class Product extends CI_Controller {
- public function __construct()
- {
- parent::__construct();
- // $this->load->model("M_products");
- // $this->load->model("M_packages");
- // $this->load->model("M_features");
- // $this->load->model("product/Item_catalogue_model", "items");
- // $this->load->model("product/Owner_model", "owner");
- // $this->load->model("product/Products_model", "product");
- // $this->load->model("product/Product_items_model", "product_items");
- // $this->load->model("product/Bill_cycle_model", "bill_cycle");
- }
- public function dummy(){
- $pdf=new PDF();
- $pdf->AddPage();
- $pdf->SetFont('Arial', '', 12);
- $txt="FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say ".
- "without using the PDFlib library. F from FPDF stands for Free: you may use it for any ".
- "kind of usage and modify it to suit your needs.\n\n";
- for($i=0;$i<25;$i++)
- $pdf->MultiCell(0, 5, $txt, 0, 'J');
- $pdf->Output();
- }
- }
- class PDF extends PDF_Rotate
- {
- function Header()
- {
- //Put the watermarkoooooooooooooooooooo
- $this->SetFont('Arial', 'B', 50);
- $this->SetTextColor(255, 192, 203);
- $this->RotatedText(35, 190, 'Faishol Tri A', 45);
- }
- function RotatedText($x, $y, $txt, $angle)
- {
- //Text rotated around its origin
- $this->Rotate($angle, $x, $y);
- $this->Text($x, $y, $txt);
- $this->Rotate(0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement