-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpdfReorderForm.php
45 lines (35 loc) · 1.35 KB
/
pdfReorderForm.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
session_start();
require('data/functions.php');
require('data/fpdf/main_functions.php');
require('data/mysql_connect.php');
require('data/barcode/vendor/autoload.php');
$priceB = 0;
$priceN = 0;
$product_number = $_GET['productNumber'];
// Instanciation of inherited class
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Arial','',12);
define('EURO',chr(128));
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Arial','',20);
$pdf->Cell(20,6,LetterCorrection("BESTELLANTRAG"),0,1);
$pdf->Ln();
$pdf->SetFont('Arial','',12);
$msg = "Nachfolgend ist der Bestellantrag für das Produkt<br>
<b>$product_number - ".fetch("products","name","number",$product_number)."</b><br>
<br>
Bei gelegenheit dieses Dokument erweitern.<br>
Dieses Dokument dient rein zur Dokumentation.
<br>";
$pdf->WriteHTML(LetterCorrection($msg));
$generator = new \Picqer\Barcode\BarcodeGeneratorPNG();
file_put_contents('files/barcodes/BC-'.$product_number.'.png', base64_decode(base64_encode($generator->getBarcode($product_number, $generator::TYPE_CODE_128))));
$pdf->Image('files/barcodes/BC-'.$product_number.'.png',63,265,80);
//$pdf->Output('F',"files/forms/reorderForm/RF-".$product_number."-D".date("YmdHi").".pdf");
$pdf->Output();
?>