Hi,

My need: 
  I have to draw a barcode code128 by choosing the 3 subsets (A,B,C) of
ASCII characters defined by this standart.
  I am looking for either being able to mix several subset within one
barcode (this is the spec of the french Post Colissimo barcode) or being
able to draw parts of barcode 128 and then concanate them. Ideally the first
option would be using pdf renderer, while the second one would probably use
the image renderer.  

 Obviously my current code is not suitable for that :
$bc0ptionsObject = array('text' => "8V41392078260",
                'drawText'      => false,
                'withQuietZones'        => false
                'withChecksumInText'=> false);  
$bc0ptionsRender = array();
$pdf = Zend_Barcode::factory('code128', 'pdf', $bc0ptionsObject,
$bc0ptionsRender )->setResource($pdf)->draw();

My question:
A quick look into ZendFramework\library\Zend\Barcode\Object\Code128.php
shows that there is a protected $_charSets which define subset A,B,C.  
        How can I set the $_charSets using the $bc0ptionsObject parameter during
the call of the barcode::factory ?

Reference:
>From http://en.wikipedia.org/wiki/Code_128 
Subtypes
Code 128 includes 101 symbols: 103 data symbols, 3 start codes, and 1 stop
code. To represent all 128 ASCII values, there are three code sets (A, B,
C), which can be mixed within a single barcode (by using codes 98 and 99 in
code sets A and B, 100 in code sets A and C and 101 in code sets B and C to
switch between them):
    128A (Code Set A) - ASCII characters 00 to 95 (0-9, A-Z and control
codes), special characters, and FNC 1-4
    128B (Code Set B) - ASCII characters 32 to 127 (0-9, A-Z, a-z), special
characters, and FNC 1-4
    128C (Code Set C) - 00-99 (encodes each two digits with one code) and
FNC1


NB: I found PERL implementation
http://search.cpan.org/~wrw/Barcode-Code128-2.01/lib/Barcode/Code128.pm but
I am looking for a PHP one.

Thanks in advance for your help.

--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/How-can-we-choose-the-charset-for-Zend-Barcode-Object-Code128-tp4112361p4112361.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to