public function listadoAction($aditionalFilter = '')
 {
     $pdf = new PDF("P", 'mm', "A4");
     $pdf->SetTopMargin(15);
     $pdf->SetLeftMargin(10);
     $pdf->AliasNbPages();
     $pdf->SetFillColor(210);
     $per = new Permisos();
     $em = new EntityManager($per->getConectionName());
     $query = "select t1.IdPerfil,t1.Permisos,t4.Perfil,t2.Titulo as Opcion,t3.Titulo as SubOpcion\n                from AgtPermisos as t1,menu as t2, submenu as t3, perfiles as t4\n                where t1.IDOpcion=t2.IDOpcion\n                and t1.IDOpcion=t3.IDOpcion\n                and t3.Id=t1.IDSubOpcion\n                and t1.IdPerfil=t4.Id\n                order by t1.IdPerfil,t1.IDOpcion,t1.IDSubOpcion;";
     $em->query($query);
     $rows = $em->fetchResult();
     $em->desConecta();
     unset($per);
     $perant = "";
     $opcant = "";
     foreach ($rows as $row) {
         if ($perant != $row['IDPerfil']) {
             $pdf->AddPage();
             $pdf->Cell(40, 5, $row['Perfil'], 0, 0, "L", 1);
         } else {
             $pdf->Cell(40, 5, "", 0, 0, "L", 0);
         }
         $pdf->SetFillColor(240);
         if ($opcant != $row['Opcion']) {
             $pdf->Cell(30, 5, $row['Opcion'], 0, 0, "L", 1);
         } else {
             $pdf->Cell(30, 5, "", 0, 0, "L", 0);
         }
         $perant = $row['IDPerfil'];
         $opcant = $row['Opcion'];
         $pdf->Cell(40, 5, $row['SubOpcion'], 0, 0, "L", 0);
         $permisos = array('C' => substr($row['Permisos'], 0, 1), 'I' => substr($row['Permisos'], 1, 1), 'B' => substr($row['Permisos'], 2, 1), 'A' => substr($row['Permisos'], 3, 1), 'L' => substr($row['Permisos'], 4, 1), 'E' => substr($row['Permisos'], 5, 1));
         $pdf->Cell(13, 5, $permisos['C'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['I'], 0, 0, "C", 1);
         $pdf->Cell(13, 5, $permisos['B'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['A'], 0, 0, "C", 1);
         $pdf->Cell(13, 5, $permisos['L'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['E'], 0, 1, "C", 1);
         $pdf->SetFillColor(210);
     }
     $archivo = "docs/docs" . $_SESSION['emp'] . "/pdfs/" . md5(date('d-m-Y H:i:s')) . ".pdf";
     $pdf->Output($archivo, 'F');
     $this->values['archivo'] = $archivo;
     return array('template' => '_global/listadoPdf.html.twig', 'values' => $this->values);
 }
}
# Begin PDF Output
$w = 63;
$top = 28;
$c1x = 13;
$c2x = $c1x + $w;
$c3x = $c2x + $w;
$c4x = $c3x + $w;
$c1h = 170;
$c2h = $c1h / 2;
$c3h = $c2h / 2;
$c4h = $c3h / 2;
$bottom = $top + $c1h;
$pdf = new PDF('L', 'mm', 'Letter');
$pdf->Open();
$pdf->SetTopMargin(13);
$pdf->SetLeftMargin(13);
$pdf->SetRightMargin(10);
$pdf->SetAutoPageBreak(True, 13);
$pdf->AddPage();
$pdf->SetCreator($_SERVER["PHP_SELF"]);
$pdf->SetAuthor("Keith Morrison, keithm@infused.org");
$pdf->SetTitle(sprintf(gtc("Pedigree for %s"), $o->full_name()));
$pdf->SetSubject(gtc("Genealogy"));
# Person 1
$pdf->SetY($top);
$pdf->SetX($c1x);
$pdf->Cell($w, $c1h, '', 1, 0, 'L');
$pdf->SetY($top + $c1h / 2 - 6);
$pdf->SetX($c1x);
$pdf->SetFont($font, 'B', 10);
Exemple #3
0
         $this->SetFont('Arial', 'I', 8);
         //Número de página
         $this->Cell(0, 10, iconv('utf-8', 'cp1252', 'Página ') . $this->PageNo() . '/{nb}', 0, 0, 'C');
         $this->Line(15, 260, 200, 260);
     }
     function __construct()
     {
         //Llama al constructor de su clase Padre.
         //Modificar aka segun la forma del papel del reporte
         parent::__construct('P', 'mm', 'A4');
         //parent::__construct('P','mm','Letter');
     }
 }
 //Creación del objeto de la clase heredada
 $pdf = new PDF();
 $pdf->SetTopMargin(5.4);
 $pdf->SetLeftMargin(1.5);
 $pdf->AliasNbPages();
 $pdf->SetFont('Arial', '', 9);
 $pdf->AddPage();
 $pdf->Ln();
 //Construcción de la tabla a mostrar
 $pdf->SetY(90);
 $pdf->SetFont('Arial', 'b', 11);
 $pdf->Text(23, 80, iconv('utf-8', 'cp1252', 'Item'));
 $pdf->Text(35, 80, iconv('utf-8', 'cp1252', 'Productos'));
 $pdf->Text(125, 80, 'Total Ventas');
 $pdf->Text(167, 80, iconv('utf-8', 'cp1252', 'Fecha'));
 $pdf->SetFont('Arial', '', 10);
 $pdf->Line(20, 82, 190, 82);
 $pdf->Line(20, 83, 190, 83);
Exemple #4
0
    function Footer()
      {
        if (!isset($this->foot)){
           $this->SetFont('helvetica','',7);
           $this->Cell(186,5,$this->transl_page.$this->getGroupPageNo().$this->transl_of.$this->getPageGroupAlias(),0,0,'C');
        } else {
           $this->Cell(186,5,$this->foot,0,0,'C');
        }
      }

    }

$config = new Config;
$pdf=new PDF();
$pdf->setLang($admin_aziend['lang']);
$pdf->SetTopMargin(10);
$pdf->SetFooterMargin(10);
$pdf->SetHeaderMargin(5);
$pdf->AliasNbPages();
$pdf->SetFillColor(hexdec(substr($admin_aziend['colore'],0,2)),hexdec(substr($admin_aziend['colore'],2,2)),hexdec(substr($admin_aziend['colore'],4,2)));
$pdf->StartPageGroup();
$pdf->AddPage();
$pdf->writeHtmlCell(186,6,10,$pdf->GetY(),$body['body_text'],0,1);
$pdf->lastPage();
if ($pdf->GetY() > 250){
    $pdf->AddPage();
}
$pdf->Ln(4);
$pdf->Cell(73,4,$admin_aziend['ragso1'].' '.$admin_aziend['ragso2'],0,0,'C');
$pdf->Cell(35,4);
$pdf->Cell(73,4,$customer['ragso1'].' '.$customer['ragso2'],0,1,'C');
Exemple #5
0
    }
    for ($i = 0; $i < 32; $i++) {
        $rows[] = $data;
    }
} else {
    $query = $sql->prepare("SELECT * FROM shelftags WHERE id=? order by upc");
    $result = $sql->execute($query, array($id));
    while ($row = $sql->fetch_row($result)) {
        $rows[] = $row;
    }
}
$pdf = new PDF('P', 'mm', 'Letter');
//start new instance of PDF
$pdf->Open();
//open new PDF Document
$pdf->SetTopMargin(40);
//Set top margin of the page
$pdf->SetLeftMargin(4);
//Set left margin of the page
$pdf->SetRightMargin(0);
//Set the right margin of the page
//$pdf->SetAutoPageBreak(False,15);
$pdf->AddPage();
//Add a page
//Set increment counters for rows
$i = 9;
//x location of barcode
$j = 33;
//y locaton of barcode
$l = 28;
//y location of size and price on label
Exemple #6
0
    $this->Ln(3);
    }

function Footer()
    {
    global $piede;
    //Page footer
    $this->SetY(-10);
    $this->SetFont('helvetica','',8);
    $this->MultiCell(190,4,'Copia '.$piede,0,'C',0);
    }
    }

$pdf=new PDF();
$pdf->AliasNbPages();
$pdf->SetTopMargin(65);
$pdf->SetHeaderMargin(5);
$pdf->SetFillColor(hexdec(substr($admin_aziend['colore'],0,2)),hexdec(substr($admin_aziend['colore'],2,2)),hexdec(substr($admin_aziend['colore'],4,2)));
$pdf->AddPage();
$rs_rig = gaz_dbi_dyn_query("*", $gTables['rigbro'], "id_tes like '$testat'","id_tes desc");
$importo = 0;
while ($rigo = gaz_dbi_fetch_array($rs_rig)) {
    if ($pdf->GetY() <= 280) {
          $pdf->Cell(150,8,$rigo['descri'],1,0,'L');
          $pdf->Cell(40,8,gaz_format_number($rigo['prelis']),1,1,'R');
          $importo += preg_replace("/\,/",'.', $rigo['prelis']);

    } else {
       $pdf->SetY(285);
       $pdf->Cell(150,12,'>>> --- SEGUE SU PAGINA SUCCESSIVA --- >>>',1,1,'C');
       $pdf->AddPage();
Exemple #7
0
         $this->SetFont('Arial', 'I', 8);
         //Page number
         //$this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
         $this->SetX($this->lMargin);
         $this->Cell(0, 10, 'Please consider the environment before printing this report', 0, 0, 'L');
         $this->SetX($this->lMargin);
         $this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
     }
 }
 $pdf = new PDF('L');
 $pdf->AliasNbPages();
 $pdf->SetAuthor("*****@*****.**");
 $pdf->SetSubject("Sales Comparision");
 $pdf->SetTitle("Sales Comparision");
 $pdf->SetCreator("Imran Zahid");
 $pdf->SetTopMargin(9.99);
 $prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => FALSE, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
 $region = "Karachi";
 $pdf->AddPage();
 $pdf->AddCol('month', '10%', 'Month', 'L');
 $pdf->AddCol('KDEPOI', '8.5%', 'Inventory', 'R');
 $pdf->AddCol('KDEPOS', '8.5%', 'Sales', 'R');
 $pdf->AddCol('KDEPOR', '5.5%', 'Ratio', 'R');
 $pdf->AddCol('KTIKI', '8.5%', 'Inventory', 'R');
 $pdf->AddCol('KTIKS', '8.5%', 'Sales', 'R');
 $pdf->AddCol('KTIKR', '5.5%', 'Ratio', 'R');
 $pdf->AddCol('KFPII', '8.5%', 'Inventory', 'R');
 $pdf->AddCol('KFPIS', '8.5%', 'Sales', 'R');
 $pdf->AddCol('KFPIR', '5.5%', 'Ratio', 'R');
 $pdf->AddCol('KLocalI', '8.5%', 'Inventory', 'R');
 $pdf->AddCol('KLocalS', '8.5%', 'Sales', 'R');
Exemple #8
0
        $code .= '101';
        //Draw bars
        for ($i = 0; $i < strlen($code); $i++) {
            if ($code[$i] == '1') {
                $this->Rect($x + $i * $w, $y, $w, $h, 'F');
            }
        }
        //Print text uder barcode
        $this->SetFont('Arial', '', 9);
        $this->Text($x + 6, $y + $h + 11 / $this->k, substr($barcode, -$len));
    }
}
//echo $query;
$pdf = new PDF();
$pdf->Open();
$pdf->SetTopMargin(20);
$pdf->SetLeftMargin(4);
$pdf->SetRightMargin(0);
$pdf->AddPage();
$i = 9;
$j = 33;
$l = 28;
$k = 25;
$m = 0;
$n = 20;
$r = 24;
$p = 5;
$t = 32;
$u = 20;
$down = 31;
while ($m < 32) {
Exemple #9
0
         $this->Ln();
         $this->Ln();
         $this->SetX($this->lMargin);
         $this->Cell($cellSize, $cellHeight, "Order Taken By", 'T', 0, 'C');
         $this->SetX($c);
         $this->Cell($cellSize, $cellHeight, "Approved", 'T', 0, 'C');
         $this->SetX($this->w - $this->rMargin - $cellSize);
         $this->Cell($cellSize, $cellHeight, "Delivered By", 'T', 1, 'C');
     }
 }
 $showcat = false;
 if (isset($_GET['showcat']) && $_GET['showcat'] == 'Y') {
     $showcat = true;
 }
 $pdf = new PDF('P', 'mm', 'A4');
 $pdf->SetTopMargin($pdf->tMargin * 2);
 $pdf->AliasNbPages();
 $pdf->SetAuthor("*****@*****.**");
 $pdf->SetSubject("Estimates");
 $pdf->SetTitle("Estimates");
 $pdf->SetCreator("Imran Zahid");
 $prop = array('color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'padding' => 1, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 8));
 $sql = "" . "  SELECT sm.sale_master_id, \n" . "         sm.sale_date, \n" . "         date_format(sm.sale_date, '%d-%b-%Y') sale_date_fmt, \n" . "         IFNULL(p.party_name, 'Cash') party_name, \n" . "         p.party_city, \n" . "         p.party_code, \n" . "         sm.billte_no1, \n" . "         sm.transporter_name1, \n" . "         CASE p.payment_term \n" . "            WHEN 0 THEN 'Cash' \n" . "            ELSE date_format(DATE_ADD(sm.sale_date, INTERVAL p.payment_term DAY), '%d-%b-%Y') \n" . "         END due_date, \n" . "         sm.billte_no2, \n" . "         sm.transporter_name2, \n" . "         sm.billte_no3, \n" . "         sm.transporter_name3 \n" . "    FROM sales_master sm \n" . "         LEFT OUTER JOIN party p ON p.party_code = sm.party_code \n" . "   WHERE 1=1 \n";
 if (strlen($_GET['invoice']) > 0) {
     $sql .= "     AND sm.sale_master_id = {$_GET['invoice']} \n";
 } else {
     if (strlen($_GET['party']) > 0) {
         $sql .= "     AND sm.party_code = {$_GET['party_hidden']} \n";
     }
     if (strlen($_GET['date_start']) > 0) {
         $sql .= "     AND TO_DAYS(sm.sale_date) >= TO_DAYS('" . my_sql_date($_GET['date_start']) . "') \n";
Exemple #10
0
            }
        }
        //Print text uder barcode
        $this->SetFont('Arial', '', 6);
        //$this->Text($x+12,$y+$h+2,substr($barcode,-$len));
        $this->Text($x + 6, $y + $h + 2, substr($barcode, 0, 6));
        $this->Text($x + 24, $y + $h + 2, substr($barcode, 6, 6));
    }
}
if (isset($_REQUEST['upcs'])) {
    $upcs = $_REQUEST['upcs'];
    $pdf = new PDF();
    //start new instance of PDF
    $pdf->Open();
    //open new PDF Document
    $pdf->SetTopMargin(5);
    //Set top margin of the page
    $pdf->SetLeftMargin(4);
    //Set left margin of the page
    $pdf->SetRightMargin(0);
    //Set the right margin of the page
    $pdf->AddPage();
    $count = 0;
    $prep = $sql->prepare("SELECT description FROM products WHERE upc='{$upc}'");
    foreach ($upcs as $upc) {
        if ($count == 13 * 5) {
            $pdf->AddPage();
            $count = 0;
        }
        $x = $pdf->GetX();
        $y = $pdf->GetY();
Exemple #11
0
            }
        }
        //Print text uder barcode
        $this->SetFont('Arial', '', 9);
        $this->Text($x, $y + $h + 11 / $this->k, substr($barcode, -$len));
    }
}
include '../db.php';
$id = isset($_GET['id']) ? $_GET['id'] : 0;
$query = $sql->prepare("SELECT * FROM shelftags WHERE upc NOT LIKE '%40176450380%' AND id=? AND (upc like '000909%' or upc like '000907%' or upc like '000908%')");
$result = $sql->execute($query, array($id));
$pdf = new PDF('P', 'mm', 'Letter');
//start new instance of PDF
$pdf->Open();
//open new PDF Document
$pdf->SetTopMargin(37);
//Set top margin of the page
$pdf->SetLeftMargin(4);
//Set left margin of the page
$pdf->SetRightMargin(0);
//Set the right margin of the page
$pdf->AddPage();
//Add a page
//Set increment counters for rows
$i = 9;
//x location of barcode
$j = 33;
//y locaton of barcode
$l = 30;
//y location of size and price on label
$k = 7;
Exemple #12
0
require("fpdf/fpdf.php");
require("fpdf/pdf.php");

include("connect.php");

$sql = "SELECT hn,an,ptname,age,ptright,bedcode,doctor,bed,diagnos FROM bed WHERE an = '$cAn' ";
$result_dt_hn =mysql_query($sql);
list($chn, $can, $cptname , $cage , $cptright , $cbedcode , $cdoctor , $cBed1 ,$cdiagnos ) = Mysql_fetch_row($result_dt_hn);

$ll = "P";

$pdf = new PDF($ll,'mm',array( 55,30 ));
$pdf->SetThaiFont();
$pdf->SetAutoPageBreak(false,0);
$pdf->SetMargins(0, 0);
$pdf->SetTopMargin(2); // °”Ћєі§и“ °—йєЋєй“ій“єЇє
$pdf->AddPage();
$pdf->SetFont('AngsanaNew','',14);


$exName = '';

// а™з°«и“аїзєWardЊ‘а»…√÷їи“«
$wardExTest = preg_match('/45.+/', $cbedcode);
if( $wardExTest > 0 ){
	
	// а™з°«и“аїзє™—йє3 ∂й“дЅиг™иаїзє™—йє2
	$wardR3Test = preg_match('/R3\d+|B\d+/', $cBed1);
	$wardBxTest = preg_match('/B[0-9]+/', $cBed1);
	$exName = ( $wardR3Test > 0 OR $wardBxTest > 0 ) ? '™—йє3' : '™—йє2' ;
	
         }
     }
     $pdf->SetX($posx);
     $posy = $pdf->GetY();
 }
 //initialize pdf generation
 @($persDb = $db_functions->get_person($family_id));
 // *** Use person class ***
 $pers_cls = new person_cls();
 $pers_cls->construct($persDb);
 $name = $pers_cls->person_name($persDb);
 $title = pdf_convert(__('Ancestor sheet') . __(' of ') . $name["standard_name"]);
 $pdf = new PDF();
 $pdf->SetTitle($title);
 $pdf->SetAuthor('Huub Mons (pdf: Yossi Beck)');
 $pdf->SetTopMargin(4);
 $pdf->SetAutoPageBreak(false);
 //$pdf->SetLineWidth(3);
 //$pdf->AddPage();
 $pdf->AddPage("L");
 $pdf->SetLeftMargin(16);
 $pdf->SetRightMargin(16);
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Ln(2);
 $name = $pers_cls->person_name($persDb);
 $pdf->MultiCell(0, 10, __('Ancestor sheet') . __(' of ') . $name["standard_name"], 0, 'C');
 $pdf->Ln(2);
 $pdf->SetFont('Arial', '', 8);
 // Output the cells:
 $posy = $pdf->GetY();
 $posx = $pdf->GetX();
 /**
  * print_PDF prints the Repertory result table in an PDF file.
  *
  * @param string $task 'save_PDF'|'print_PDF': if 'save_PDF' the PDF should get downloaded, if 'print_PDF' the PDF should open in the browser
  * @return void
  * @access public
  */
 function print_PDF($task)
 {
     global $session;
     if ($task == 'save_PDF') {
         $dest = 'D';
     } else {
         $dest = 'I';
     }
     if ($session->lang == 'de') {
         $date = $this->date_to_german($this->date);
     } else {
         $date = $this->date;
     }
     $pdf = new PDF('L');
     $pdf->SetTopMargin(20);
     $pdf->SetFont('Arial', '', 12);
     $pdf->SetTitle(_("Repertorization result"), true);
     $pdf->SetAuthor(_("OpenHomeopath"), true);
     $pdf->SetCreator(_("openhomeo.org"), true);
     $pdf->AddPage();
     $w1 = $pdf->GetStringWidth(_('Patient:') . '  ' . _('Rep.-Date:') . '  ');
     $w3 = $pdf->GetStringWidth(_('Case taking:') . '  ');
     $w4 = $pdf->GetStringWidth(_('Prescription:') . '  ' . _('Rep.-No.:') . '  ');
     $pdf->SetFont('', 'B');
     $w2 = $pdf->GetStringWidth(iconv('UTF-8', 'windows-1252', $this->patient) . $date . $date);
     $pdf->SetFont('', '');
     $pdf->write(7, _('Patient:') . '  ');
     $pdf->SetFont('', 'B');
     $pdf->write(7, iconv('UTF-8', 'windows-1252', $this->patient));
     $pdf->SetFont('', '');
     // Move to the right
     $pdf->Cell(295 - ($w1 + $w2));
     $pdf->Cell(0, 7, _('Rep.-Date:') . '  ');
     $pdf->SetFont('', 'B');
     $pdf->Cell(0, 7, $date, 0, 1, 'R');
     $pdf->SetFont('', '');
     $pdf->write(7, _('Prescription:') . '  ');
     $pdf->SetFont('', 'B');
     $pdf->write(7, iconv('UTF-8', 'windows-1252', $this->prescription));
     if (!empty($this->rep_id)) {
         $pdf->SetFont('', '');
         // Move to the right
         $pdf->Cell(295 - ($w1 + $w2));
         $pdf->Cell(0, 7, _('Rep.-No.:') . '  ');
         $pdf->SetFont('', 'B');
         $pdf->Cell(0, 7, $this->rep_id, 0, 1, 'R');
     } else {
         $pdf->Ln(7);
     }
     $pdf->SetFont('', '');
     $pdf->write(7, _('Case taking:') . '  ');
     $pdf->SetFont('', 'I', 11);
     $pdf->Cell(0, 1, "", 0, 2);
     $note_ar = explode("%br", $this->note);
     foreach ($note_ar as $note_line) {
         $pdf->Cell(0, 5, iconv('UTF-8', 'windows-1252', $note_line), 0, 2);
     }
     // Line break
     $pdf->Ln(10);
     $header_ar = array();
     $first_row_ar = array();
     $data_ar = array();
     $this->get_table_data($header_ar, $first_row_ar, $data_ar, $summary);
     $pdf->create_result_table($header_ar, $first_row_ar, $data_ar, 70);
     $pdf->SetFont('Arial', '', 10);
     $pdf->Ln(5);
     $pdf->write(7, iconv('UTF-8', 'windows-1252', $summary));
     $pdf->Output("OpenHomeopath_" . _("Repertorization result") . "_" . date("Y-m-d_H-i") . ".pdf", $dest);
 }