php barcode generator + image export?
php barcode generator + image export?
For serveral Reasons, I am wanting to have a barcode image generator.
It basicly generates a valid barcode and makes 1 image out of it.
I have found such generator, such as this one:
phphulp.nl/php/scripts/9/88/ (dutch btw)
sample of that code: nieko.net/tools/barcode.php
I dun really care if those are valid barcodes, but this is what I want.
My aim is to convert this form into a function, and then save the barcode image, without displaying it.
basicly, in the end, I want to have an function like:
createbarcodeimage($barcode,$coding,$override,$dispcod);
Unfortunately, I lack the skills on this area. ( creating/motifying images, saving/exporting them )
how do I export an generated Image without displaying it like in the sample?
Tutorials are not appriciated though.
thank you for the posts already, however till now u got me wrong.
In the end, there should be no kind of form like in the sample, but a function.
I want to save the generated imagefile directly to the server computer. No questions asked.
besides that, I dont want a generator to use. I want the source code for it. I have no intentions at all to go to an online generator on a different site for the things i’dd like to use it for.
Best answer:
From initial appearance those barcodes are valid, but I don’t see much “validation routine” in the function.
Question here is… What do you mean by Exporting / Saving? Do you want to browser to get a pop-up that says “save as…”? To do that, you pretty much just change the type. Instead of IMAGE/PNG, you do MIMEType of binary or something similar and it should automatically pop up a “save as”.
EDIT: Okay, that makes more sense. That code given WILL generate barcodes, no external generator needed. However, I have to admit I am NOT that good at PHP to make it actually SAVE the content on YOUR server.
And there are easier ways of generating barcodes than with PHP, IMHO. Personally, if I need to make some generic barcodes, I’d just use Code 3of9, which you can find free fonts out there, and it’s a very simple symbology: just put * in front and in back, and upper-case string in between, that’s it. No need to generate any image at all, but then, I don’t know what you’re trying to do, so I can’t comment on your attempt solution, as I don’t know what problem you’re trying to solve.
Tags: Barcode, export, generator, image
Under Forum

Leave a Comment for php barcode generator + image export?
You must be logged in to post a comment.
Trackback this post | Subscribe to the comments via RSS Feed