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'] . ' |
|
' . $part["Bezeichnung"] . ': ' . $part["Teil"] . ' EAN: ' . $part["EAN"] . ' |
' . ($barcode ? $barcode : '') . ' |
Pakete: ' . $articleData['quantity'] . ' |
Artikelnummer:
Bezeichnung:
EAN Barcode:
Bezeichnung:
EAN Barcode: