How to print Text with Java

I am new to java, learning fast, lots of new stuff every day. i want to develop an application that can print a report (Text mostly eg. Like an Invoice) to a printer. i am searching the net still cant find nothing that i can understand. Help please

To learn java printing, you may want to visit:
http://java.sun.com/j2se/1.4.2/docs/guide/jps/
or
http://java.sun.com/docs/books/tutorial/2d/printing/
Or you can download reporting tool, please visit:
http://jasperreports.sourceforge.net/
or
http://www.elixirtech.com/
Okie! God bless :)

Similar Messages

  • How to print "Text" in JAVA(TM)....

    Does anyone know how to print "text" using Java?
    - Here's an example output...
    NOTE: # == 'empty spaces'
    --------------------------- <- Paper
    |###################|
    |####Welcome#########|
    |###################|
    |########to##########|
    |###########JAVA(TM)##|
    |###################|
    |#######Programming####|
    |###################|
    Please post a complete << SAMPLE CODE >> for printing the "text" (Welcome to JAVA(TM) Programming. Including the indentions. So it will not be like this...
    -------------------- <- Paper
    |Welcome |
    |to |
    |JAVA(TM) |
    |Programming |
    | |
    | |
    | |
    | |
    Thanks.

    Please read How To Ask Questions The Smart Way

  • How to print ServerVariables with Java/JavaScript

    I am working on a problem with a one of our web pages and need to review the request string coming in. I know that in ASP you can do something like the following to print out the HTTP headers sent by the client:
    Request.ServerVariables(�ALL_HTTP�)
    Is there something similar to this that I can do in Java?
    Thank you!

    What the ASP page is doing is getting the HTTP headers. Here is the equivalent java code
    response.setContentType("text/html");
    java.io.PrintWriter out = response.getWriter();
    Enumeration headers = request.getHeaderNames();
    String headerName;
    String headerValue;
    while (headers.hasMoreElements()) {
    headerName = (String)headers.nextElement();
    headerValue = request.getHeader(headerName);
    out.print(headerName);
    out.print(headerValue);}
    Venkat

  • How to Print reports with Java Application

    I'm developing a database application in java using rmi and swings. Now I want to take some printout of reports from that application. Is any report designer available for java applications. How can i solve this problem. Please help me.

    Hi
    I don't know i f exist a tool like you want, but, in Java
    the print job is implemented by a class implementing the Printable interface.
    A class "Printable" must implement the print method like is defined at scpec. This method, via the params, can do print by "drawing" the page and, finally, return an integer
    indicate if the print loop must continue or not.
    The drawing op over the printer Graphics context is realized by methos of Graphics object (if you want "print"
    some text you can do g.drawString("some text",x,y) and so on).
    See the tutorials for more info
    Hope this help

  • How to create a xml element for Text with Java?

    Hi @ all,
    I want to tag a part of a text with Java.
    Like the InDesign function "Tag für Text" (maybe "tag for text" in english)
    Is there a way to tag text with Java?
    I tried to autoTag and to markup the text with an existing xml, but only got IdsExceptions.
    here the code where to tag the text:
    XMLElement newXML = parentXML.addXMLElement(VariableTypeUtils.createString("newXML"),OptArg.noVariableType());
    Text[] texts = para.findText(OptArg.noBoolean());
    for (Text text : texts)
       //TODO tag text
    Exception throwing code:
    text.autoTag();
    text.markup(newXML);
    newXML.markup(VariableTypeUtils.createObject(text));

    This is not a Web Dynpro specific question. This forum is for Web Dynpro specifc development aspects. There are other forums for general ABAP development as well as other specific aspects of ABAP development.
    I strong suggest that you review the rules of engagement for forum involvement, Derek.  You have had multiple violations of the rules in the last week.

  • How to print text on container using oop on alv list

    Hello Guru's,
             pl guide me how to print text on container using alv list-display which have interactive events  using     oop classes/methods ...
                    I want to print hard coded text on coantainer , on double clicking it will call another screen.
    Pl Help..
    Message was edited by:
            paresh sonavane

    Hi Paresh,
           1.      Go to the Layout and Create One custom container box and give name it.
            2. Custom Container is the one type of tool and its used for Displaying the Reports 
                with the use of ABAP Objects.
            3. Go to se38 and Write The Following Code.
    tables ZTEAM_GD.
    DATA : OBJ TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
           OBJ1 TYPE REF TO CL_GUI_ALV_GRID.
    DATA IT_TEAM LIKE TABLE OF ZPLAYER_BAT_DET       .
    SELECT * FROM ZPLAYER_BAT_DET INTO TABLE IT_TEAM.
    CREATE OBJECT OBJ
      EXPORTING
        CONTAINER_NAME              = 'ALV'.          -
    > Give ur Container Name
    CREATE OBJECT OBJ1
      EXPORTING
        I_PARENT          = OBJ.
    CALL METHOD OBJ1->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
        I_STRUCTURE_NAME              = 'ZPLAYER_BAT_DET'
      CHANGING
        IT_OUTTAB                     = IT_TEAM.
    *CALL METHOD OBJ1->SET_DROP_DOWN_TABLE
    EXPORTING
       I_STRUCTURE_NAME = 'ZTEAM_GD'
    CHANGING
       IT_OUTTAB        = IT_TEAM.
    CALL SCREEN 9000.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE SY-UCOMM.
    WHEN 'EXT'.
      LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPU     
    Thanks.
    Reward If Helpful.

  • How to print text vertically in smart forms

    hi,
    Can any one tell how to print text vertically in smartforms
    ADVANCE THANKS
    GUHAPRIYAN

    HI,
    Chk out  this thread.Maybe it proves helpful.
    Re: vertical writing in smartforms
    Regards,
    Gayathri

  • How to print text on back and back of page in smartforms

    How to print text on back and back of page in smartforms.

    Prince,
    in page's output option you can set D for double-sided.
    Default: No change of print mode
    S     Begin new page in SIMPLEX mode (single-sided)
    D     Begin new page in DUPLEX mode (double-sided)
    T     Begin new page in TUMBLE DUPLEX mode (double-sided)
    Amit.

  • How to print text in paper format iin smartforms

    Hi all,
      I want a question that  how to print text in paper format like  paper divides into 2 parts and if the firstpart is full of text i.e., it exceeds the first page the text will be displyed in the second part of the first page.
    Usefull answers will be awarded.
    Thanks all...

    Hi,
    U create two windows in the page and same as like second page.
    but in first page first window select the condition print only on first page.
    in second window select conditin print only on second page.
    first try without creating a secondpage. if that doesn't workout create secondpage and try.
    Assign points if useful.
    Regards
    (YUGANDHAR.P)

  • How to print texts from iphone 4

    how to print text from iphone 4 without having to screenshot?

    An iOS cannot be downgraded or uninstalled...Apple has never supported doing this and removes the older iOS version files when a new iOS is released.

  • Hyperion Anaylzer - how to Print report with information in pages?

    Hi,<BR><BR>I use Hyperion Analyzer Version: 6.1.1.00206 (from Help | About menu).<BR><BR>I created report with pages (on Navigate button selected the Pages). In pages are months (January, February, March, etc).<BR><BR>Now I would like to print current report. So I did:<BR>1. click on arrow beside Print button<BR>2. Print Current Report windows is displayed. I selected default options and press OK button.<BR><BR>Report is printed, but there is no page information printed out. So on paper there is report without months (January, February, March, etc).<BR><BR>How to print report with information in pages?<BR><BR>Thanks,<BR>Grofaty

    Jia Shun,
    I had the same issue for printing A/R Invoices - I created a Crystal Report based on a SQL View, works fine with A/R Invoice document, but the Draft Invoice printing has 3 pages: 1st page blank, 2nd page with watermark "DRAFT", 3rd page my Crystal Report layout without any data. When printing normally it is only 1 page.
    Here is what I did as a work around:
    Create two SQL Views, one select from OINV (joining INV1 and other tables needed), the other select from ODRF (joining DRF1 and other tables needed), for the draft printing.
    Create two identicle Crystal Reports, only difference are: datasource location (from different views), the "draft" crystal report has a watermark section.
    Go to Administration>System Initialization>Print Preferences and uncheck "Print draft watermark..."
    Import both crystal reports. Invoice can be printed normally. But the Draft Invoice has more steps: Open Draft document report, change settings so it shows the DocEntry in the Draft Table. Select and open the desired document, hit Print Preview, and enter the DocEntry, it displays the layout with data and "DRAFT" watermark.
    This is a workaround. I don't like it because it is not scalable - too much workload if you want to print 100 invoices.
    Hopefully someone will provide a better solution.
    regards,
    G

  • How to highlight text with Adobe Reader XI?

    email [email protected]

    Thanks. The PDF file was made from a web site article and I guess this is the same as scanned as I cannot highlight.  The cursor changes but cannot highlight what I want.
    I was able to add text and I did this in Red and will ask the VA to read under the sections marked in Red.
    Thanks,
    Vernon Pobanz
          From: ~graffiti <[email protected]>
    To: vernon pobang <[email protected]>
    Sent: Tuesday, October 7, 2014 11:57 AM
    Subject:  How to highlight text with Adobe Reader XI?
    How to highlight text with Adobe Reader XI?
    created by ~graffiti in Adobe Reader - View the full discussionUse the highlight tool under Comment>Annotations. This will only work if the pdf isn't a scanned image. If that is the case, there is no text to highlight. Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6800192#6800192 Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:  To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.  Start a new discussion in Adobe Reader by email or at Adobe Community For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How do I text with the iPad 2 using cellular device?

    How do I text with the iPad 2 using cellular device? I also have iPhone 4, can I use them both for texting?

    The iPad doesn't have any text over cellular capabilities. You can use apps like Text Free to send texts to non-iOS devices, though.

  • How to print envelopes with correct orientation?

    Hi all,
    This one has been driving me mad and, despite many searches for help, just can't find a solution. As someone who knows their way around most IT related problems it is also very frustrating!
    The problem: How to print a DL envelope using Pages (or Word come to think about it) so that the text is positioned on the envelope where you would expect it to be.
    Printer: Epson Stylus Photo R800 - although I would guess this happens to any printer.
    Tried: I have selected the DL Envelope setting in page setup (11x22cm)and selected landscape. The envelope is positioned in the printer so that the smaller side goes in first (too wide to go in the same way a page of A4 would go). If I select print then the address details are printed at 90° to the envelope. If I choose portrait then the whole thing is messed up with the text flowing down the page (which is now shown as 11x22).
    Strangely, if I do this in Word but go to Print Preview first then print it is fine.
    Best option for me is to use Address Book though and click on the 'Orientation' tab, select the landscape option and everything is OK. Pain to have to use this each time I an envelope though.
    I have tried everything in pages including leaving the page set to 11x22 and trying to rotate the text but this is messy and have not found an easy way to rotate text in Pages as yet!
    Has anyone a solution to this or am I simply missing something that is glaringly obvious?!!
    Thanks all, Mike

    Michael Mackay wrote:
    I have tried everything in pages including leaving the page set to 11x22 and trying to rotate the text but this is messy and have not found an easy way to rotate text in Pages as yet!
    It's really easy and it's perfectly described in the Help in the chapter entitled: *Flipping and Rotating Objects*
    Create a Text Box (which is an object).
    Type what you want in it.
    Metrics Inspector > use the rotate button or enter directly 90 in the Angle field.
    We may also do that without the Inspector.
    Select the Text Box Put the cursor on the top_right handle
    Press Shift + cmd while we drag the handle to rotate once of 45°
    Repeat the process 45° + 45° will give a 90° rotation.
    Yvan KOENIG (from FRANCE dimanche 13 juillet 2008 15:59:49)

  • How to Print Text in WAD 7.0

    hi
    i have created a web template using WEB APPLICATION DESIGNER
    now i have added few custom texts in it like
    Report name,Cost centers ,Plant Names
    now if i use Export to command to create print , it is not printing this custom texts
    it is only printing Query Result.
    If i use File -> Print
    this print texts but cannot print WHOLE QUERY DATA
    it only prints what is visible (e.g. if the report is wide with 20 Columns, it cannot print 20 columns.)
    how to resolve this ??

    Hi kartikey,
    just select a text item and enter the text at the last parameter TEXT_CONTENT, that´s it. You may change the style and so on. It is also possible to bind the data provider and display the query title or other generic text.
    Look up the SAP help here:
    http://help.sap.com/saphelp_nw70/helpdata/en/8c/d9413a3ace7022e10000000a11402f/frameset.htm
    regards
    ARNE

Maybe you are looking for