I need to print bar codes with ofbiz. Can someone point me in the right
direction? Is there an ofbiz consulting company that might be able to help me? I need to know objects to use, services to call, etc. It seems likely that someone has done this already with ofbiz. -- David Shere Information Technology Services Steele Rubber Products www.SteeleRubber.com |
Administrator
|
David,
Edit a product from the catalogue. You see there is "Barcode" link for the product. I guess you will find enough from there. An example link : https://demo.hotwaxmedia.com/catalog/control/ProductBarCode.pdf?productId=WG-9943&productName=Giant%20Widget (needs to connect as admin/ofbiz) Jacques > I need to print bar codes with ofbiz. Can someone point me in the right > direction? Is there an ofbiz consulting company that might be able to > help me? I need to know objects to use, services to call, etc. It > seems likely that someone has done this already with ofbiz. > -- > David Shere > Information Technology Services > Steele Rubber Products > www.SteeleRubber.com |
Administrator
|
In reply to this post by David Shere
David,
Edit a product from the catalogue. You see there is "Barcode" link for the product. I guess you will find enough from there. An example link : https://demo.hotwaxmedia.com/catalog/control/ProductBarCode.pdf?productId=WG-9943&productName=Giant%20Widget (needs to connect as admin/ofbiz) Jacques > I need to print bar codes with ofbiz. Can someone point me in the right > direction? Is there an ofbiz consulting company that might be able to > help me? I need to know objects to use, services to call, etc. It > seems likely that someone has done this already with ofbiz. > -- > David Shere > Information Technology Services > Steele Rubber Products > www.SteeleRubber.com |
In reply to this post by David Shere
There are a few samples around the code base like pick lists and POS
till receipts. A more recent very simple entry can be found when editing a product in the catalogue application, just below the buttons for the different product tabs and the new product image you should see a button labelled "Barcode". Click it and a pdf screen will show you the barcode for that product code. Ray David Shere wrote: > I need to print bar codes with ofbiz. Can someone point me in the > right direction? Is there an ofbiz consulting company that might be > able to help me? I need to know objects to use, services to call, > etc. It seems likely that someone has done this already with ofbiz. |
In reply to this post by David Shere
David Shere wrote:
> I need to print bar codes with ofbiz. Can someone point me in the right > direction? Is there an ofbiz consulting company that might be able to > help me? I need to know objects to use, services to call, etc. It > seems likely that someone has done this already with ofbiz. What I had asked David about was a means to print barcodes on barcode printers using native Zebra EPL/2 control codes to a named print spool, not printing a barcode on a pdf. |||||||| Simple samples of what gets transmitted. https://support.zebra.com/cpws/docs/eltron/common/epl2_samp.htm |||||||| Here is a working code to print to Zebra printer that I found on a website. <quote> Printer name should contain keyword "zebra", printer could be local or on network. public void testZebra() { try { PrintService psZebra = null; String sPrinterName = null; PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null); for (int i = 0; i < services.length; i++) { PrintServiceAttribute attr = services.getAttribute(PrinterName.class); sPrinterName = ((PrinterName)attr).getValue(); if (sPrinterName.toLowerCase().indexOf("zebra") >= 0) { psZebra = services; break; } } if (psZebra == null) { System.out.println("Zebra printer is not found."); return; } System.out.println("Found printer: " + sPrinterName); DocPrintJob job = psZebra.createPrintJob(); //String s = "^XA^FO5,40^BY3^B3,,30^FD123ABC^XZ"; // good String s = "^XA\n^FO5,40^BY3^B3,,\n30^FD123ABC\n^XZ"; // '\n' does not hurt byte[] by = s.getBytes(); DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE; // MIME type = "application/octet-stream", // print data representation class name = "[B" (byte array). Doc doc = new SimpleDoc(by, flavor, null); job.print(doc, null); } catch (PrintException e) { e.printStackTrace(); } } // testZebra() </quote> |||||||| Does any of this ring a bell to anyone? Done anything like this in the past? Could any of this be used with ofBiz? -- Walter |
Administrator
|
AFAIK, There is nothing like that in OFBiz yet. Seems not related to
EPL/2 (did not find any Zebra or EPL/2 in the site) but you may also have a look to : http://barcode4j.krysalis.org/ Jacques ----- Original Message ----- From: "Walter Vaughan" <[hidden email]> To: <[hidden email]> Sent: Wednesday, February 28, 2007 8:07 PM Subject: Re: I need to print bar codes > David Shere wrote: > > > I need to print bar codes with ofbiz. Can someone point me in the right > > direction? Is there an ofbiz consulting company that might be able to > > help me? I need to know objects to use, services to call, etc. It > > seems likely that someone has done this already with ofbiz. > > What I had asked David about was a means to print barcodes on barcode > printers using native Zebra EPL/2 control codes to a named print spool, > not printing a barcode on a pdf. > > |||||||| > Simple samples of what gets transmitted. > https://support.zebra.com/cpws/docs/eltron/common/epl2_samp.htm > > |||||||| > Here is a working code to print to Zebra printer that I found on a website. > <quote> > Printer name should contain keyword "zebra", printer could be local or on network. > > public void testZebra() { > try { > PrintService psZebra = null; > String sPrinterName = null; > PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null); > for (int i = 0; i < services.length; i++) { > PrintServiceAttribute attr = services.getAttribute(PrinterName.class); > sPrinterName = ((PrinterName)attr).getValue(); > if (sPrinterName.toLowerCase().indexOf("zebra") >= 0) { > psZebra = services; > break; > } > } > if (psZebra == null) { > System.out.println("Zebra printer is not found."); > return; > } > System.out.println("Found printer: " + sPrinterName); > DocPrintJob job = psZebra.createPrintJob(); > > //String s = "^XA^FO5,40^BY3^B3,,30^FD123ABC^XZ"; // good > String s = "^XA\n^FO5,40^BY3^B3,,\n30^FD123ABC\n^XZ"; // '\n' does not > byte[] by = s.getBytes(); > DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE; > // MIME type = "application/octet-stream", > // print data representation class name = "[B" (byte array). > Doc doc = new SimpleDoc(by, flavor, null); > job.print(doc, null); > } catch (PrintException e) { > e.printStackTrace(); > } > } // testZebra() > > </quote> > |||||||| > > Does any of this ring a bell to anyone? > Done anything like this in the past? > Could any of this be used with ofBiz? > > -- > Walter > |
Free forum by Nabble | Edit this page |