PHP Classes

HTML Bar codes

Recommend this page to a friend!

      HTML Bar Codes  >  All threads  >  HTML Bar codes  >  (Un) Subscribe thread alerts  
Subject:HTML Bar codes
Summary:need to change the height of bar code
Messages:8
Author: keiba loman
Date:2007-09-28 15:40:39
Update:2007-10-05 09:19:27
 

  1. HTML Bar codes   Reply   Report abuse  
Picture of  keiba loman keiba loman - 2007-09-28 15:40:39
thanks for your code source it works well.
I will like to increase the size of the bar code,but i try to modify the parameters(height,wide) that doesn't change a height.
the bar code only changes in length when i make some modification.
can you give me an helping hand.
thanks.

  2. Re: HTML Bar codes   Reply   Report abuse  
Picture of Mark W Ryan Mark W Ryan - 2007-10-01 18:10:27 - In reply to message 1 from keiba loman

Just use the setHeight method

$bc = new I25Barcode('barcode',$value);
$bc->setHeight(50);

or you can use

$bc->setFactor($sizeFactor); // this proportionaly sizes the bar code

to position it on a page you can throw some css at it.

$bc->addStyle("
position:absolute;
top:0px;
left:570px;
");

  3. Re: HTML Bar codes   Reply   Report abuse  
Picture of  keiba loman keiba loman - 2007-10-02 17:01:17 - In reply to message 2 from Mark W Ryan
i have set changes but the height doesn't change.
$bc2 = new c39Barcode('bcx2',$_REQUEST['sentid']);
$bc2->setHeight(80);
echo $bc2->getBarcode();

the second method only changes the bar code length.
i'll try again,
thanks .

  4. Re: HTML Bar codes   Reply   Report abuse  
Picture of Mark W Ryan Mark W Ryan - 2007-10-02 17:24:59 - In reply to message 3 from keiba loman
The barcode will be constraind by the size of the container that you are putting it in.

try putting it on a page with nothing else and you will see what I mean.

If to try to put a 300x80 object in a 200x30 hole somethings got to give.

  5. Re: HTML Bar codes   Reply   Report abuse  
Picture of  keiba loman keiba loman - 2007-10-03 09:52:58 - In reply to message 4 from Mark W Ryan
i put aside the fact that i put the bar code in a popup.
but when i try to execute your script solely and even if i do $bc2->setHeight(80),or $bc2->setHeight(0) the result is still the same.
and in this test i just follow the instructions contain in your readme file.

include_once("C39Barcode_class.php");
$bc2 = new c39Barcode('bcx2','TEST');
//$bc2->setFactor(1);
$bc2->setHeight(50); //or $bc2->setHeight(80);
echo $bc2->getBarcode(); // squirts out style & htlm in one string.

  6. Re: HTML Bar codes   Reply   Report abuse  
Picture of Mark W Ryan Mark W Ryan - 2007-10-04 19:05:08 - In reply to message 5 from keiba loman
It's works for me in IE6 & IE7

This class is dependant on the behaivor of CSS in IE.

I do not have a way to test it in other browsers.

Are you using IE 6|7 ?

  7. Re: HTML Bar codes   Reply   Report abuse  
Picture of  keiba loman keiba loman - 2007-10-05 08:37:46 - In reply to message 6 from Mark W Ryan
I use mozilla firefox 2.0.0.7
so i'll try with IE6|7

best regards.

  8. Re: HTML Bar codes   Reply   Report abuse  
Picture of  keiba loman keiba loman - 2007-10-05 09:19:27 - In reply to message 7 from keiba loman
it works well on IE6,
but where i do my training they only use mozilla firefox.
thanks a lot.