barcode
barcode copied to clipboard
Margins problem 2.1.0
Hi,
I have a QRcode Left and Right margins problem.
Hi, if you mean that there is no effect on changing top, bottom, left and fight margins, I guess I found some solution for this problem. For some reason there is no passing of margins values, so they are used with default values (30, 30, 30, 30). To fix it, you can:
- open file <your_glpi_folder>/plugins/barcode/inc/barcode.class.php (even for QRcode margins)
- find there strings smth like
$width = $config['maxCodeWidth']; $height = $config['maxCodeHeight']; $marginH = $config['marginHorizontal']; $marginV = $config['marginVertical']; they are somewhere at 307-310 strings - insert after them code $pdf->ezSetMargins($config['marginTop'], $config['marginBottom'], $config['marginLeft'], $config['marginRight'] );
et voilà
bthw, if you want set that margins in cm, just insert $pdf->ezSetCmMargins($config['marginTop'], $config['marginBottom'], $config['marginLeft'], $config['marginRight'] ); but beware, cm are more large, so if you get blank sheet, decrease your values
Thank you DenSardonic, it works for me.