mirror of
https://github.com/cwinfo/php-barcode.git
synced 2024-11-22 14:00:28 +00:00
Update README.md
This commit is contained in:
parent
010bb1ef92
commit
fced16a840
16
README.md
16
README.md
@ -13,16 +13,28 @@ include 'barcode.php';
|
|||||||
$generator = new barcode_generator();
|
$generator = new barcode_generator();
|
||||||
|
|
||||||
/* Output directly to standard output. */
|
/* Output directly to standard output. */
|
||||||
|
header("Content-Type: image/$format");
|
||||||
$generator->output_image($format, $symbology, $data, $options);
|
$generator->output_image($format, $symbology, $data, $options);
|
||||||
|
|
||||||
/* Create bitmap image. */
|
/* Create bitmap image and write to standard output. */
|
||||||
|
header('Content-Type: image/png');
|
||||||
$image = $generator->render_image($symbology, $data, $options);
|
$image = $generator->render_image($symbology, $data, $options);
|
||||||
imagepng($image);
|
imagepng($image);
|
||||||
imagedestroy($image);
|
imagedestroy($image);
|
||||||
|
|
||||||
/* Generate SVG markup. */
|
/* Create bitmap image and write to file. */
|
||||||
|
$image = $generator->render_image($symbology, $data, $options);
|
||||||
|
imagepng($image, $filename);
|
||||||
|
imagedestroy($image);
|
||||||
|
|
||||||
|
/* Generate SVG markup and write to standard output. */
|
||||||
|
header('Content-Type: image/svg+xml');
|
||||||
$svg = $generator->render_svg($symbology, $data, $options);
|
$svg = $generator->render_svg($symbology, $data, $options);
|
||||||
echo $svg;
|
echo $svg;
|
||||||
|
|
||||||
|
/* Generate SVG markup and write to file. */
|
||||||
|
$svg = $generator->render_svg($symbology, $data, $options);
|
||||||
|
file_put_contents($filename, $svg);
|
||||||
```
|
```
|
||||||
|
|
||||||
Use with GET or POST:
|
Use with GET or POST:
|
||||||
|
Loading…
Reference in New Issue
Block a user