I am trying to generate multiple barcode image files in symfony by looping.
Here loop start……
$barcodeService = $this->container->get('mopa_barcode.barcode_service');
$filename = $barcode . ".png";
$barcodeService->saveAs('code128', $barcode, $filename);
loop end here…..
for one item its working fine but when trying it in looping it giving me an exception as
ErrorException: Warning: imagesy(): 57 is not a valid Image resource in
/vendor/Zend/library/Zend/Barcode/Renderer/Image.phpline 267
As j0k suggested to update ZF, you would need to do the same.
I created the issue at MopaBarcodeBundle Issue List. I updated my ZF version to latest release and solved the problem. I tried to find out the problem. It was related to use of the registry (singleton) pattern for the management of objects.
And please have a look at Mopa Compatible code
Good Luck