Last active
November 11, 2024 00:04
-
-
Save amirhp-com/28d09a52424ff2daff4ca657aeb6d0a1 to your computer and use it in GitHub Desktop.
Generate a Vertical barcode using Picqer/Barcode and Help of PeproDev Ultimate Invoice for mPDF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Generate a Vertical barcode using Picqer/Barcode and Help of PeproDev Ultimate Invoice for mPDF | |
* https://www.linkedin.com/posts/activity-7241606637805858816-Kg9l | |
*/ | |
try { | |
global $PeproUltimateInvoice; | |
$generator = $PeproUltimateInvoice->barcode; | |
$barcode_text = "123456789"; | |
$barcode = 'data:image/jpeg;base64,' . base64_encode($generator->getBarcode($barcode_text, $generator::TYPE_CODE_128));; | |
echo "<img src='$barcode' rotate='90' style='width:30px; height:100px; margin: 8px 0 4px;'>"; | |
} catch (\Throwable $th) { | |
//throw $th; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment