0, 'padding' => 0, 'fgcolor' => array(0, 0, 0), 'bgcolor' => false, 'module_width' => 0.5, 'module_height' => 10 ); return $pdf->write1DBarcode($eanNumber, 'EAN13', '', '', '', 20, 1, $style, 'N'); } if ($_SERVER["REQUEST_METHOD"] == "POST") { $articleNumber = $_POST['article_number']; $setName = $_POST['set_name']; $sql = "SELECT * FROM articles WHERE article_number = ? OR set_name LIKE ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("ss", $articleNumber, $setName); $stmt->execute(); $result = $stmt->get_result(); if ($result) { if ($result->num_rows > 0) { $articleData = $result->fetch_assoc(); } else { $error = "Artikel nicht gefunden."; } } else { $error = "Fehler beim Ausführen der Abfrage: " . $conn->error; } } if (isset($_POST['download_pdf'])) { if (!empty($articleData)) { $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor('M_Viper'); $pdf->SetTitle('Article Information'); $pdf->SetSubject('Article Details'); $pdf->SetKeywords('Article, Details, PDF'); $pdf->AddPage(); $pdf->SetFont('helvetica', '', 13); $html = '

 

Hersteller: ' . $articleData['manufacturer'] . '

Bezeichnung: ' . $articleData['set_name'] . '

Artikelnummer: ' . $articleData['article_number'] . '

EAN: ' . $articleData['ean_barcode'] . '


'; // Adding additional tables for parts $parts = array( array("Bezeichnung" => "Backofen", "Teil" => $articleData['part1'], "EAN" => $articleData['part1_ean'], "Barcode" => $articleData['ean_barcode'], "Pakete" => $articleData['quantity']), array("Bezeichnung" => "Kochfeld", "Teil" => $articleData['part2'], "EAN" => $articleData['part2_ean'], "Barcode" => '', "Pakete" => ''), array("Bezeichnung" => "Auszug", "Teil" => $articleData['part3'], "EAN" => $articleData['part3_ean'], "Barcode" => '', "Pakete" => ''), array("Bezeichnung" => "Backblech", "Teil" => $articleData['part4'], "EAN" => $articleData['part4_ean'], "Barcode" => '', "Pakete" => '') ); foreach ($parts as $key => $part) { $barcode = ($part["Barcode"] && $key === 0) ? generateEANBarcode($part["Barcode"], $pdf) : ''; $html .= '

' . $part["Bezeichnung"] . ': ' . $part["Teil"] . '

EAN: ' . $part["EAN"] . '

' . ($barcode ? $barcode : '') . '

 

'; } $html .= '
Pakete: ' . $articleData['quantity'] . '
'; $pdf->writeHTML($html); $pdf->Output($pdfDirectory . '/article_details.pdf', 'F'); header('Content-Type: application/pdf'); header('Content-Disposition: attachment; filename="article_details.pdf"'); readfile($pdfDirectory . '/article_details.pdf'); exit; } else { $error = "Keine Artikelinformationen gefunden."; } } ?> Einbauherdset Suche

Einbauherdset Suche

Title Image

Artikel Details

Hersteller:

Artikelnummer:

Bezeichnung:

EAN Barcode:

:

Bezeichnung:

EAN Barcode:

Pakete: