boombuler / barcode

a barcode creation lib for golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is there a way to reduce left and right margin of barcode in Code128?

parthmind opened this issue · comments

We want to reduce the left and right side margin of barcode inside the generated image. Please advice.

Hi,

would you show me the code you use to generate the image? By default the code128 barcode hase no margin but it can get margin if you use my scale function.

For example if the barcode itself is 100 pixels wide after generating and scaling it to 250 px width afterwards, it will scale the barcode to 200 px and add a margin of 25 px on each side. Because this lib is about barcode generation and not about image scaling, I didn't want to fight with subpixel rendering etc :)