Reply to Re: Writing Barcodes

Your name:

Reply:


Posted by strawberry on 05/02/07 13:12

On May 2, 1:38 pm, KDawg44 <KDaw...@gmail.com> wrote:
> On May 1, 5:37 pm, Hendri Kurniawan <ask...@email.com> wrote:
>
>
>
> > KDawg44 wrote:
> > > Hi,
>
> > > I am trying to write a page that creates some barcodes using the PEAR
> > > Image_Barcode module. I am getting one barcode to write just fine
> > > but it will not print out any more than one and will not print any
> > > text on the page.
>
> > <----- SNIP -------->
>
> > > How do I get it so I can write HTML to the same page as my barcode? I
> > > am writing something very simple to play with this to start and only
> > > one barcode is printing.
>
> > > <?php
> > > require("Image/Barcode.php");
>
> > > $bc = new Image_Barcode;
>
> > > $bc->draw("BE1029", "Code39", "png");
> > > $bc->draw("BE1020", "Code39", "png");
> > > echo "hello"
> > > ?>
>
> > <----- SNIP -------->
>
> > IMHO, because the class from PEAR actually putting out an image, it
> > ultimately behaves as an image contenttype=image/png (or something like
> > that).
>
> > So in order to have 2 or more barcodes on your page, or text, you chould
> > write another php (even html) that utilizes that your current barcode
> > script.
>
> > Example:
> > create-barcode.php
> > <?php
> > require("Image/Barcode.php");
> > $bc = new Image_Barcode;
> > $bc->draw($_REQUEST['param1'], $_REQUEST['param2'], "png");
> > ?>
>
> > index.html
> > <html>
> > <!-- This is the first barcode -->
> > <img src="create-barcode.php?param1=BE1029&param2=Code39" />
> > <!-- This is the second barcode -->
> > <img src="create-barcode.php?param1=BE1020&param2=Code39" />
> > <!-- This is just text -->
> > Hello
> > </html>
>
> > PLEASE NOTE: That the script that i put there is just an example of how
> > it can be done, without the consideration of other security measures.
>
> > Hendri Kurniawan
>
> Thanks very much!

I don't know anything about PEAR but I seem to remember that www.fpdf.org
includes a php script for outputting barcodes to PDF. It might be
worth a look.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация