Page 1 of 1

tcpdf code 128 barcode shift b to c

Posted: Sat Aug 24, 2013 3:59 pm
by shabbirkhandwala
Possible to switch from 128-B to 128-C?

%0501234501011234567890101043

Subset Usage :- It appears that the Subset utilization is currently incorrect. The subset change to Subset C is currently 1 character too early.

Currently :- %003254715501999000015101276

Should be :- %003254715501999000015101276

KINDLY CAN ANY ONE LET ME KNOW HOW CAN I MAKE SECOND DIGIT SUBSET B AND AFTER THAT ALL DIGIT TO SUBSET C.

below is my code

$style['position'] = 'C';
$this->pdf->write1DBarcode($code, 'C128', $x,$y, '', 30, 5, $style, 'Y');
I shall be very thank if someone can help me in that case because i have already passed my deadline and I am in deep trouble.

Thanks

Re: tcpdf code 128 barcode shift b to c

Posted: Sat Aug 24, 2013 6:42 pm
by requinix
Those two strings are identical.

You're going to have to give us more information than that. A lot more.

Re: tcpdf code 128 barcode shift b to c

Posted: Sat Aug 24, 2013 7:26 pm
by shabbirkhandwala
Hi Requinix,

Thanks for your reply.

Actually, I want to make first two character in below string as a subset code128b and rest of them as code128c.

Currently :- %003254715501999000015101276

Should be :- %003254715501999000015101276

I need '%0' as code128b and '03254715501999000015101276' as code128c

Thanks

Regards

Shabbir

Re: tcpdf code 128 barcode shift b to c

Posted: Sun Aug 25, 2013 11:37 am
by Christopher
It is not clear to me what you want to do, but you might try substr() if you want from character position 2 to the end of the string.

Re: tcpdf code 128 barcode shift b to c

Posted: Sun Aug 25, 2013 6:53 pm
by shabbirkhandwala
Dear Sir,

Actually I am using a TCPDF Library to create barcode with code128.

I would like to know how can I create barcode with code128b and than shift to subset C.

%003254715501999000015101276

So, in the above string we need first two character as a subset code128 b and than after it should be code 128 C.

%003254715501999000015101276
BBCCCCCCCCCCCCCCCCCCCCCCC

Regards

Shabbir

Re: tcpdf code 128 barcode shift b to c

Posted: Mon Aug 26, 2013 3:20 pm
by requinix

Code: Select all

%003254715501999000015101276 (currently)
%003254715501999000015101276 (should be)
Those are the exact same thing.

Re: tcpdf code 128 barcode shift b to c

Posted: Mon Aug 26, 2013 4:41 pm
by Christopher
shabbirkhandwala wrote:Dear Sir,

Actually I am using a TCPDF Library to create barcode with code128.

I would like to know how can I create barcode with code128b and than shift to subset C.

%003254715501999000015101276

So, in the above string we need first two character as a subset code128 b and than after it should be code 128 C.

%003254715501999000015101276
BBCCCCCCCCCCCCCCCCCCCCCCC

Regards

Shabbir
I would recommend asking this type of question in a barcode forum. It is too specific for this coding forum. My understanding of Barcode is that you would need to put a Code B at the beginning and the after the first two characters insert a Code C to switch character sets.

If you cannot find help elsewhere, then requinix and I can probably help figure out how to do this (by learning a little about Code128 barcodes ;) )

Re: tcpdf code 128 barcode shift b to c

Posted: Tue Aug 27, 2013 6:05 am
by shabbirkhandwala
Dear Sir,

Thanks for your kind reply.

Yes, You are right in regarding below phrase that you put in your last reply'
"Y'ou would need to put a Code B at the beginning and the after the first two characters insert a Code C to switch character sets."

Actually, I would to create a barcode through PHP but I could not found anywhere any kind of help related code 128 B to C switching via PHP.

Kindly can you help in this matter.

I will really appreciate you if you will take me out from this problem.

Thanks

Shabbir

Re: tcpdf code 128 barcode shift b to c

Posted: Tue Aug 27, 2013 9:48 pm
by Christopher
There are a number of PHP barcode classes: https://www.google.com/search?q=php%20b ... %20code128

This barcode site has a PHP class: http://barcode-coder.com/en/barcode-php-class-203.html

Most seem to support the A/B/C character sets.

If you want to get your own code to work, post the code you have now. We can work on that.

Re: tcpdf code 128 barcode shift b to c

Posted: Wed Aug 28, 2013 7:29 pm
by shabbirkhandwala
Hi Christopher,
Thanks for your reply.

I am using tcpdf library with function write1dbarcode. below is my code.

$code=%003254715501999000015101276
$style['position'] = 'C';
$this->pdf->write1DBarcode($code, 'C128', $x,$y, '', 30, 5, $style, 'Y');

The above is generating a barcode with code 128 but i would like to use above function with switching

When I am passing that string to the function it is generating a barcode as

Currenty %003254715501999000015101276
BCCCCCCCCCCCCCCCCCCCCCCCC

Should %003254715501999000015101276
BBCCCCCCCCCCCCCCCCCCCCCCC

Thanks for your help.

Regards

Shabbir

Re: tcpdf code 128 barcode shift b to c

Posted: Wed Aug 28, 2013 11:11 pm
by Christopher
The problem looks like it is inside the tcpdf library. I think you may need to try a different barcode library. See my links above.

Re: tcpdf code 128 barcode shift b to c

Posted: Thu Aug 29, 2013 1:06 pm
by shabbirkhandwala
Hi Christopher,

Thanks for your reply.

Kindly can you provide me the code and also the library than can help me in switching the code 128 b to c functionality.

thanks

Shabbir

Re: tcpdf code 128 barcode shift b to c

Posted: Thu Aug 29, 2013 2:41 pm
by Christopher
See my links above. I have not tried any of them, but you should be able to download and quickly test them with your barcode code. All use code similar to what you showed above.