By using the 'barryvdh/laravel-dompdf' i want to generate a pdf that looks a certain way. However there is a difference in how the HTML looks like in page and the pdf generated.
HTML is quite basic
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<link rel="stylesheet" href="style/pdfStyle.css">
</head>
<body>
<div id="idTemplateContainer" class="threeSection">
<div id="idHeader" class="d-flex w-100 justify-content-between pb-3">
<div class="invisible" contenteditable="true"></div>
<div class="d-block">
<div class="eingabefeld text2 no-mouseflow text-center display-5" contenteditable="true"
data-text="Enter name here" style="font-weight: 700; text-transform: uppercase"
data-placeholder="Enter name here"></div>
<div class="eingabefeld text2 no-mouseflow text-center display-6" contenteditable="true"
data-placeholder="Enter position here here" data-text="Enter position here">Software Engineer</div>
</div>
<div><input id="myImage" style="display: hidden !important;" class="photo-upload" type="file"
accept="image/*, image/jpeg"><img id="the-picture"
style="width: 100%;height: 100%;border: 1px solid black !important; border-radius: 0.4rem;"
src="../upload_image.JPG"></div>
</div>
<div id="idPersonDescription" class="d-flex">
<div class="w-50 eingabefeld text2 no-mouseflow" contenteditable="true"></div>
<div class="w-50 eingabefeld text2 no-mouseflow" contenteditable="true"></div>
</div>
<div id="idPersonExperience">
<div id="idPersonExperienceHeader" class="d-flex">
<div class="eingabefeld text2 h6 m-0" contenteditable="true" data-text="Enter name here">Skills</div>
<div class="eingabefeld text2 h6 m-0" contenteditable="true" data-text="Enter name here">Work Experience
</div>
</div>
<div id="idPersonExperienceInformation" class="d-flex">
<div id="idCvBodyLeftSide">
<div id="idCvProfileInformation">
<div class="aboutMeSection mt-3 mb-3" data-section="about_me_section">
<div class="sectionHeaderBar d-flex justify-content-between">
<div class="eingabefeld text2 no-mouseflow h5 m-0 align-content-center"
contenteditable="true" style="line-height: 1.4em;">About me</div>
<div><button class="btn btn-dark function-new-section me-2"
style="width: 37px; height: 38px;">+</button><button
class="btn btn-outline-danger function-delete-section me-1 ps-0 pe-0"
style="width: 37px; height: 38px;"><svg xmlns="http://www.w3.org/2000/svg"
width="16" height="16" fill="currentColor" class="bi bi-trash"
viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z">
</path>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z">
</path>
</svg></button></div>
</div>
<div class="addable" style="z-index: 5;">
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">My Name is Roman</div>
</div>
</div>
<div class="personalInformationSection mt-3 mb-3" data-section="personal_information_section">
<div class="sectionHeaderBar d-flex justify-content-between">
<div class="eingabefeld text2 no-mouseflow h5 m-0 align-content-center"
contenteditable="true" style="line-height: 1.4em;">Personal information</div>
<div><button class="btn btn-dark function-new-section me-2"
style="width: 37px; height: 38px;">+</button><button
class="btn btn-outline-danger function-delete-section me-1 ps-0 pe-0"
style="width: 37px; height: 38px;"><svg xmlns="http://www.w3.org/2000/svg"
width="16" height="16" fill="currentColor" class="bi bi-trash"
viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z">
</path>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z">
</path>
</svg></button></div>
</div>
<div class="addable" style="z-index: 5;">
<div class="d-flex">
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Email</div>
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;"></div>
</div>
</div>
<div class="addable" style="z-index:5;">
<div class="d-flex">
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Email</div>
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;"></div>
</div>
</div>
<div class="addable" style="z-index:5;">
<div class="d-flex">
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Email</div>
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;"></div>
</div>
</div>
<div class="addable" style="z-index:5;">
<div class="d-flex">
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Email</div>
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;"></div>
</div>
</div>
<div class="addable" style="z-index:5;">
<div class="d-flex">
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Email</div>
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;"></div>
</div>
</div>
<div class="addable" style="z-index:5;">
<div class="d-flex">
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Email</div>
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;"></div>
</div>
</div>
</div>
<div class="educationSection mt-3 mb-3" data-section="education_section">
<div class="sectionHeaderBar d-flex justify-content-between">
<div class="eingabefeld text2 no-mouseflow h5 m-0 align-content-center"
contenteditable="true" style="line-height: 1.4em;">Education</div>
<div><button class="btn btn-dark function-new-section me-2"
style="width: 37px; height: 38px;">+</button><button
class="btn btn-outline-danger function-delete-section me-1 ps-0 pe-0"
style="width: 37px; height: 38px;"><svg xmlns="http://www.w3.org/2000/svg"
width="16" height="16" fill="currentColor" class="bi bi-trash"
viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z">
</path>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z">
</path>
</svg></button></div>
</div>
<div class="addable" style="z-index: 5;">
<div class="title eingabefeld text2 no-mouseflow fw-bold h6 m-0"
contenteditable="true" style="line-height: 1.4em;">Masters Degree in XX</div>
<div class="title eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Jun 2010 - March 2012</div>
<div class="eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">• Learned about Software Development<br>• Learned about
Development Principles<br>• Learned about Software Design</div>
</div>
</div>
</div>
</div>
<div id="idCvBodyRightSide">
<div class="idCvDetailInputBlock" style="z-index: 5;">
<div class="linie2"></div>
<div class="title eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Position</div>
<div class="d-flex fw-bold">
<div class="w-75 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Place, Company name</div>
<div class="w-25 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">10/2022 - 12/2024</div>
</div>
<div class="templateInput eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Tasks description</div>
</div>
<div class="idCvDetailInputBlock">
<div class="linie2"></div>
<div class="title eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Position</div>
<div class="d-flex fw-bold">
<div class="w-75 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Place, Company name</div>
<div class="w-25 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">10/2022 - 12/2024</div>
</div>
<div class="templateInput eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Tasks description</div>
</div>
<div class="idCvDetailInputBlock">
<div class="linie2"></div>
<div class="title eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Position</div>
<div class="d-flex fw-bold">
<div class="w-75 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Place, Company name</div>
<div class="w-25 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">10/2022 - 12/2024</div>
</div>
<div class="templateInput eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Tasks description</div>
</div>
<div class="idCvDetailInputBlock">
<div class="linie2"></div>
<div class="title eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Position</div>
<div class="d-flex fw-bold">
<div class="w-75 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Place, Company name</div>
<div class="w-25 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">10/2022 - 12/2024</div>
</div>
<div class="templateInput eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Tasks description</div>
</div>
<div class="idCvDetailInputBlock">
<div class="linie2"></div>
<div class="title eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Position</div>
<div class="d-flex fw-bold">
<div class="w-75 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Place, Company name</div>
<div class="w-25 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">10/2022 - 12/2024</div>
</div>
<div class="templateInput eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Tasks description</div>
</div>
<div class="idCvDetailInputBlock">
<div class="linie2"></div>
<div class="title eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Position</div>
<div class="d-flex fw-bold">
<div class="w-75 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Place, Company name</div>
<div class="w-25 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">10/2022 - 12/2024</div>
</div>
<div class="templateInput eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Tasks description</div>
</div>
<div class="idCvDetailInputBlock">
<div class="linie2"></div>
<div class="title eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Position</div>
<div class="d-flex fw-bold">
<div class="w-75 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Place, Company name</div>
<div class="w-25 eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">10/2022 - 12/2024</div>
</div>
<div class="templateInput eingabefeld text2 no-mouseflow" contenteditable="true"
style="line-height: 1.4em;">Tasks description</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
The CSS is very overwhelming 12k lines, hence wouldn't link it here.
Code to generate the PDF
$data = [
'from' => 'Hallo Welt',
'to' => 'Hallo Welt',
'because' => 'Hallo Welt'
];
$pdf = Pdf::loadView('pdf.generatePdf', $data);
return $pdf->download('example.pdf');
Question: How to generate a PDF in laravel that take the css-setting 1-1 and generates the page ?

flex.