Discussion:
[iText-questions] Datamatrix DM_Extension FNC1 variable length GS1 element
luc1291
2016-04-14 13:18:08 UTC
Permalink
Hi
Im using the Option DM_EXTENSION for GS1 (Code 128 based) 2D Datamatrix
Barcodes. That works perfectly as long as I am only using not more then one
GS1 element of variable length. Just placed the variable length element at
the end of the 'text' and all is good.
Im using:
com.itextpdf.text.pdf.BarcodeDatamatrix.setOptions(int options)
for setting the DM_EXTENSION
and
com.itextpdf.text.pdf.BarcodeDatamatrix.generate(String text) throws
UnsupportedEncodingException
for generating the code

Working sample:
String text input data:
f.010764016651024611150819100000001422
->
GTIN(01) = 07640166510246
ProdDate(11) = 150819
Charge(10) = 0000001422
Charge is of variable length.

My question. How can I build a barcode with to variable length GS1 elements?
There needs to be a Group Separator tag (according Standard it is FNC1
(ASCII 232)).
How is this done?

It seems all after the . is taken as code and any attempts of placing a
group separator like <FNC1> or ASCII Code 232, etc fails. It is always
interpreted as part of the previous element.

Problem sample, Charge and Serialnumber (S/N) are of variable length:
Input data f.010764016651024611150819100000001422210001782387
-> should be
GTIN(01) = 07640166510246
ProdDate(11) = 150819
Charge(10) = 0000001422
S/N = 0001782387

but barcode reader shows
GTIN(01) = 07640166510246
ProdDate(11) = 150819
Charge(10) = 0000001422210001782387
so S/N and code of it is part of Charge

as mentioned above if I try to place a group separator e.g like this
Input data f.010764016651024611150819100000001422<FNC1>210001782387
->
barcode reader shows
GTIN(01) = 07640166510246
ProdDate(11) = 150819
Charge(10) = 0000001422<FNC1>210001782387
an notes that there is an error in the code

Thanks for any suggestions how to tell the BarcodeDatamatrix.generate that
there is a group separator and not only code (text)



--
View this message in context: http://itext.2136553.n4.nabble.com/Datamatrix-DM-Extension-FNC1-variable-length-GS1-element-tp4661024.html
Sent from the iText mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
iText-questions mailing list
iText-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
luc1291
2016-04-18 13:24:54 UTC
Permalink
Hi
I found a way. Not as nice and handy as I liked but it works.
Anyway, the solution is that the FNC1 group separator code needs to be
placed with unicode
\u001d
this is the information/group separator GS (hex 1d, ascii 29) 'character'







--
View this message in context: http://itext.2136553.n4.nabble.com/Datamatrix-DM-Extension-FNC1-variable-length-GS1-element-tp4661024p4661025.html
Sent from the iText mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
iText-questions mailing list
iText-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
luc1291
2016-12-14 13:15:27 UTC
Permalink
Hi gopinethi

sample:
you need the code for eg.
(01)07640166510246 (11)150819 (10)0000001422 (21)00176327

the string for the datamatrix.generate(string) needs to contain \u001d for
the <FNC1> separators.
I got the string from an other source and agreed with them that there the
<FNC1> separators are placed with the agreed 'tag' like eg. #FNC1# so the
string looks like this:
f.010764016651024611150819100000001422#FNC1#2100176327
this (or multiple) #FNC1# is now simply replace (with java string.replace)
with \u001d eg:
newstring = inputstring.replace("#FNC1#", "\u001d")
then
datamatrix.generate(newstring)
this will now generate the correct code

hope that helps





--
View this message in context: http://itext.2136553.n4.nabble.com/Datamatrix-DM-Extension-FNC1-variable-length-GS1-element-tp4661024p4661116.html
Sent from the iText mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
iText-questions mailing list
iText-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Loading...