[Skip to main content](#vessel-content)

#   How to Change the size of Barcode

##

- **[pestal](/forum/user/36760-pestal "View pestal's Profile")**
- [![pestal's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36760-pestal "View pestal's Profile") Topic Author
- [ Offline](/forum/user/36760-pestal)

Less More

- Posts: 1
- Thank you received: 0
-
-

11 years 6 months ago [\#197345](#197345) by [pestal](/forum/user/36760-pestal "View pestal's Profile")  *[How to Change the size of Barcode](/forum/17-serial-how-to/876170-how-to-change-the-size-of-barcode#197345 "-- 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")* was created by *[pestal](/forum/user/36760-pestal "View pestal's Profile")*

-- 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

- [ ![image55205f951fcca.png](/forum/attachment/23559) ](/forum/attachment/23559 "...05f951fcca.png") [ ](/forum/attachment/23559?download=1 "...05f951fcca.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODc2MTcwLWhvdy10by1jaGFuZ2UtdGhlLXNpemUtb2YtYmFyY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 6 months ago [\#197347](#197347) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to Change the size of Barcode](/forum/17-serial-how-to/876170-how-to-change-the-size-of-barcode#197347 "-- 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")*

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 Code:

if(empty($d['size'])) $d['size'] = 40; $BarCode = hikaserial::get('inc.barcode', 'ean13', $d['size'], $width, $showText);

By 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);

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,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [pestal](/forum/user/36760-pestal "View pestal's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODc2MTcwLWhvdy10by1jaGFuZ2UtdGhlLXNpemUtb2YtYmFyY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")**
- [![lionel75's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11856-lionel75 "View lionel75's Profile")
- [ Offline](/forum/user/11856-lionel75)

Less More

- Posts: 846
- Thank you received: 92
-
-

11 years 6 months ago -  11 years 6 months ago [\#197365](#197365) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  Replied by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")* on topic *[How to Change the size of Barcode](/forum/17-serial-how-to/876170-how-to-change-the-size-of-barcode#197365 "-- 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")*

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

Last edit: 11 years 6 months ago by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODc2MTcwLWhvdy10by1jaGFuZ2UtdGhlLXNpemUtb2YtYmFyY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 6 months ago [\#197368](#197368) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to Change the size of Barcode](/forum/17-serial-how-to/876170-how-to-change-the-size-of-barcode#197368 "-- 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")*

Hi,

@lionel75
See some more appropriate thread for your question.
[ www.hikashop.com/forum/17-serial-how-to/...hkserial.html#169553](http://www.hikashop.com/forum/17-serial-how-to/870733-how-many-bar-code-symbology-suported-by-hkserial.html#169553)
[ www.hikashop.com/forum/17-serial-how-to/...uded-pdf.html#154608](http://www.hikashop.com/forum/17-serial-how-to/867880-assign-barcode-to-an-included-pdf.html#154608)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODc2MTcwLWhvdy10by1jaGFuZ2UtdGhlLXNpemUtb2YtYmFyY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")**
- [![lionel75's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/11856-lionel75 "View lionel75's Profile")
- [ Offline](/forum/user/11856-lionel75)

Less More

- Posts: 846
- Thank you received: 92
-
-

11 years 1 month ago -  11 years 1 month ago [\#214731](#214731) by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")  Replied by *[lionel75](/forum/user/11856-lionel75 "View lionel75's Profile")* on topic *[How to Change the size of Barcode](/forum/17-serial-how-to/876170-how-to-change-the-size-of-barcode#214731 "-- 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")*

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

Last edit: 11 years 1 month ago by [lionel75](/forum/user/11856-lionel75 "View lionel75's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODc2MTcwLWhvdy10by1jaGFuZ2UtdGhlLXNpemUtb2YtYmFyY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 1 month ago [\#214736](#214736) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to Change the size of Barcode](/forum/17-serial-how-to/876170-how-to-change-the-size-of-barcode#214736 "-- 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")*

Hi,

Lib "barcode2" : [ pear.php.net/package/Image\_Barcode2](http://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') {

for more details, please refer to the lib file (admin.../com_hikaserial/inc/barcode.php)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vODc2MTcwLWhvdy10by1jaGFuZ2UtdGhlLXNpemUtb2YtYmFyY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.179 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
