Question: Barcode Is Not Showned

Barcode Is Not Showned

Hi why barcode is not showned in print barcode? I have remove ini_set from php.ini and also set 777 permission to assets/upload When I check the source code in generate function, I found t

PA

pass app

Asked

Hi why barcode is not showned in print barcode?

I have remove ini_set from php.ini and also set 777 permission to assets/upload When I check the source code in generate function, I found that $re is true, therefore function exit.

public function generate($text, $bcs = ‘code128’, $height = 50, $drawText = true, $get_be = false, $re = false) { // Barcode::setBarcodeFont(‘my_font.ttf’); $check = $this->prepareForChecksum($text, $bcs); $barcodeOptions = [‘text’ => $check[‘text’], ‘barHeight’ => $height, ‘drawText’ => $drawText, ‘withChecksum’ => $check[‘checksum’], ‘withChecksumInText’ => $check[‘checksum’]]; //‘fontSize’ => 12, ‘factor’ => 1.5, if ($this->Settings->barcode_img) { $rendererOptions = [‘imageType’ => ‘png’, ‘horizontalPosition’ => ‘center’, ‘verticalPosition’ => ‘middle’]; if ($re) { Barcode::render($bcs, ‘image’, $barcodeOptions, $rendererOptions); exit; }

  • MS

    Mian Saleem

    Answered

    Hello,

    The $re is used to determine if the barcode render is requested.

    Do you see the barcode on product details modal/page?

    You can enable the app logs by changing the log_threshold to 1 in the app/config/config.php file and then visit the page again to reproduce error. Lastly check the latest log file in the app/logs/ folder.

    Thank you

  • PA

    pass app

    Answered

    Hello, There is no error occur in log. The barcode is on shown also in product detail page. What is the stable version of php that work best for this system ?

  • MS

    Mian Saleem

    Answered

    Hello,

    If the barcode is showing on other pages. It should show up on print barcode page too 😦 If it’s not showing then your php server should log the error and event the app logs should have some errors.

    PHP7.4 and PHP8 at the moment.

    Thank you

  • Login to Reply