<?php
session_start();

if(phpversion()>=8.0) {
	require_once('../mpdf8/autoload.php');
}
else {
	require_once('../mpdf/autoload.php');
}
$mpdf = new \Mpdf\Mpdf([
	'orientation' => 'L',
	'setAutoTopMargin' => 'pad',
	'setAutoBottomMargin' => 'pad',
	'shrink_tables_to_fit' => 1 
]);

$html = '<style>
div.edt_grille, div.td, div.th {
	box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border: 1px solid grey;
    font-family: Liberation Sans, Arial;
    text-align:center;
    margin:auto;
}
#edt_briques {
	position:fixed;
	height:90%;
	float:right;
	overflow:scroll;
	z-index:100;
}
.heure {
	width:60px;
}
.heure, .recept_open {
	display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
}
.recept_open {
	background-color:#eee;
}
.recept_close {
	background-color:#7D7777;
}
.txt_close {
	font-style:italic;
	font-size:1.8em;
	color:black;
	text-rotate:90;
}
.openmsg {
	display:block;
	text-align:center;
	font-size: 0.8em;
}
.cartclic {
	display:inline;
}
.cartouche {
	display:inline-block;
	/*padding:0px 1px 1px 1px;*/
	border:1px solid grey;
	width:120px;
	height:30px;
	text-align:center;
	line-height:12px;
	font-size: 0.8em;
	padding-left:10px;
	margin-top:10px;
}
.cartouche span {
	vertical-align:middle;
}
.cartouche .txtlibre_1 {
	padding-top:20px;
}
.cartouche .txtlibre_2 {
	padding-top:3px;
}
.cartedt {
	display:inline-block;
	/*padding:0px 1px 1px 1px;*/
	border:1px solid grey;
	width:120px;
	text-align:center;
	line-height:12px;
	font-size: 0.8em;
}
.cartedt span {
	vertical-align:middle;
}
.cartedt, .txtlibre_1 {
	margin-top:20px;
}
.cartedt, .txtlibre_2 {
	margin-top:9px;
	margin-left:7px;
}
.msg {
	font-family: Arial,Verdana;
	text-align:center;
	font-size:1.6em;
	color:black;
}
.tit {
	font-family: Arial,Verdana;
	text-align:center;
	font-size:1.6em;
	color:black;
}
.noprint, .none {
	display:none;
}
.pdfmarg {
	padding-top:6px;
	padding-bottom:-6px;
}
.openmsgsped {
	line-height:5px;
	font-size:0.6em;
	padding-top:0px;
	padding-bottom:0px;
}
.brikspe1 {
	font-size:0.6em;
	line-height:5px;
	padding-top:-9px;
}
.brikspe2 {
	font-size:0.6em;
	line-height:5px;
	padding-top:-7px;
}
.fontsmall {
	font-size:0.5em;
}
.pdfmargnone {
	line-height: 1;
	font-size:1.3em;
}
@page {
    margin-top: 5mm;
    margin-bottom: 5mm;
    margin-left: 5mm;
    margin-right: 5mm;
}
</style>
<p class="tit" style="'.$_SESSION['edttitsize'].$_SESSION['edttitcolor'].'">'.$_SESSION['edt_tit'].'</p>'.$_SESSION['edt_tablepdf'].'<p class="msg" style="'.$_SESSION['edtbotmsgsize'].$_SESSION['edtbotmsgcolor'].'">'.$_SESSION['edt_msg'].'</p>';
//corriger aussi /db/proc/mailing_edt.php
$mpdf->WriteHTML($html);
$mpdf->Output('edt'.@$_SESSION['pdfweek'].'.pdf', \Mpdf\Output\Destination::DOWNLOAD);

