|
From: Jeremias M. <de...@je...> - 2011-10-15 13:39:25
|
Hi Guillaume, I can't disagree with that statement. :-) Anyway, I've just added the URL support to PDF417 so it works the same way as for DataMatrix. See CVS HEAD. If you need an easy way to produce data URL, have a look at this: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/uri/DataURLUtil.java?view=markup On 15.10.2011 14:25:14 Guillaume Pothier wrote: > Hi, yes I guess it also works, but I think both approaches are still > hacks... I think the correct solution would be to have a new method in > the API that accepts binary data as a byte array. But it seems it > would require quite a lot of work. > Regards, > g > > On 12 October 2011 06:45, Jeremias Maerki <de...@je...> wrote: > > Hi Guillaume > > > > Thanks for your patch! That's interesting but I'd rather not introduce yet > > another mechanism for submitting binary data. DataMatrix already has > > one: binary data encoded using RFC 2397 data URLs as messages. See: > > http://barcode4j.sourceforge.net/2.1/symbol-datamatrix.html#Message+format > > > > I'm sure that can easily be fit into PDF417, too. WDYT? > > > > On 10.10.2011 16:48:59 Guillaume Pothier wrote: > >> Hi, > >> For a project I needed to use a specific text encoding for the message > >> in a pdf417 barcode. The idea is to encode the message with that > >> encoding and then use the byte compaction to store the encoded string. > >> However, adding the ability to pass the message as a byte array looks > >> quite involved, as it means adding new APIs (AFAICT), so I went > >> through another route: I added an "encoding" configuration parameter > >> to the PDF417 bean, and an "encoding" argument to the > >> PDF417LogicImpl.generateBarcodeLogic and > >> PDF417HighLevelEncoder.encodeHighLevel methods. If the encoding is > >> null, the default compaction and encoding are used. If the encoding is > >> not null, the string is encoded and byte compaction is used to > >> represent the message. > >> I attach a preliminary version of the patch, in case somebody finds it > >> useful. I can improve it if requested. > >> Obviously, the ideal solution would be to be able to specify the > >> message as a byte array for the barcodes that support it. > >> > >> Kind regards, > >> g > > > > > > > > > > Jeremias Maerki > > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > Barcode4j-users mailing list > Bar...@li... > https://lists.sourceforge.net/lists/listinfo/barcode4j-users Jeremias Maerki |