Print the UPC-A Barcode on the ZEBRA S4M printer

Hi,
We are using ZEBRA S4M printer and we have to print UPC-A Barcode from the smartform.
There is not Barcode character defined to it. How to print the barcode without barcode character format on the label.
Rest all the fields of the label are printing correctly on the label.

Hi Gnana,
Thanks for your reply.
Currently there is no font defined in our SAP system which supports UPC-A barcode format.
To defne new barcode in SE73, it requires to implement the necessary steps like
1. having the necessary dll files - which may be supplied by any third party vendor.
2. And the required device types.
If the the above information is available, the new barcode can be created in SAP.
But i dont have sufficient information whether the above approach has to be followed, as UPC-A is the Universal Product Code and needs to be printed to the confirmed guidelines.
I also know that EAN13 is the superset of UPC-A and EAN13 barcode is supported by SAP ECC6.0. I tried to print using EAN13 but the values that i read using barcode reader didnot match the with values that i provide.
EAN13 is 13 character barcode whereas UPC-A supports only 12 character.
Please suggest if any suitable solution.

Similar Messages

  • UPC-A barcode without the human readable numbers underneath

    Hello ,
    I have a lifecycle designer 8.1 on windows 7 machine, my requirement is to place the UPC-A barcode without the human readable number underneath the bars and with the interspacing between the bars as 0.020.
    Is the above requirement feasible and possible, please provide your inputs .
    Thanks in advance.
    Pooja

    Hi Pooja, I've done a barcode project before so here's what I know about this topic.
    First about the human readable text. This is mandatory according to the GS1 General Specification, so most UPC-A barcode generator tend to automatically add the text to create valid barcode image. If you really need to get rid of it, you might need to process the barcode image further after it have been created. I used this UPC-A creator, if you like you can check it out.
    As for the interspacing between the bars, each symbol character consists of two bars and two spaces, each of 1, 2, 3 or 4 modules in width. In other words, find any UPC-A barcode, and you will see it's composed of bars and spaces with four different widths. Most barcode generator can allow you to adjust module width, i.e. the narrowest bar / space. So you can't set each space to 0.020, as they are not equal to each other in the beginning.
    Hope this will help. If you there's anything more you need to know, I'd be glad to help.
    Regards,
    Catherine

  • Using the USPS Postnet barcode on the SAP B1 Invoice

    Does anyone have experience integrating the USPS Postnet barcode on an invoice document within B1?

    I do not know what you mean when you ask if I already have the certification. What certification are you referring to?
    My goal is to print the USPS Postnet barcode on the invoice just below the address. This bar code will appear along with the address in a window envelope.
    This then allows the sender a reduced postal rate for using the bar code and presorting the outgoing mail.
    Ray

  • UPC-A Barcode without human readable numbers underneath

    Hello ,
    I have a lifecycle designer 8.1 on windows 7 machine, my requirement is to place the UPC-A barcode without the human readable number underneath the bars and with the interspacing between the bars as 0.020.
    Is the above requirement feasible and possible, please provide your inputs .
    Thanks in advance.
    Pooja

    Hi Pooja, I've done a barcode project before so here's what I know about this topic.
    First about the human readable text. This is mandatory according to the GS1 General Specification, so most UPC-A barcode generator tend to automatically add the text to create valid barcode image. If you really need to get rid of it, you might need to process the barcode image further after it have been created. I used this UPC-A creator, if you like you can check it out.
    As for the interspacing between the bars, each symbol character consists of two bars and two spaces, each of 1, 2, 3 or 4 modules in width. In other words, find any UPC-A barcode, and you will see it's composed of bars and spaces with four different widths. Most barcode generator can allow you to adjust module width, i.e. the narrowest bar / space. So you can't set each space to 0.020, as they are not equal to each other in the beginning.
    Hope this will help. If you there's anything more you need to know, I'd be glad to help.
    Regards,
    Catherine

  • Device type to be used for Zebra 220XiIII Printer

    Hello All,
    We are printing labels from SAP to the printer Zebra 220XiIII Printer using Adobe Print forms technology. When configuring the printer, we used the device type as PDF1. The print was fine in terms of data display and positioning of the text and barcodes but the issue is that it takes 30secs. to print each label. This was not acceptable as it is creating delays in Shipment.
    To address the issue we changed the device type to LZEB3. The print was fast i.e., in 20 seconds the printer was able to print 5 labels but the font on the label is increased automatically because of which the data on the label is truncated.
    Does any one have any ideas on what is the device type to be used and is there any specific font to be used?
    Please note that we desinged the forms using ADOBE FORMS TECHNOLOGY. There are many notes in Service market place which are specific to Smart forms. Please come up with your ideas.
    Regards,
    Praveen T

    Hi Florian,
    Thank you for your response. We were able to fix the issue by changing the Device type to LZEB2.
    For some reason YZB200, YZB300 and other device types which we found in the device type wizard did not work in our case. We did not investigate the reason as LZEB2 worked and we have time crunch
    Regards,
    Praveen T

  • SmartForms printing  on ZEBRA S4M doesn't work!

    I heard that we can use SmartForms to design label. We would prefer to use SmartForms instead of Bar-One if possible.
    I've read the following OSS notes very carefully :
    750772 - Information on the ZPL-2 printer driver for SF
    750002 - SmartForms: Support Zebra label printer (ZPL2)
    We are using Zebra S4M printer.
    Basis installed the Zebra S4M driver. I did a print configuration test and it works well, so I suppose the printer has been installed correctly.
    SAP installation info
    SAP_BASIS     620     0058     SAPKB62058
    SAP_ABA             620     0058     SAPKA62058
    SAP_APPL     470     0026     SAPKH47026
    Kernel release: 640
    Patch level: 109
    According to the OSS notes, our system should be capable to work.
    1. I create the device type ZLZEB2 using program RSTXSCRP.
    This create the device type with the following parameters:
    Version: 3
    Driver: LZPL Zebra Programming Language 2
    Printer driver: Do not use printer driver for ABAP list...
    Argument: R203
    Character set: 1162 Printer LB_ZEB IBM 850(internal fonts)
    2. I create an output device ZEBRA_S4M with parameters:
    Device Type: ZLZEB2 Zebra label printer 203dpi
    Device Class: Standard printer
    Host Spool Access Method: C
    Host printer:
    svr25node2prd.jacob.grpPrinter-EtiquetteTI
    Host Name: svr20dev
    3. I create a SmartStyle.
    In the Header Data section, I put the font Helve 12 and I create one paragraph with a left-alignment, very simple.
    4. I create a SmartForm
    Page Format: LETTER
    Style: SmartStyle created in step 3
    Then I create a secondary window with one text where
    I wrote "Test on Zebra S4M"
    Also, in the main window, I change the left margin and upper margin to 0.
    5. Printing
    After activating the SmartForm & SmartStyle
    From SmartForm, F8-F8-F8 then I choose my output device, check print immediatly but nothing comes out???
    Does anybody no why? or could help me??
    Thanks!
    Message was edited by: Alexandre Giguère

    Hi Alexander,
    I have a question. I have designed my smartform with a style which is a label. I am able to get the data from the application program.  I should print it on a zebra printer. I can see the print preview too.
    When I give a print in the spool requests it shows me <b>Completed</b>.
    In the printer it is not printing . should I go for ZPL language and do that or is there any other way...
    Please help me out..
    with regards,
    chaithanya.

  • How to print three different Barcodes in the same line

    I am trying to print Barcodes for three different fields in a single line, it is taking the combined one & printing only one barcode for  all those three fields.
       When I tested it by printing them in diff lines, it is working fine. But the requirement is to  print all fields in the same line

    Hi
    Look at this , may be useful
    To Create a Bar code prefix:
    1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
    2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
    Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
    The place where you are using the field value use like this
    <C1> &itab-field& </C1>.
    You will get the field value in the form of barcode.
    Which barcode printer are you using ? Can you download this file and see.
    http://www.servopack.de/Files/HB/ZPLcommands.pdf.
    It will give an idea about barcode commands.
    Check this link:
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
    Hope this link ll be useful..
    http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
    go through these links and cose u r previous threads,
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    smartform - barcode
    http://www.erpgenie.com/abap/smartforms.htm
    http://sap.ittoolbox.com/groups/technical-functional/sap-basis/print-barcode-with-smartform-634396
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/printing-barcode-733550
    Detailed information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How do we enable cutter option in the SAP Script for Zebra Label Printer

    Hi Gurus,
    We use Zebra Label(ZM400) printers to print the material documents(SAP Script). Could someone please tell me how do we enable the cutter option in the Zebra printer for the SAP Script?
    Your vaulable answers will be highly appreciated.
    Thanks in advance.
    Regards,
    Manoj.

    Hi Manoj,
         In Script you dont want to add any logic for Label Cutter, It should be in the Zebra printer settings if the printing is over it should cut the paper. If the print area is predefined for your material label then you can make use of standard label papers (Like 2"x4", 3"x4"....)
    Regards
    GK.

  • How can send to the print Queue in Ring Barcode printer using jsp?

    Any one help me Please
    I Tried it in Servlets But i wont detect the printer......
    My Coding in Servlet.....
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.lang.*;
    import java.security.*;
    import java.awt.*;
    import java.awt.print.*;
    public class BarCodeServlet2 extends HttpServlet implements Printable, Servlet
    // The following function is a placeholder for control initialization.
    // You should call this function from a constructor or initialization function.
    public void vcInit() {
    //{{INIT_CONTROLS
    // Our barcode string //
    String s="FMT(1,576d,414d,0,0,1)\n" +
    "DMD(1)\nDPD(1)\nACL()\nCOL(0)\nFAG(2)\nCFL(1,420d,376d,8,2,2)\nCFL(2,416d,352d,8,2,2)\n" +
    "CFL(2,416d,352d,8,2,2)\nLIN(3,0d,330d,529d,330d,1,3)\nCFL(4,504d,280d,6,1,1)\nCFL(5,504d,233d,6,1,1)\n" +               
    "CFL(6,504d,327d,6,1,1)\nCFL(7,504d,185d,6,1,1)\nCFL(8,504d,138d,6,1,1)\nCFL(9,339d,116d,8,2,2)\n" +
    "BDN(2,4)\nBFL(10,458d,94d,0,28,59d)\nCFL(11,435d,24d,6,1,1)\nCFL(12,413d,406d,2,1,1)\n" +
    "DAT(1,[email protected])\nDAT(2,[email protected])\nDAT(3,LIN)\n" +
    "DAT(4,COLOUR :RED)\nDAT(5,SIZE   :S28)\nDAT(6,NAME   :ST0060)\n" +
    "DAT(7,STYLE  :HALF SLEEVES)\nDAT(8,PRICE  :600)\n" +
    "DAT(9,:(Incl of all Taxes//))\nDAT(10,/6ST1D003J-134N)\nDAT(11,ST1D003J-134N)\n" +
    "DAT(12,BLAZE APPARELS-INDIA)\nPRT(1,0,1)";
    public static int count=0;
    public void service(HttpServletRequest req, HttpServletResponse res)
    throws ServletException,IOException
    PrintWriter out = res.getWriter();
    res.setContentType("text/html");
    out.println("<html><head><title>My Servlet!</title></head>");
    out.println("<body><h1>Hello Test ,updated!"+ s + "</h1></body></html>");
    PrinterJob job=PrinterJob.getPrinterJob();
    JobAttributes ja = new JobAttributes();
    // Make sure the print dialog box doesn't open because were in a Servlet//
    ja.setDialog(JobAttributes.DialogType.NONE);
    // Get the page format /.
    PageFormat page = job.defaultPage();
    // Get the paper object //
    Paper paper =page.getPaper();
    // Make the whole page imageable ..
    paper.setImageableArea(0,0,page.getHeight(),page.getWidth());
    page.setPaper(paper);
    job.defaultPage(page);
    job.setPrintable(this,page);
    try{
    // Print //
    job.print();
    }catch(Exception e)
    out.println("Exception caught");
    out.println(e.getMessage()+ "Exception caught");
    out.flush();
    public int print(Graphics g, PageFormat f, int pageIndex)
    if(pageIndex >0)
    return NO_SUCH_PAGE;
    //g.drawString(s,0,9 );
    g.drawString(s,0,32 );
    return PAGE_EXISTS;
    //{{DECLARE_CONTROLS
    }

    FileOutputStream printOut = new
    = new FileOutputStream("Samsung ML-1450 Series on
    JPRASAD");If that is supposed to be the name of the printer, I am afraid that is not the way it is done. As much as I could help you, I would suggest you to take a look at the API docs and check the classes under the javax.print package.

  • How to Print Fields that are Centered on the Label

    Labview 6.1 - Which VI do I call or Attribute do I set to make a String Field "Centered" on its Row on a Zebra Label? I need to specify the String Data, the Font Size and Centered about Position. One Centered field per Row (3 Rows). I am using the NewReport.vi, SetReportOrientation.vi, SetReportFont.vi AppendReportText,vi, PrintReport.vi and DisposeReport.vi

    LabVIEW does support the windows printer driver, I was thrown off by the fact that you said "zebra label." We have a report generation toolkit that will allow you to create more advanced reports and can programatically control microsoft word and excel to create as complex of a document as you desire.
    Our basic report generation toolkit that ships with LabVIEW supports simple reports and layouts. It also allows for HTML reports. You can then append any HTML formatting to the report that you desire (such as the center tag).
    You could also continue to use the standard report by appending spaces to the string you are printing. For example, if you know that your printer is 80 characters wide (using a fixed width font), you can take the size of the string "len" and append (80-len)/2 number of spaces to the string. If you need help doing this, let me know.
    We actually implimented a barcode label printing VI that printed an entire front panel. We created a VI that had an array of controls and we formatted the controls to our desire (one was a centered string). We then used the "print panel vi" in the block diagram. That we we simply wired the inputs to the VI and it printed the front panel to the printer onto the labels (we use this on our large shipments that have more than one item).
    The ActiveX examples that ship with LabVIEW and on our website are very good starting points for creating word reports, but if you are going to use LabVIEW to manipulate Microsoft Word and Excel, I really suggest getting our Report Generation Toolkit for Microsoft Office. The RGT (Report Generation Toolkit) contains a complete set of easy to use VIs to programmatically create and edit Word and Excel documents. The Microsoft Office ActiveX interface is huge, and it is often times hard to find good complete documentation on how to perform certain tasks. The RGT VIs hide all of the ActiveX complexity and really simplify the tasks, but as a developer I really appreciate the fact that the VIs contain all of the ActiveX code on the block diagram so that I can look at them as examples and modify them to my desire. You can find out more about the RGT from ni.com, click on Products, LabVIEW, LabVIEW Addons, LabVIEW Toolsets, LabVIEW Report Generation Toolkit.
    I hope some this gives you an idea you can run with.

  • Problem with printing barcodes to a Zebra printer via Smartform

    Hi
    I am trying to create a printed label from smartforms, being directed to a zebra printer.  The label must include a barcode.
    Via oss notes 750002 and 750772 I have imported the LZEB2 device type.
    In SE73 I have created a system bar code on the new technology.
    In the smart form style, I create a character type with this barcode font.
    The barcode prints okay and can be read when it has up to 10 characters.
    However we need a long bar code of appoximately 22 characters.
    I can find no supported barcode type which will let me write a barcode of this length
    The max length in the smartform style for the barcode format is always coming up as 50mm which is too short.
    I have tried with using a printer bar code prefix and suffix with the native zebra ZPI-II commands, attaching to command nodes on either side of the text node in the smart form,  But this does not seem to work.
    Any advice ?
    Thanks

    sounds like the variable containing the barcode data is too short...is it at least 22 characters long?

  • Unable to print barcode in smart forms in zebra 420 printer.

    Hi,
    Can anyone please help me out with the following issue.
    1. I am unable to print the barcode using a zebra barcode printer from SAP. I use C128A format.
    2. But this issue doesn't come when I print the same form using a Laser printer. The scanner also detects the same correctly.
    3. The same barcode printer prints  my earlier forms with the same settings correctly.
    May I please know where the issue exactly is?
    Regards,
    Krishna

    Hi,
    Please check the size of the barcode in the styles and check ur printer settings.
    The paper layout of the printer also needs to be checked.
    Regards,
    Krishna

  • Issue with display of Barcode in the report output from different Machines

    Hi ,
    I have developed a BI Publisher report to print barcode on the output.
    I have configured the necessary setup in XML Publisher Responsibility
    by following the steps
    1) Home --> Administration
    a)     Create Font Files
    Uploaded the ttf file
    2. Create Font Mapping Set
    "Special Fonts"
    3.Created font Mapping under the Mapping set of type "Special Fonts"
    4.Provided the Value of Font Mapping Set to ‘FO Processing ‘ under Configuration
    Font Mapping Set : Special Fonts
    The above configuration works fine and I am able to view the Barcode in the output.
    Issue : When I try to run the same concurrent porgram from a different PC ,and if I view the output, I am not able to see the barcode.
    Please let me know if anyone has faced issue of such kind.
    I guess the above cannot be system specific and please let me know where it is going wrong.
    Thanks,
    Seshu

    Hello again
    I have the font file and I already put it into C:/Windows/Font folder. I just don't have the option to "Create Font Files".
    I try to use this code in a xdo.cfg file:
    <config version="1.0.0" xmlns="http://xmlns.oracle.com/oxp/config/">
    <fonts>
    <font family="Free 3 of 9 Extended" style="normal" weight="normal">
    <truetype path="FRE3OF9X.ttf"/>
    </font>
    </fonts>
    </config>
    but i just can't make the bar code appear in PDF.
    Thanks a lot
    Edited by: pedropereira on 22/Fev/2012 12:51
    Edited by: pedropereira on 22/Fev/2012 12:57

  • I cannot remove embedded barcode from the image. Due to saving compression.

    Hi guys,
    I recreate a thread to prevent confusing on my previous one. Please only reply to this thread thanks.
    Ok, for a start I will give some general description about the application I made.
    I had some problem with the image being compressed while it is saved.
    Because saving an image will cause it to compress and had its pixel valued changed, I could not successfully remove the bardcode that is embedded inside a image(although some of the pixel value will be returned to original normally). I had placed my code below and will accept any opinion that will help me solve the removal of barcode problem.
    What my application does is actually very simple. It will take the pixel value of the area inside the image that will be embed with the barcode first, then it will take the pixel value of the barcode and use the formula (1-alpha * Image pixel value) + (alpha * barcode pixel value) = new pixel value which will contain the barcode that had been embedded inside. The formula works great but when I saved the image the pixel value will change due to compression. On the removal of barcode my application will read every pixel value from the image embedded with barcode (only the area with barcode embedded), then it will go on to read every pixel value of the barcode used for embedding and then use the formula (Embedded image pixel value - (alpha * Barcode pixel value) - (1 - alpha) = original pixel value. But due to the reason that compression will change some of the pixel inside the saved image to drop in its value, the result from the removal formula will be negative and hence caused my result image to become wierd as it will red colors instead of original color on some of its pixel. I tried saving under PNG format which people said to be lossless compression but the result is still the same.
    So I need to ask you guys for opinion or help me find the part where I actually did wrongly and caused the image pixel value to change.
    Thanks. Please proceed and read below for the codes that I used. It is messy and I will sort it out later.
    When alpha is set as 1 the barcode will appear to be overwrite onto the image. But when alpha is set as 0.1 the barcode will appear to be transparent and almost seems to be not there on the image when embedded.
    This is the code I used to retrieve image pixel when embedding:
    public static int[] getImagePixelValue(BufferedImage image, int x, int y){
              //Create an array to store image RGB value
              int[] imageRGB = new int[3];
              //Get height and width from input image
              int imageWidth = image.getWidth();
              int imageHeight = image.getHeight();
              //Get raw RGB value from image
              int imageValue = image.getRGB(x, y);
              //Convert image raw RGB value
              int imageRed = ((image.getRGB(x, y) >> 16) & 0xff);
              int imageGreen = ((image.getRGB(x, y) >> 8) & 0xff);
              int imageBlue = image.getRGB(x, y) & 0xff;
              //Input the converted RGB value into the array
              imageRGB[0] = imageRed;
              imageRGB[1] = imageGreen;
              imageRGB[2] = imageBlue;
              /*//Print out the pixel value to check
              System.out.println("Image red pixel: "+imageRGB[0]);
              System.out.println("Image green pixel: "+imageRGB[1]);
              System.out.println("Image blue pixel: "+imageRGB[2]);*/
              //Return image RGB value
              return imageRGB;
    }This is the code I used to retrieve barcode pixel for embedding:
    public static int[] getWatermarkPixelValue(BufferedImage watermark, int x, int y){
              //Create an array to store watermark RGB value
              int[] watermarkRGB = new int[3];
              //Get height and width from input watermark
              int watermarkWidth = watermark.getWidth();
              int watermarkHeight = watermark.getHeight();
              int watermarkValue = watermark.getRGB(x, y);
              //Convert watermark raw RGB value
              int watermarkRed = ((watermark.getRGB(x, y) >> 16) & 0xff);
              int watermarkGreen = ((watermark.getRGB(x, y) >> 8) & 0xff);
              int watermarkBlue = watermark.getRGB(x, y) & 0xff;
              //Input the converted RGB value into the array
              watermarkRGB[0] = watermarkRed;
              watermarkRGB[1] = watermarkGreen;
              watermarkRGB[2] = watermarkBlue;
              /*//Print out the pixel value to check
              System.out.println("Watermark red pixel: "+watermarkRGB[0]);
              System.out.println("Watermark green pixel: "+watermarkRGB[1]);
              System.out.println("Watermark blue pixel: "+watermarkRGB[2]);*/
              //Return watermark RGB value
              return watermarkRGB;
         }This is the code I used for merging the image pixel and barcode pixel to get the embedded pixel value:
    public static int[] getEmbeddedPixelValue(int[] imagePixelValue, int[] watermarkPixelValue, double alpha){
              //Create a object to hold embedded pixel value
              int[] embeddedRGBValue = new int[3];
              //Change image pixel value into double calculating equation
              double imgRedValue = (double) imagePixelValue[0];
              double imgGreenValue = (double) imagePixelValue[1];
              double imgBlueValue = (double) imagePixelValue[2];
              //Change watermark pixel value into double calculating equation
              double wmRedValue = (double) watermarkPixelValue[0];
              double wmGreenValue = (double) watermarkPixelValue[1];
              double wmBlueValue = (double) watermarkPixelValue[2];
              //Equation for embedding image and watermark together
              double embeddedRed = ((1.0 - alpha) * imgRedValue) + (alpha * wmRedValue);
              double embeddedGreen = ((1.0 - alpha) * imgGreenValue) + (alpha * wmGreenValue);
              double embeddedBlue = ((1.0 - alpha) * imgBlueValue) + (alpha * wmBlueValue);
              //Changing embedded value from double to int
              int embeddedRedValue = (int) embeddedRed;
              int embeddedGreenValue = (int) embeddedGreen;
              int embeddedBlueValue = (int) embeddedBlue;
              //input the embedded RGB value into the array
              embeddedRGBValue[0] = embeddedRedValue;
              embeddedRGBValue[1] = embeddedGreenValue;
              embeddedRGBValue[2] = embeddedBlueValue;
              //Return embedded pixel value
              return embeddedRGBValue;
         }This is the code where I used for the embedding process:
    else if(target == embedButton){
                   String xCoordinate = JOptionPane.showInputDialog(embedButton, "Enter coordinate X", "When you want to embed the watermark?", JOptionPane.QUESTION_MESSAGE);
                   String yCoordinate = JOptionPane.showInputDialog(embedButton, "Enter coordinate Y", "When you want to embed the watermark?", JOptionPane.QUESTION_MESSAGE);
                   int xValue = Integer.parseInt(xCoordinate);
                   int yValue = Integer.parseInt(yCoordinate);
                   int wCounter = 0;
                   int hCounter = 0;
                   //Create file object to be used in embedding and removing watermark
                   File inputImage = new File(imagePath);
                   File inputWatermark = new File(watermarkPath);
                   //Convert string into double for calculation of embedded pixel value
                   try {
                        alphaDouble = Double.valueOf(alphaValue).doubleValue();
                   catch (NumberFormatException nfe) {
                        System.out.println("NumberFormatException: " + nfe.getMessage());
                   try{
                        //Define selected image as testPic and make java read the file selected
                        BufferedImage image= ImageIO.read(inputImage);
                        BufferedImage watermark= ImageIO.read(inputWatermark);
                        BufferedImage testing;
                        //Get height and width value from the selected image
                        int imageWidth = image.getWidth();
                        int imageHeight = image.getHeight();
                        //Get height and width value from the selected barcode
                        int watermarkWidth = watermark.getWidth();
                        int watermarkHeight = watermark.getHeight();
                        int totalWidth = watermarkWidth + xValue;
                        int totalHeight = watermarkHeight + yValue;
                        //Use nested for loop to get RGB value from every pixel that the barcode will be embedded in the selected image
                        if(totalWidth <= imageWidth && totalHeight <= imageHeight){
                             for (int h = yValue ; h < totalHeight; h++){
                                  for (int w = xValue; w < totalWidth; w++){
                                       int[] imagePixelValue = getImagePixelValue(image, w, h);
                                       int[] watermarkPixelValue = getWatermarkPixelValue(watermark, wCounter, hCounter);
                                       int[] embeddedPixelRGBValue = getEmbeddedPixelValue(imagePixelValue, watermarkPixelValue, alphaDouble);
                                       setRed(image, w, h, embeddedPixelRGBValue[0]);
                                       setGreen(image, w, h, embeddedPixelRGBValue[1]);
                                       setBlue(image, w, h, embeddedPixelRGBValue[2]);
                                       wCounter++;
                                       if(wCounter == watermarkWidth){
                                            wCounter = 0;
                                            hCounter++;
                        else{
                             JOptionPane.showMessageDialog(embedButton, "The watermark cannot be embedded at the coordinates.");
                        tempImage = image;
                        imageIcon = new ImageIcon(tempImage);
                        labelImage.setIcon(imageIcon);
                        imagePanel.add(labelImage);
                        container.add(imagePanel, BorderLayout.CENTER);
                        setVisible(true);
                        System.out.println("Embedding completed");
                   catch(Exception errorEmbedding){
                        //If there is any error, the try and catch function will tell you the error
                        System.out.println("The following error occured: "+errorEmbedding);
              }This is the code I use to save the image that had been embedded with the barcode:
    else if(target == saveAction){
                   JFileChooser chooser = new JFileChooser();
                   FileNameExtensionFilter filter = new FileNameExtensionFilter("JPG & GIF Images", "jpg", "gif");
                   chooser.setFileFilter(filter);
                   chooser.setCurrentDirectory(new File("."));
                   int returnVal = chooser.showSaveDialog(getParent());
                   if(returnVal == JFileChooser.APPROVE_OPTION) {
                        String name = chooser.getSelectedFile().getAbsolutePath();
                        //Create a string instant to hold outputImage path name
                        String saveFile = chooser.getSelectedFile().getName()+"."+fileType;
                        //Create file output to decide what name will be used to save the file
                        File outputImage = new File(saveFile);
                        try{
                             //Save the file with the name used
                             ImageIO.write((RenderedImage) tempImage,fileType,outputImage);
                        catch(Exception errorSaving){
                             //If there is any error, the try and catch function will tell you the error
                             System.out.println("The following error occured: "+errorSaving);
                   else{
              }This is the code I used for removal process of barcode:
    else if(target == removeButton){
                   //Create file object to be used in embedding and removing watermark
                   File inputImage = new File("removalTesting.jpg");
                   //File inputWatermark = new File(watermarkPath);
                   //Used a defined barcode for testing of removing barcode from embedded image
                   File inputWatermark = new File("barcode.jpg");
                   /*//Convert string into double for calculation of embedded pixel value
                   try {
                        alphaDouble = Double.valueOf(alphaValue).doubleValue();
                   catch (NumberFormatException nfe) {
                        System.out.println("NumberFormatException: " + nfe.getMessage());
                   //Used a defined alpha value for testing of removing barcode from embedded image
                   //alphaDouble = 0.5;
                   //Create x and y value for the starting coordinates of barcode embedded in the embedded image
                   int xValue = 0;
                   int yValue = 0;
                   int wCounter = 0;
                   int hCounter = 0;
                   try{
                        //Define selected image as testPic and make java read the file selected
                        BufferedImage image= ImageIO.read(inputImage);
                        BufferedImage watermark= ImageIO.read(inputWatermark);
                        //Get height and width value from the selected image
                        int imageWidth = image.getWidth();
                        int imageHeight = image.getHeight();
                        //Get height and width value from the selected barcode
                        int watermarkWidth = watermark.getWidth();
                        int watermarkHeight = watermark.getHeight();
                        int totalWidth = watermarkWidth + xValue;
                        int totalHeight = watermarkHeight + yValue;
                        //Use nested for loop to get RGB value from every pixel that the barcode had been embedded in the embedded image
                        if(totalWidth <= imageWidth && totalHeight <= imageHeight){
                             for (int h = yValue ; h < totalHeight; h++){
                                  for (int w = xValue; w < totalWidth; w++){
                                       int[] imagePixelValue = getImagePixelValue(image, w, h);
                                       int[] watermarkPixelValue = getWatermarkPixelValue(watermark, wCounter, hCounter);
                                       int[] removedPixelRGBValue = getOriginalImagePixelValue(imagePixelValue, watermarkPixelValue, alphaDouble);
                                       setRed(image, w, h, removedPixelRGBValue[0]);
                                       setGreen(image, w, h, removedPixelRGBValue[1]);
                                       setBlue(image, w, h, removedPixelRGBValue[2]);
                                       wCounter++;
                                       if(wCounter == watermarkWidth){
                                            wCounter = 0;
                                            hCounter++;
                        tempImage = image;
                        imageIcon = new ImageIcon(tempImage);
                        labelImage.setIcon(imageIcon);
                        imagePanel.add(labelImage);
                        container.add(imagePanel, BorderLayout.CENTER);
                        setVisible(true);
                        System.out.println("Embedding completed");
                   catch(Exception errorEmbedding){
                        //If there is any error, the try and catch function will tell you the error
                        System.out.println("The following error occured: "+errorEmbedding);
              }Sorry if the codes are in a mess, I did not had the time to sort it out yet but most likely do it when I got the removal of barcode done.
    Follow this link to have a look of the result I see in my application when I got the barcode embedded into the image I selected:
    [http://img356.imageshack.us/my.php?image=beforeremovalresultmg2.jpg]
    Follow this link to have a look of the result I see in my application after I got the barcode removed:
    [http://img523.imageshack.us/my.php?image=removalresultmx4.jpg]
    As you can see from the link, after I remove the barcode from the image. Some of the pixel actually went back to normal in the barcode area when the the barcode is embedded into the image. But some pixel in the barcode area had its value changed due to compression when I save the image file I think.
    Anyone can help me find out the problem?
    Thanks.

    KamenRider wrote:
    I suspect the problem lies in the code when I save the image. Because people said that PNG was loseless compression but when I saved in PNG some of the pixel went back to normal while some did not. This is obviously the cause from changing of pixel value when I saved the image.You are almost certainly wrong. This is trivially easy to check. Print out the color of a certain pixel immediately before you save it. Open the saved PNG in your favorite image manipulation program and check the saved value of that same pixel. When you re-load the saved PNG, print out the color again. It should be unchanged.
    Thanks you for trying to help me spot the problem but the formula is correct. The alpha value i used in my application is used to set the transparency of the barcode that will be embedded in the image. Hence, when alpha = 1 the new pixel value should be the barcode value. ^^The formula isn't wrong, it's just not doing what you think it's doing. Remember that you're working with ints here, not floating point numbers, so they have finite precision. When you case from double to int, fractions are dropped. As morgalr pointed out, your formula is:
    (1-alpha * Image pixel value) + (alpha * barcode pixel value) = new pixel value You didn't show us the code for getOriginalImagePixelValue but I imagine it's:
    original pixel value = (new pixel value - alpha * barcode pixel value) / (1 - alpha)On a piece of paper, take alpha = 0.9, image pixel = 17 and barcode pixel = 100. Calculate out what you should get for new pixel value and then calculate what you should get for original pixel value. You will find they don't match.

  • Can I print Bar Code Text autoamatically under the bar code  in smartform.

    Hi All,
    Currently I am printing the Bar Code for MARA-EANNR value .My requirement is to print the MARA-EANNR value under the bar code .Currently I am hardcoding and it is working fine.I want to know is there any possible way I can print the value of MARA-EANNR under the bar code with out hard coding.
    Thnaks,
    Suresh.

    Hi,
    B1 - BARCODE CHARACTER FORMAT
    A1- DEFAULT CHARACTER FORMAT.
    In smart form define a template with two rows,
    in first row u pass barcode value( mat no ) with barcode character fomat.
    <B1>&MATNO&</>
    in second row define  barcode value(mat no ) in ordinary charcter format.
    <A1>&MATNO&</>
    Rgds
    Siva
    Edited by: siva prasad on Sep 1, 2009 1:53 PM

Maybe you are looking for

  • Need to show Previous months data in report

    Hi All, I have a crystal report 2011 which shows monthly Cash data. It has 3 other columns like Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data in report. My report also has two parameters- start date and end da

  • Business Objects Scheduler Jobs Monitoring

    Hi, Is there a management pack available for integration with System Centre (SCOM) such that we can monitor failed scheduled jobs in Business Objects via SCOM? Is there any other way to monitor failed scheduled Business Objects jobs straight from the

  • I am unable to email attachments from mac mail

    I have a new Macbook Air with Moutain Lion.  I am using Mac Mail.  When I first started, i could add only a few attachments but now I cannot add a single one.  This renders Mac Mail almost useless.  I've tried adding/deleting accounts, checked all im

  • VB: Simple Selection

    Hi all, I am just writing my first Photoshop CS2 script in VB that exports all layers to separate files, where the resulting file resolutions are the same as the layer bounds. So far no problem. The way I thought about is - Opening Document - running

  • Nokia 2310

    My son is going to france in the morning does anyone know if the Nokia 2310 will work with an 02 sim from i phone thanks