wip pdf
This commit is contained in:
1 parent
c9cac0903a
commit
fd40de7ff5
15 files changed
+4418
-112
No files matched your search
@@ -30,7 +30,6 @@ class CreateProjektInhaltsverzeichnis
|
||||
$inhalt->part = $value->part;
|
||||
$inhalt->seite = $value->seite;
|
||||
$inhalt->neue_seite = $value->neue_seite;
|
||||
$inhalt->seitenzahl_anzeige = $value->seitenzahl_anzeige;
|
||||
$inhalt->no_edit = $value->no_edit;
|
||||
$inhalt->textblock_name = $text->name ?? '';
|
||||
$inhalt->textblock = $text->textblock ?? '';
|
||||
|
||||
@@ -63,6 +63,7 @@ class PdfGenerator
|
||||
$mpdf = new Mpdf(
|
||||
[
|
||||
'debug' => true,
|
||||
'use_kwt' => true,
|
||||
'mode' => 'utf-8',
|
||||
'format' => 'A4-P',
|
||||
'margin_left' => 10,
|
||||
@@ -82,15 +83,13 @@ class PdfGenerator
|
||||
|
||||
$inhaltesverzeichnis = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->where('part', $part)->orderBy('sort')->get();
|
||||
|
||||
// dd($inhaltesverzeichnis);
|
||||
|
||||
$platzhalter = Platzhalter::load($projekte_id);
|
||||
|
||||
foreach ($inhaltesverzeichnis as $inhalt) {
|
||||
|
||||
if ($inhalt->neue_seite) {
|
||||
if ($part == 'nutzwerte') {
|
||||
$mpdf->AddPage('P', '', self::$projekt->nutzwerte_startseite);
|
||||
$mpdf->AddPage('P', '', self::$inhalt->seite);
|
||||
} else {
|
||||
$mpdf->AddPage();
|
||||
}
|
||||
@@ -148,19 +147,18 @@ class PdfGenerator
|
||||
$html .= $textblock2;
|
||||
}
|
||||
|
||||
if ($inhalt->seitenzahl_anzeige == 1) {
|
||||
if ($inhalt->seite != 0) {
|
||||
$mpdf->SetHTMLFooter('<div class="center">Seite {PAGENO} <br><br></div>');
|
||||
}
|
||||
if ($html) {
|
||||
$mpdf->WriteHTML($html, HTMLParserMode::HTML_BODY);
|
||||
}
|
||||
|
||||
ProjektInhaltsverzeichnis::where('id', $inhalt->id)->update(['seite' => $mpdf->page]);
|
||||
|
||||
}
|
||||
|
||||
if ($part == 'standard') {
|
||||
Projekte::where('id', $projekte_id)->update(['nutzwerte_startseite' => $mpdf->page]);
|
||||
$inhaltesverzeichnis = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->where('part', 'nutzwerte')->orderBy('sort')->first();
|
||||
$inhaltesverzeichnis->seite = $mpdf->page + 1;
|
||||
$inhaltesverzeichnis->save();
|
||||
}
|
||||
|
||||
ob_clean();
|
||||
|
||||
Reference in new issue
Block a user