Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide text in barcode #6

Open
ghost opened this issue Feb 24, 2019 · 2 comments
Open

hide text in barcode #6

ghost opened this issue Feb 24, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2019

I want to hide barcode text in bottom. Only barcode should display....how to do that?

gubi added a commit to gubi/Matrix that referenced this issue Apr 23, 2019
@gubi
Copy link

gubi commented Apr 23, 2019

See also the relative merge request

@ZHTEKDev
Copy link

ZHTEKDev commented Jul 2, 2024

//Remove the text below the barcode:

`<?php
class barcode_generator {
public function output_image($format, $symbology, $data, $options) {
switch (strtolower(preg_replace('/[^A-Za-z0-9]/', '', $format))) {
case 'png':
header('Content-Type: image/png');
$image = $this->render_image($symbology, $data, $options);
// Remove the text rendering part
$image = preg_replace('/<text.</text>/', '', $image);
echo $image;
break;
case 'svg':
header('Content-Type: image/svg+xml');
$svg = $this->render_svg($symbology, $data, $options);
// Remove the text rendering part
$svg = preg_replace('/<text.
</text>/', '', $svg);
echo $svg;
break;
default:
return false;
}
}

// Other methods...

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants