Hi Martin,
I’ve just sent you the new version (v4.1.3-dev) via WeTransfer.
After the update, please go to “WooCommerce > Settings > EAN > (2D) Barcodes > Compatibility > WooCommerce PDF Invoices & Packing Slips”, and locate new “Content” option I’ve just added. By default it’ set to (for 1D barcodes and 2D barcodes respectively):
<div class="ean_wrapper">[alg_wc_ean_barcode]</div>
<div class="ean_wrapper_2d">[alg_wc_ean_barcode_2d]</div>
That is, now you can customize the barcode output with our [alg_wc_ean_barcode]
and [alg_wc_ean_barcode_2d]
shortcodes.
These shortcodes have w
and h
attributes that set the width and height of a single bar element (1D barcodes) or single rectangle element (2D barcodes) in pixels. By default, it’s:
[alg_wc_ean_barcode w="2" h="30"]
[alg_wc_ean_barcode_2d w="2" h="2"]
So, for example, to make 2D barcodes two times smaller, set the “Content” option to:
<div class="ean_wrapper_2d">[alg_wc_ean_barcode_2d w="1" h="1"]</div>
Finally, two more attributes can help you customize the barcode image size – img_w
and img_h
. These attributes set the width and height of the final image. For example, to make 1D barcodes exactly 100 pixels width, we could use this:
[alg_wc_ean_barcode w="2" h="30" img_w="100"]
I hope that makes sense, and please let me know if you have any questions.
P.S. If you like the plugin, please consider leaving me a rating here or here, I would really appreciate it.