Why was crooked mPDF to output pdf?

Before worked fine, now everything is generated at random.
Deduce a simple table with basic styles.

Earlier on samopisnom website, it worked fine (it generated a PDF all clear, one to one with the original document):
5a324d17b9484203339707.png

Mpdf connected to the Symphony, we have the same document:
public function pdfAction(Request $request, LoggerInterface $logger)
{
 $mpdf = new Mpdf(array('utf-8', 'A4', 12, 'dejavusanscondensed', 1, 1, 1, 1, 0, 0, 'P'));
$mpdf->SetDefaultFont('dejavusanscondensed');
$mpdf->SetDefaultFontSize(12);
 $mpdf->WriteHTML($css, 1);
 $mpdf->WriteHTML($content, 2);
 $mpdf->Output($file_name, 'D');
die();
 return new Response();
 }

and now displays:
5a324c082405f484464702.png

I can not understand, already the second day I have tried everything. (tried version 6.1 and "tfox/mpdf-port-bundle": "1.3.*"
and "symfgenus/mpdf-wrapper": "dev-master") Now I use version 7.0.2 mpdf - everywhere the same.
Prompt where to dig?

Maybe something with the CSS style:
My css
@media all {
 body, td, th {
 font-family: arial;
 font-style: normal;
 font-weight: normal;
 color: #333333;
 font-size: 1rem;
 line-height: 1.75 rem;
 background-color: #9d9d9d;
}

 img {
 width: auto;
 height: auto;
 border: none;
}

 h1 {
 font-size: 1.5 rem;
 margin-top: 2rem;
}

 h2 {
 font-size: 1.25 rem;
}

 h1, h2 {
 margin-bottom: 1rem;
}

 table {
 border-spacing: 1px;
 background-color: #706f6f;
}

 th {
 background-color: #9d9d9d;
 padding: .5rem 1rem;
 color: #ffffff;
}

 td {
 background-color: #ffffff;
 padding: .5rem 1rem;
 vertical-align: top;
}

 p {
 margin-bottom: 1rem;
}

 .wrapper {
 background-color: #ffffff;
 max-width: 900px;
 padding: .5rem 2rem;
 margin: 2rem auto;

 -webkit-box-shadow: 7px 7px 10px 0px rgba(0, 0, 0, 0.1);
 -moz-box-shadow: 7px 7px 10px 0px rgba(0, 0, 0, 0.1);
 box-shadow: 7px 7px 10px 0px rgba(0, 0, 0, 0.1);
}

 .section {
 margin-bottom: 2.5 rem;
}

 .risk {
 font-weight: bold;
}

 .val {
 text-align: right;
}

 .colspan {
 font-weight: bold;
 background-color: #ededed;
}

 .num {
 font-weight: bold;
 text-align: right;
}

 .plus {
 color: #1b6e0c;
}

 .minus {
 color: #b40100;
}

 .sel {
 border-bottom: 1px solid #706f6f;
}

 table.internal {
 border-spacing: 0;
}

 .internal td {
 font-size: 85%;
 line-height: 1.5 rem;
}

 .internal td:first-of-type {
 border-right: 1px solid #ccc;
}
}

@media screen {
 a {
 color: #1d50ff;
 font-size: 1.25 rem;
 font-weight: bold;
 vertical-align: baseline;
}

 a:link {
 text-decoration: none;
}

 a:visited {
 color: #1d50ff;
}

 a:hover {
 text-decoration: underline;
}

 .file {
 height: 26px;
 padding: 1rem 1rem 1rem 40px;
 background: url('/build/images/pdf.png') left center no-repeat;
}

 .file.top {
 border-bottom: 2px dotted #c6c6c6;
}

 .file.bott {
 border-top: 2px dotted #c6c6c6;
}
}

@media print {
 body {
 background-color: #ffffff;
}

 .file {
 display: none;
}
}

.text-success {
 color: #1b6e0c;
}

.text-warning {
 color: #6f5b25;
}

.text-danger {
 color: #b40100;
}

June 10th 19 at 15:14
2 answers
June 10th 19 at 15:16
Font no?
Tried to copy fonts from a working mpdf - the same thing. At pereimenovan font folder, it gives an error that the fonts are not found. How can you even check? - Deon99 commented on June 10th 19 at 15:19
June 10th 19 at 15:18
mPDF in the latest versions of working with fonts and css a little differently and in your example it's clearly visible. In my project I am using mPDF 6.1 , when switching to 7, all was about the same as you and sometimes (in the table) is worse. Just try to use an older version. I think it will help.

Find more questions by tags PHP