コード例 #1
0
<?php

include_once "../controller/cContratos.php";
$contra = new cContratos();
$texto = $contra->getTextoContratos($_GET['contrato']);
require '../fpdf/fpdf.php';
class ImprimeTabla extends FPDF
{
    function Header()
    {
        $this->bgImage(10, 10);
    }
    function Footer()
    {
        // Position at 1.5 cm from bottom
        $this->SetY(-15);
        // Arial italic 8
        $this->SetFont('Arial', 'I', 8);
        // Page number
        $this->Cell(0, 10, 'Pagina ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
    function bgImage($x, $y)
    {
        //Text rotated around its origin
        $this->Image("../logo_wm.png", $x, $y, 160, 180, "png");
    }
}
$pdf = new ImprimeTabla();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times', '', 7);
コード例 #2
0
 <button class="btn btn-danger" onclick="imprimeContrato()">Imprimir</button>
<div style="background-color: white">
<div class="row">
	<div class="col-md-5">
		<img src="../logo.png" class="img-responsive" style="width: 30%;height: 30%"  />
	</div>
</div>
<div class="row">
<div class="col-lg-12">
<?php 
header('Content-Type: text/html; charset=utf-8');
include_once "../controller/cContratos.php";
$contrato = new cContratos();
$texto = $contrato->getTextoContratos($_POST['contrato']);
echo $texto;
?>
</div>
 </div>
 </div>
 <script>
 	
 </script>