My guess is that the output is raw data that you should be saving into a PNG file, because I know the opening header has "PNG" in ASCII. Chances are you should be telling the class to output directly into a filestream.
Out of curiosity, I need a similar library for a project coming up soon, and have you checked out https://github.com/dineshrabara/barcode ? It promises a lot of features, so I've been looking at that lately.
Well I am passing in the header as the directions said: header('Content-Type: image/png');
And I didn't see this one, but seems to look promising. The only thing I liked with the one I linked to is that it also puts the Input of the barcode at the bottom of the image. For me it just looked better and easier to read real text instead of relying on a scanner.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community