- Posts: 1
- Thank you received: 0
How to Change the size of Barcode
11 years 5 months ago #197345
by pestal
How to Change the size of Barcode was created by pestal
-- HikaShop version -- : 2.4.0
-- HikaSerial version -- : 1.9.1
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.39
Hi, First of all thanks for an excellent product hikashop and serial .
My problem is that i can not change the size of the barcode i print using AttachSerial plugin
when i increase the size ṕarameter the only thing that happens is that my barcode gets higher but it is still as wide (or narrow) all the time . It's most likely just a matter of setting the right parameter.
When changing the same parameter for my qrcode is affects both width and height so it works for that
and is the a way of easily regenerate the file that is created and attached for the order , right not when i am testing/creating my eTicket its a bit of work to go to the webshop , add items to the cart , checkout and wait for the confiormation mail
Best regards
Peter
-- HikaSerial version -- : 1.9.1
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.39
Hi, First of all thanks for an excellent product hikashop and serial .
My problem is that i can not change the size of the barcode i print using AttachSerial plugin
when i increase the size ṕarameter the only thing that happens is that my barcode gets higher but it is still as wide (or narrow) all the time . It's most likely just a matter of setting the right parameter.
When changing the same parameter for my qrcode is affects both width and height so it works for that
and is the a way of easily regenerate the file that is created and attached for the order , right not when i am testing/creating my eTicket its a bit of work to go to the webshop , add items to the cart , checkout and wait for the confiormation mail
Best regards
Peter
Please Log in or Create an account to join the conversation.
11 years 5 months ago #197347
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic How to Change the size of Barcode
Hi,
Thanks for the report.
That's right, the setting "size" was just changing the height of the barcode but was not affecting the width.
So, I think that we have to modify the plugin "attach serial" in order to change how the settings are handle.
Please edit the file "plugins/hikaserial/attachserial/attachserial.php" and replace
By
So it will use the parameter "size" to define the width of the barcode lines (in pixels) and it will use the parameter "height" in order to set the height of the barcode (in pixels).
You can't really define a fixed width of a EAN13 barcode, but you can use the parameter "size" as a width coefficient.
Regards,
Thanks for the report.
That's right, the setting "size" was just changing the height of the barcode but was not affecting the width.
So, I think that we have to modify the plugin "attach serial" in order to change how the settings are handle.
Please edit the file "plugins/hikaserial/attachserial/attachserial.php" and replace
Code:
if(empty($d['size']))
$d['size'] = 40;
$BarCode = hikaserial::get('inc.barcode', 'ean13', $d['size'], $width, $showText);
Code:
if(empty($d['h']))
$d['h'] = 40;
if(empty($d['size']))
$d['size'] = 1;
$BarCode = hikaserial::get('inc.barcode', 'ean13', $d['h'], $d['size'], $showText);
You can't really define a fixed width of a EAN13 barcode, but you can use the parameter "size" as a width coefficient.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: pestal
Please Log in or Create an account to join the conversation.
11 years 5 months ago - 11 years 5 months ago #197365
by lionel75
Replied by lionel75 on topic How to Change the size of Barcode
Hi
I read in the forum
"HikaSerial embedded a barcode generator and a QRcode generator.
His library could be use for the generation of such images with a little development."
In wich format could be generate the bar code in hikashop ? only raster ?
thank's
I read in the forum
"HikaSerial embedded a barcode generator and a QRcode generator.
His library could be use for the generation of such images with a little development."
In wich format could be generate the bar code in hikashop ? only raster ?
thank's
Last edit: 11 years 5 months ago by lionel75.
Please Log in or Create an account to join the conversation.
11 years 5 months ago #197368
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic How to Change the size of Barcode
Hi,
@lionel75
See some more appropriate thread for your question.
www.hikashop.com/forum/17-serial-how-to/...hkserial.html#169553
www.hikashop.com/forum/17-serial-how-to/...uded-pdf.html#154608
Regards,
@lionel75
See some more appropriate thread for your question.
www.hikashop.com/forum/17-serial-how-to/...hkserial.html#169553
www.hikashop.com/forum/17-serial-how-to/...uded-pdf.html#154608
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: lionel75
Please Log in or Create an account to join the conversation.
11 years 1 week ago - 11 years 1 week ago #214731
by lionel75
Replied by lionel75 on topic How to Change the size of Barcode
Hi
where is documented the parameters use by hks for barcode in the php code beneath . Is there other parameters that are not call ( because already set by using defaut options value) ?
is there a php editor that show us the a select box to know wich value can be choose for example has alternative to ean13 ? If not where is define the list of choice of this parameters ?
$BarCode = hikaserial::get('inc.barcode', 'ean13', $d, $d, $showText);
thank's
where is documented the parameters use by hks for barcode in the php code beneath . Is there other parameters that are not call ( because already set by using defaut options value) ?
is there a php editor that show us the a select box to know wich value can be choose for example has alternative to ean13 ? If not where is define the list of choice of this parameters ?
$BarCode = hikaserial::get('inc.barcode', 'ean13', $d, $d, $showText);
thank's
Last edit: 11 years 1 week ago by lionel75.
Please Log in or Create an account to join the conversation.
11 years 1 week ago #214736
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic How to Change the size of Barcode
Hi,
Lib "barcode2" : pear.php.net/package/Image_Barcode2
inc.barcode constructor :
for more details, please refer to the lib file (admin.../com_hikaserial/inc/barcode.php)
Regards,
Lib "barcode2" : pear.php.net/package/Image_Barcode2
inc.barcode constructor :
Code:
public function __construct($type = 'int25', $height = 60, $width = 1, $showText = true, $rotation = 0, $format = 'png') {
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.186 seconds