How to print a graphical interface

Hi , I need to print a simple user interface in java. Highly appreciate your effort.
Thanks,
Uthpala

I'm assuming you mean that you want to print the contents of a user interface. Your main classes of interest are PrintJob and PrintDialog. Here's a link that might help get you started
http://java.sun.com/products/java-media/2D/forDevelopers/sdk12print.html#pgraphics
I went through some of this a couple of months ago and it wasn't much fun. In Java, the printer looks pretty much like a Graphics2D rendering surface and you can draw to it directly if you wish. There results are just as sharp and attractive as you wish, but it's a fair amount of work to implement appropriate code. While the API isn't spectacular, I think the real problem is just that printing is intrinsically hard.
Supposedly, Java lets you print Swing UI components directly. I could never get this working worth an (expletive deleted).
Also, when you first start testing your printing code, remove all but a few sheets of paper from your printer. If you don't handle the "NO_SUCH_PAGE" logic quite right, it is easy to get into a run-away print job. For that matter, be prepared to use up a lot of paper anyway just tweaking on your output.

Similar Messages

  • How to print the Graphical of WF template to a document?

    Hi All,
      I want to print the Graphical view of the WF template in a Document or a JPG file.
    There is a option to print the Graphics to File. It works fine for Smaller workflows. My workflow is too big with more than 50 - 60 steps.
    How can I do this?
    Thanks,
    Sivagami

    You have to use "Print to File: option only. Even if you have some direct option a single page in your document cannot occupy your whole workflow template.
    When i was preparing my technical documents i used the same option and then had cut the document into seperate viewable pages in MS paint and pasted in different pages.
    Alternatively you could also embedd your JPG as a embedded file in the document but the former method will give better clarity to the reader.
    Thanks,
    Prasath N

  • How to program different graphical interface in a labview

    Hi
     i  adding different graphical inface in labview,by taking tab control in that add menu,go-online, and some function,i did this for touch screen by clicking it go on linking..I attached this i, already did  some partr in labview.I also attached ms_Paper prasentation refference  i doing this,give me the solltion how to link these slides in labview
    Attachments:
    temlate.vi ‏21 KB

    Sham,
    If English is your second language you might want to post on another forum.  I am really not sure what you are trying to do but you are telling us, "give me the sollition how to link these slides in labview"  so I'll attach a community example you may want to look at. 
    https://decibel.ni.com/content/docs/DOC-34150
    Also, if you are going to attach code, please do something in the block diagram.  I have almost no idea what you want to do and opening the VI did not help at all.
    Matt J
    Professional Googler and Kudo Addict
    National Instruments

  • How to print a Proe .drw ( Vector Graphic ) file to a printer.

    I am having a drawing model (proe .drw file). I want to print this file to a .tif file using java.The print driver is "Informatik Image Driver 3.20".
    .Can some one help me out with the steps involved in this.
    I understand .drw file are of type Vector Graphic. How to print it.
    I also have a corresponding postscript file generated from the .drw file. Is there a way to print this post scritp file to the printer mentioned above to create .tif.
    Any quick help will be deeply appreciated.
    The postscript file content as below
    %!PS-Adobe-2.0
    %%BoundingBox: 0 0 1190 841
    %%Creator: Pro/ENGINEER
    %%Title: c:/temp/xx.plt
    %%CreateDate: 18-Mar-10 17:29:28
    %%DocumentFonts: Times-Roman
    %%EndComments
    %%EndProlog
    %%Page: ? 1
    %%BeginPageSetup
    systemdict /setpagedevice known
    <</PageSize[1190 841]>> setpagedevice
    } if
    %%EndPageSetup
    newpath
    %90 rotate 0 -11.6929 72 mul translate
    /m {moveto} def
    /l {lineto} def
    /rm {rmoveto} def
    /rl {rlineto} def
    /slw {setlinewidth} def
    /srgb {setrgbcolor} def
    /sd {setdash} def
    /gs {gsave} def
    /f {fill} def
    /gr {grestore} def
    /s {stroke} def
    /np {newpath} def
    0 setlinecap
    2 setlinejoin
    0 0 0 srgb
    72 72 scale
    s
    [] 0 sd
    s
    [] 0 sd
    s
    0.02 slw
    1.21121 0.393701 m
    1.21121 11.2992 l
    1.21121 0.393701 m
    15.3242 0.393701 l
    15.3242 11.2992 l
    1.21121 11.2992 m
    15.3242 11.2992 l
    8.01388 7.69355 m
    5.49708 7.69355 2.5168 0 360 arc
    14.2189 7.69355 m
    10.8812 7.69355 3.33771 0 360 arc
    8.03498 5.85547 m
    7.69023 5.85547 0.344747 0 360 arc
    11.1515 5.53362 m
    7.81378 5.53362 3.33771 0 360 arc
    3.33558 4.07796 m
    7.52551 5.0152 4.29347 192.609 398.596 arc
    7.44242 10.0908 m
    4.1278 2.50717 8.2764 66.3911 106.456 arc
    s
    0 0 0 srgb
    0 rotate
    showpage
    ---------------------------------------------

    I did try google. But could not get a solution. Any idea what is the doc flavor for .drw file.?
    Edited by: ekuriakose on Mar 22, 2010 11:47 PM

  • How to print / save Structural Graphics

    I want to print structural graphics displayed by a standard report. The print button there does not print anything.
    Any clues on how I can print / save the structural graphics?
    More information: FM standard is using to show the graphics is:    
        CALL FUNCTION 'PD_STRUCTURAL_GRAPHICS'
          EXPORTING
            context_id           = 'GENERAL'
            index                = ls_node-id
            load_pd_toolbox      = 'X'
            load_pd_profiles     = 'X'
          EXCEPTIONS
            no_objects_available = 1
            OTHERS               = 2.
    That internally calls GRAPH_STRUCTURAL.
    Report that we are using to test: RHXSTR00
    Thanks in adv.

    Hi,
    Why don't you use the function "excel inplace" in the ALV?  With the ALV you have some buttons "SORT/TOTAL/FILTER... and you have PRINT and EXCEL INPLACE"?
    Do you use the method   call method g_grid->set_table_for_first_display in order to display your data alv?
    Best regards

  • How to print an adobe form with xml interface in r3

    I have a Web dynpro application that creates an ADOBE form using an XML schema interface.
    I need to be able to print the same form in R/3 - is this possible? If so how do I create the interface?
    Thanks

    Hi,
    I am not sure if I understand your question correctly. The following NetWeaver documentation might be useful for you https://help.sap.com/saphelp_nw04s/helpdata/en/a1/40aac795a243cebdcff368491c659e/frameset.htm Check section Example: Calling Forms in an Application Program. You need to get a name of the corresponding FM using FM FP_FUNCTION_MODULE_NAME.
    Regards

  • How to print a Business Graphic

    Hi all.
    I need print a graphic from my webdynpro app, and i dont know how. I wanna know if it is possible and if so, how can i do it.
    Regards.
    Gregory.

    I see that the Graphic is an image and its URL is something like:
    http://SERVER:PORT/webdynpro/dispatcher/local/PROYECT/APP/~wd_key6_1217603081014/.gif?sap-wd-download=1&sap-wd-cltwndid=914dfee25fda11dd8a2d00145e1dab1c&sap-wd-appwndid=914dfee35fda11dda9c000145e1dab1c&sap-wd-norefresh=X
    Can I get this URL? If so, how?
    Regards.
    Gregory(Peck).

  • How to call SAP GUI Graphical interface by using SAP ACTIVEX Control?

    Hi,all
    I want to connet my delphi system with SAP system. But we still need to call SAP GUI Graphical interface into our delphi system. Could we use SAP ACTIVEX Control to implement this funciont?
    Or, is there any other method to Call SAP GUI Graphical interface into other system?
    Besides call SAP GUI into IE by using portal
    Thanks and best regards.

    check out this thread
    Re: Calling SAPGUI transaction out of BSP application

  • How to print data

    Hi
    I am trying to printout text area data
    Please help me how to do this?
    and also give idea about how to print table data ?

    Here's a quick-and-dirty example of how to get something to print from Java. As you can see, the Prinatable interface defines a print() method. That print() is passed in a Graphics objects. That Graphics object is then used by the object you want to print to print itself to. In this example, I just dummied up a Canvas whos paint(Graphics) method just writes out a string. This same call to paint() from print might work for a Table.
    Of course this example is terribly rudimentary, but it does actually print (for me).
    import java.awt.print.*;
    import java.awt.*;
    public class Main
         public static void main(String[] args)
              PrintableCanvas printMe = new Main().new PrintableCanvas();
              printMe.setSize(500,500);
              PrinterJob pj = PrinterJob.getPrinterJob();
              pj.setPrintable(printMe);
              try
                   pj.print();
              catch(PrinterException pe)
                   pe.printStackTrace();
         class PrintableCanvas extends Canvas implements Printable
              public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
                   paint(graphics);
                   if(pageIndex == 0)
                        return PAGE_EXISTS;
                   else
                        return NO_SUCH_PAGE;
              public void paint(Graphics graphics)
                   graphics.drawString("This was printed from Java",200,200);
    }

  • Printing a graphic with a gradient mask in Flex 3-problem

    Hello, I am fairly new to flex development. I am puting together a little program that allows the user to upload a picture add a vignette mask in order to achieve a soft edge,  and have a problem I cannot  find an answer anywhere, maybe someone could help me please.
    I want  to print a the user photo with a gradient mask or vignette from flex. I managed  to show the image correctly on screeen with the gradient mask using  this class but the output to paper is a rectangle without the soft mask.
    //package to add the mask for display
    package com.dm.graphics
       import flash.display.Graphics;
       import mx.containers.Canvas;
       import flash.display.GradientType;
       public class FrameBorderSoft extends Canvas
          override protected function updateDisplayList(w:Number, h:Number):void
             super.updateDisplayList(w,h);
             var g:Graphics = this.graphics;
             g.clear();
             g.beginGradientFill(GradientType.RADIAL, [0x000000, 0x000000, 0x000000, 0x000000],
             [1,1,0.8,0],
             [1,128,195,255],
             horizontalGradientMatrix(0,0,w,h) );
             g.drawRect(0,0,w,h);
             g.endFill();
    It  works beautifully until I try to print the graphic. The image prints  but without the gradient edges (soft) instead it is just a sharp edge  rectangle.
    Does anyone know how to do this?
    Here is my print function:
    private function doPrint():void {
                    // Create an instance of the FlexPrintJob class.
                    var myPrintJob:FlexPrintJob = new FlexPrintJob();
                    // Start the print job.
                    if (myPrintJob.start() != true) return;
                    // Add the object to print. Do not scale it.
                    if (tabnavigator1.selectedChild == img1) {
               //switchcolor is a variable to detect if the user changed the background to white or clear.       
                             switchcolor = 100;
                          //printCF is the card front container with the photo masked
                       myPrintJob.addObject(printCF, FlexPrintJobScaleType.NONE);
                       myPrintJob.printAsBitmap = false;        
                    } else if (tabnavigator1.selectedChild == img1b) {
                       switchcolor = 100;
                       myPrintJob.addObject(printCB, FlexPrintJobScaleType.NONE);
    I hope this helps to visualize,
    I would greatly appreciate any assistance or advise.

    Hello, back on my issue, i tested a little bit more the message dispaching.
    I read the lazyLoadPolicy class and noticed that it always has to have a ModuleId property in the message to work, that's why the broadcast message didn't work to awake the module with the lazy loading policy.
    So i added copy of my module:
         <cairngorm:ParsleyModuleDescriptor objectId="test"
              url="TestModule.swf"
              applicationDomain="{ClassInfo.currentDomain}"
         />
         <cairngorm:ParsleyModuleDescriptor objectId="testbis"
              url="TestModuleBis.swf"
              applicationDomain="{ClassInfo.currentDomain}"
         />     
    Set them both with a basicLoadPolicy, and tries to dispatch a message to only one of them using the ModuleId metatag. I then noticed that both modules received the message and not only the one i expected.
    I then changed the ModuleMessageInterceptor configuration to dispatch to only one kind of module:
    <cairngorm:ModuleMessageInterceptor type="{ OpenViewMessage }" moduleRef="test"/>
    and this worked as expected. Only the first module catched the message. I am obiously messing with the ModuleId metatag but i cannot see what's wrong...
    I compiled with
    -keep-as3-metadata+=ModuleId
    but this hasn't changed anything...

  • How to print the report directly without previewing (report viewer) using c# windows application

    Hi,
    Currently, we are using crystal report to all of our reporting applications, but since I/users have encountered some issues about CR's speed to load only a simple report, maybe it is now time for us to adopt a new reporting environment in which I think SSRS
    can fill this problem.
    To start with, I have here a sample code, that uses the crystal report to print the report directly without previewing:
    csCashInvoiceCal csCashCal; --Crystal report name .rpt
    dsCsReceipt dsCs; --created dataset
    DataTable u;
    DataRow s;
    private System.Drawing.Printing.PrintDocument printDocument1;
    private System.Windows.Forms.PrintDialog printDialog1;
    ParameterValues paramValue;
    ParameterDiscreteValue discreteValue;
    ParameterFieldDefinition fieldDefinition;
    private void btnPrint_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt2();
    print2();
    csCashCal.Close();
    this.Cursor = Cursors.Default;
    private void loadReceipt2()
    dsCs = new dsCsReceipt(); --created dataset
    u = dsCs.Tables.Add("DtCsReceipt");
    u.Columns.Add("Qty", Type.GetType("System.String"));
    u.Columns.Add("UOM", Type.GetType("System.String"));
    u.Columns.Add("Description", Type.GetType("System.String"));
    u.Columns.Add("UnitPrice", Type.GetType("System.String"));
    u.Columns.Add("Discount", Type.GetType("System.String"));
    u.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    s = u.NewRow(); double.TryParse(dgvDesc.Rows[i].Cells[Discount2.Name].Value.ToString(), out discount);
    s["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    s["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    s["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    s["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    s["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    s["Discount"] = "";
    s["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    u.Rows.Add(s);
    catch (Exception) { }
    csCashCal = new csCashInvoiceCal();
    csCashCal.SetDataSource(dsCs.Tables[1]);
    //csCashCal.Refresh();
    loadParameter2();
    private void loadParameter2()
    ParameterFieldDefinitions paramFieldDefinitions;
    paramValue = new ParameterValues();
    discreteValue = new ParameterDiscreteValue();
    paramFieldDefinitions = csCashCal.DataDefinition.ParameterFields;
    discreteValue.Value = date;
    fieldDefinition = paramFieldDefinitions["Date"];
    commonParam();
    discreteValue.Value = txtcsno.Text;
    fieldDefinition = paramFieldDefinitions["InvoiceNo"];
    commonParam();
    discreteValue.Value = txtNameTo.Text;
    fieldDefinition = paramFieldDefinitions["CustomerName"];
    commonParam();
    discreteValue.Value = txtAdd.Text;
    fieldDefinition = paramFieldDefinitions["CustomerAddress"];
    commonParam();
    ------other parameters----
    private void commonParam()
    paramValue.Clear();
    paramValue.Add(discreteValue);
    fieldDefinition.ApplyCurrentValues(paramValue);
    private void print2()
    using (printDocument1 = new System.Drawing.Printing.PrintDocument())
    using (this.printDialog1 = new PrintDialog())
    //this.printDialog1.UseEXDialog = true;
    this.printDialog1.Document = this.printDocument1;
    DialogResult dr = this.printDialog1.ShowDialog();
    if (dr == DialogResult.OK)
    int nCopy = this.printDocument1.PrinterSettings.Copies;
    int sPage = this.printDocument1.PrinterSettings.FromPage;
    int ePage = this.printDocument1.PrinterSettings.ToPage;
    string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
    try
    csCashCal.PrintOptions.PrinterName = PrinterName;
    csCashCal.PrintToPrinter(nCopy, false, sPage, ePage);
    printcount++;
    //saveCountPrint();
    catch (Exception err)
    MessageBox.Show(err.ToString());
    This is only a simple sales receipt application that uses dgv and textboxes to push its data to dataset to the crystal report, a simple one but there are instances that it is very slow.
    But I'm having trouble implementing this using SSRS, since I'm only new to this one, wherein I created the report using report wizard, with two button options inside the form for print preview or direct print selection. Actually, it is very easy to implement
    with print preview because it uses reportviewer. My problem is that how can I print the report directly without using a reportviewer?
    So here is my code so far which I don't know what's next:
    private void button2_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt3();
    //print3();
    this.Cursor = Cursors.Default;
    ReportParameter[] parameter = new ReportParameter[11];
    private void loadParameter3()
    parameter[0] = new ReportParameter("InvoiceNo", txtcsno.Text);
    parameter[1] = new ReportParameter("Date", date);
    parameter[2] = new ReportParameter("CustomerTin", txtTin.Text);
    parameter[3] = new ReportParameter("CustomerName", txtNameTo.Text);
    parameter[4] = new ReportParameter("CustomerAddress", txtAdd.Text);
    parameter[5] = new ReportParameter("Agent", agent);
    parameter[6] = new ReportParameter("Discount", "Discount: ");
    parameter[7] = new ReportParameter("TotalDiscount", lblDiscount.Text + "%");
    parameter[8] = new ReportParameter("TotalSales", rdtotal);
    parameter[9] = new ReportParameter("Tax", rdtax);
    parameter[10] = new ReportParameter("TotalAmount", rdnet);
    private void loadReceipt3()
    DataSet dsrs = new DataSet();
    DataTable dtrs = new DataTable();
    DataRow drs;
    dtrs.Columns.Add("Qty", Type.GetType("System.String"));
    dtrs.Columns.Add("UOM", Type.GetType("System.String"));
    dtrs.Columns.Add("Description", Type.GetType("System.String"));
    dtrs.Columns.Add("UnitPrice", Type.GetType("System.String"));
    dtrs.Columns.Add("Discount", Type.GetType("System.String"));
    dtrs.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    drs = dtrs.NewRow();
    drs["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    drs["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    drs["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    drs["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    drs["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    drs["Discount"] = "";
    drs["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    dtrs.Rows.Add(s);
    catch (Exception) { }
    int addtlRow = 7;
    if (addtlRow > (count - 1))
    addtlRow = addtlRow - (count - 1);
    for (int i = 0; i < addtlRow; i++)
    dtrs.Rows.Add();
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    localreport.Refresh();
    //what's next....
    So what's next after local..refresh()? Actually, I have googled a lot but I didn't found the exact solution that I'm looking for which confuses me a lot.
    Anyway I'm using VS 2010 with sql server 2012 express.
    You're help will be greatly appreciated.
    Thank you,
    Hardz

    After some further studies with ReportViewer controls and with the use of this tutorial @ : http://msdn.microsoft.com/en-us/library/ms252091.aspx, which helps me a lot on how to print a report without using a report viewer, I found out what is missing
    with my code above and helps solve my question.
    Here's the continuation of the code above:
    private void loadReceipt3()
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.ReportPath = @"..\..\SsrsCashReceipt.rdlc";
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    Export(localreport);
    print4();
    private IList<Stream> m_streams;
    private int m_currentPageIndex;
    private void Export(LocalReport report)
    string deviceInfo =
    @"<DeviceInfo>
    <OutputFormat>EMF</OutputFormat>
    <PageWidth>8.5in</PageWidth>
    <PageHeight>11in</PageHeight>
    <MarginTop>0.25in</MarginTop>
    <MarginLeft>0.25in</MarginLeft>
    <MarginRight>0.25in</MarginRight>
    <MarginBottom>0.25in</MarginBottom>
    </DeviceInfo>";
    Warning[] warnings;
    m_streams = new List<Stream>();
    report.Render("Image", deviceInfo, CreateStream,
    out warnings);
    foreach (Stream stream in m_streams)
    stream.Position = 0;
    private void print4()
    if (m_streams == null || m_streams.Count == 0)
    throw new Exception("Error: no stream to print.");
    PrintDocument printDoc = new PrintDocument();
    PrintDialog printDlg = new PrintDialog();
    printDlg.Document = printDoc;
    DialogResult dr = printDlg.ShowDialog();
    if (dr == DialogResult.OK)
    if (!printDoc.PrinterSettings.IsValid)
    throw new Exception("Error: cannot find the default printer.");
    else
    printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
    m_currentPageIndex = 0;
    printDoc.Print();
    Dispose();
    public void Dispose()
    if (m_streams != null)
    foreach (Stream stream in m_streams)
    stream.Close();
    m_streams = null;
    private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
    Stream stream = new FileStream(name + "." + fileNameExtension,
    FileMode.Create);
    m_streams.Add(stream);
    return stream;
    private void PrintPage(object sender, PrintPageEventArgs ev)
    Metafile pageImage = new
    Metafile(m_streams[m_currentPageIndex]);
    // Adjust rectangular area with printer margins.
    Rectangle adjustedRect = new Rectangle(
    ev.PageBounds.Left - (int)ev.PageSettings.HardMarginX,
    ev.PageBounds.Top - (int)ev.PageSettings.HardMarginY,
    ev.PageBounds.Width,
    ev.PageBounds.Height);
    // Draw a white background for the report
    ev.Graphics.FillRectangle(Brushes.White, adjustedRect);
    // Draw the report content
    ev.Graphics.DrawImage(pageImage, adjustedRect);
    // Prepare for the next page. Make sure we haven't hit the end.
    m_currentPageIndex++;
    ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
    Thank you very much for this wonderful tutorial. :)

  • How to Print a Character in Reverse video ...?

    Hi Could any one of you help me " How to print a character in Reverse Video " in SMART Forms and in SAP Scripts.
    Regards,
    Saravanan
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Mar 26, 2009 5:31 PM

    deepak_c3 wrote:
    Thanks for the info.,
    where should the page number n-1-i be returned ?
    Which method implementation of Pageable interface should return the page number ?w.r.t. your first question: don't return that number but return page n-1-i when page i is requested; your document will be printed in reverse order. Your class should implement the entire interface and wrap the original Pageable. (for that number n your class can consult the wrapped interface; read the API for the Pageable interface).
    kind regards,
    Jos

  • How to print  the barcode in a smartform satisfying specific condition

    Hi
    I have a requirement where I need to print the barcode System Bar code = BC_93
    satisfying the following requirement:
    The Bar code is made up of the concatenation of “code1 ”, “dash character”
    and “ code2”. The two codes ( that is some field in a custom table) should be
    eight char long each (put leading zero if the length of the code is shorter).
    This barcode shall be printed always apart from:
    a) code1 material type is ZCPF
    b )Is a combi order, with no code2 stored in storage location “abc”
    please help with example . its very urgent , points will be rewarded.
    Thanks

    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.
    Re: how to print barcode using smartform and sapscript...?

  • How to print the texts retrived by using READ_TEXT fun module in Smartform

    Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
    I have coded all things in the program lines and in that i am retriveing the long texts.
    I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text.
    I have to print the trouble ticket. in that the notes log I have to pass.
    its urgent. Points will be rewarded for any type of clue. whether it will work or not.

    There are a few ways to do it. If you need to take all of the text in the text type, in your SF text element choose "Include Text".
    Populate the fields with the data that corresponds to the text type. It is similar to the interface to the FM "Read_Text.
    Text Name
    Text Obje
    Text ID 
    Language
    Encase any variables with the "&" symbol.
    If you have already coded the call to the FM "READ_TEXT" and loaded the text into an internal table, create a loop and loop through the itab. Inside of the loop create a text element and add a variable in the text element for the field you are looking to output.

  • How to print text rertrived by using the READ_TEXT fun module in smartform

    Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
    I have coded all things in the program lines and in that i am retriveing the long texts.
    I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text module.
    its urgent. Points will be rewarded for any type of clue. whether it will work or not.

    loop the table into which u have retrieved the text .
    in the form interface of the smartform ... in importing parameter give the that table name .
    and in smartform whereever u want to print there insert the data into work area and pass to fields for dispaly .
    decalre ur work area in global defintions
    thnaks .

Maybe you are looking for

  • Compaq Mini CQ10 Battery Problem

    Ran HP Battery Check 3 times and status comes back OK.  Battery charge level remains (0% available, plugged in, charging) after extended period of time. Suggestions as to next steps, please This question was solved. View Solution.

  • How do i clear the reading list in Safari?

    How do i clear the reading list on Safari for Iphone 4

  • Why Data Pump tool cannot get in?

    Why Data Pump tool cannot get in? [oracle@hostp ~]$ impdp Import: Release 10.2.0.1.0 - Production on Thursday, 18 September, 2008 22:30:05 Copyright (c) 2003, 2005, Oracle. All rights reserved. Username: system Password: UDI-00008: operation generate

  • To know print program

    Hi All, How to find out a print program for a sap standard layout set. Thanks & Regards, S.Gangi reddy.

  • Best way to transfer animated scene from Max to Acrobat 3d???

    I tried ASE files, they cannot import, I get "unknown format" in 3d reviewer. VRML files have no animation frames saved. Any suggestions? I am using: Max 2008 Acrobat 9 Pro Extended Trial