update printer menggunakan TSPL
This commit is contained in:
parent
ddfb6a9b66
commit
fcea573284
@ -6,7 +6,7 @@ class Prints extends BaseController {
|
||||
|
||||
public function sample($access, $sample) {
|
||||
// Path shared printer menggunakan format yang lebih jelas
|
||||
$printerPath = '\\\\10.148.5.20\\POSTEKC'; // Path ke printer yang dibagikan
|
||||
$printerPath = '\\\\10.148.5.20\\POSTEKCLAB'; // Path ke printer yang dibagikan
|
||||
|
||||
|
||||
// $pplData = "<<<PPL
|
||||
@ -30,19 +30,38 @@ class Prints extends BaseController {
|
||||
// PPL";
|
||||
|
||||
// Data ZPL untuk mencetak label
|
||||
$startSection = "^XA\n^PW400\n^LL224\n";
|
||||
$nameSection = "^FO10,2\n^A0N,23,23\n^FD MRS. I PUTU AYU PUTRI PERTIWI ^FS\n";
|
||||
$yearSection = "^FO12,25\n^A0N,22,22\n^FD F 24Y ^FS\n";
|
||||
$labelBarcodeSection = "^FO85,50\n^BY2,2.0,45\n^BCN,100,N,N,N\n^FD25082257^FS\n";
|
||||
$numberCodeSection = "^FO374,43\n^A0B,25,25\n^FD 25082257 ^FS\n";
|
||||
$sampleSection = "^FO19,45\n^A0B,27,27\n^FD $sample ^FS\n";
|
||||
$parameterSection = "^FO10,165\n^A0N,23,23\n^FD PSA, HDL, LDL, BUN, SGOT ^FS\n";
|
||||
$lisNumSection = "^FO10,195\n^A0N,17,20\n^FD LIS 4112082257 ^FS\n";
|
||||
$hisNumSection = "^FO10,210\n^A0N,20,20\n^FD HIS 01241101855 ^FS\n";
|
||||
$numSampleSection = "^FO240,200\n^A0N,27,27\n^FD $access 115 ^FS\n";
|
||||
$endSection = "^XZ";
|
||||
// $startSection = "^XA\n^PW400\n^LL224\n";
|
||||
// $nameSection = "^FO10,2\n^A0N,23,23\n^FD MRS. I PUTU AYU PUTRI PERTIWI ^FS\n";
|
||||
// $yearSection = "^FO12,25\n^A0N,22,22\n^FD F 24Y ^FS\n";
|
||||
// $labelBarcodeSection = "^FO85,50\n^BY2,2.0,45\n^BCN,100,N,N,N\n^FD25082257^FS\n";
|
||||
// $numberCodeSection = "^FO374,43\n^A0B,25,25\n^FD 25082257 ^FS\n";
|
||||
// $sampleSection = "^FO19,45\n^A0B,27,27\n^FD $sample ^FS\n";
|
||||
// $parameterSection = "^FO10,165\n^A0N,23,23\n^FD PSA, HDL, LDL, BUN, SGOT ^FS\n";
|
||||
// $lisNumSection = "^FO10,195\n^A0N,17,20\n^FD LIS 4112082257 ^FS\n";
|
||||
// $hisNumSection = "^FO10,210\n^A0N,20,20\n^FD HIS 01241101855 ^FS\n";
|
||||
// $numSampleSection = "^FO240,200\n^A0N,27,27\n^FD $access 115 ^FS\n";
|
||||
// $endSection = "^XZ";
|
||||
|
||||
$messagesToPrint = $startSection.$nameSection.$yearSection.$labelBarcodeSection.$numberCodeSection.$sampleSection.$parameterSection.$parameterSection.$lisNumSection.$hisNumSection.$numSampleSection.$endSection;
|
||||
$printCoba ="N
|
||||
q400
|
||||
Q224,24+0
|
||||
I8,A,001
|
||||
|
||||
A10,2,0,3,1,1,N,'MRS. I PUTU AYU PUTRI PERTIWI'
|
||||
A12,25,0,2,1,1,N,'F 24Y'
|
||||
B85,50,0,1,2,2,45,N,'25082257'
|
||||
A374,43,3,3,1,1,N,'25082257'
|
||||
A19,45,3,3,1,1,N,'SPUTUM'
|
||||
A10,165,0,3,1,1,N,'PSA, HDL, LDL, BUN, SGOT'
|
||||
A10,195,0,2,1,1,N,'LIS 4112082257'
|
||||
A10,210,0,2,1,1,N,'HIS 01241101855'
|
||||
A240,200,0,3,1,1,N,'20112024 115'
|
||||
|
||||
P1
|
||||
";
|
||||
|
||||
// $messagesToPrint = $startSection.$nameSection.$yearSection.$labelBarcodeSection.$numberCodeSection.$sampleSection.$parameterSection.$parameterSection.$lisNumSection.$hisNumSection.$numSampleSection.$endSection;
|
||||
$messagesToPrint = $printCoba;
|
||||
|
||||
// Membuat file sementara untuk ZPL
|
||||
$tempFile = tempnam(sys_get_temp_dir(), 'ZPL');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user