<?php
session_start();
require("../database/dbConection.php");
$dataHoraImpressao  = date("d/m/Y H:i");
ob_start();


# ------- QRCODE ------- #
include_once("include/php-qrcode/vendor/autoload.php");
$urlSiteRegulacao = "https://regulacaomunicipal.pmlf.ba.gov.br/";
$setQRCode      = (new \chillerlan\QRCode\QRCode())->render($urlSiteRegulacao);

# ------- ------ ------- #
echo "
<table style='width:100%; margin-top:-14px'>
  <tr>
    <td style='text-align:center'>
      <img src='$setQRCode' width='600px'>
    </td>
  </tr>
</table>
<br>
";

/*
require_once '../../lib_sistemas/mpdf8/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf([
	'margin_left'   => 2,
	'margin_right'  => 2,
	'margin_top'    => 2.5,
	'margin_header' => 2.5,  
  'margin_bottom' => 2.5,
  'mode'          => 'utf-8',
  'default_font'  => 'tahoma',
  'format'        => 'A4'
]);

$html = ob_get_clean();
$mpdf->mirrorMargins = 1;
$stylesheet = file_get_contents('relatorios/relatorio.css');
$mpdf->WriteHTML($stylesheet,1);  

$header = "";

$headerE = $header;
$footer = "<div style='font-size:5pt'>|$dataHoraImpressao|</div>";
$footerE = $footer;

$mpdf->SetHTMLHeader($header);
$mpdf->SetHTMLHeader($headerE,'E');
$mpdf->SetFooter($footer);
$mpdf->SetFooter($footerE,'E');
$mpdf->SetTitle('Comprovante Agendamento');
$mpdf->WriteHTML($html);
$mpdf->Output("ComprovanteAgendamento$numeroProtocolo.pdf",'I');
exit;
*/
?>