PHP5 Tutorial: PHP's GD module generates barcodes

Source: Internet
Author: User

The version of PHP5 is used in this article. Note that the GD module of PHP should be turned on before use. gd.so for Php_gd2.dll,linux in Windows. Extract the compressed file to Apache and execute http://localhost/barcode/index.php. PHP5 generate barcodes See the following figure:

1. Type: Select barcode type

2. Output : picture format

3. Thickness: bar code Height

4. Resolution: Barcode Size

5. Font: bar code below the text size, you can not display text

6. Text: Barcode Printing Content

Of course, this PHP5 generated barcode program just to make the text into a barcode, but not flexible to use it embedded in other PHP programs, I will compress the inside of the test.php made some adjustments, so that it can be flexible for other programs. The runtime simply passes the barcode type and text to test.php, for example:

http://localhost/barcode/test.php?codebar=BCGcode39&text=20090729

or run http://localhost/barcode/mytest.php



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.