I need to print the contents of a text area

i am trying to create an editor and one of the options is print, so i want to print the contents of the text area. can someone help

See Printing the Contents of a Component in http://java.sun.com/docs/books/tutorial/2d/printing/index.html

Similar Messages

  • Is it possible to print the content of a text entry box

    I would like to print the content of a text entry box as I've created a 'notepad' in captivate 6. Is it also possible to save content of a text entry box to a word document/web page using javascript?

    The content is stored in the associated variable of the TEB. Have a look at Jim Leichliter's website for instructions to get that variable out of Captivate.

  • Script needed to print complete contents in scrolling text field Acrobat Pro 9 (MAC)

    I've seen this question several times in my search but no real solution. My client wants a form with text fields that only show 1-2 lines when viewed on-screen but are scrollable so that the user can input a lot of text. I had no problem creating that. The problem occurs when I try to print the form. Only the visible lines of text print and not the entire contents of the field. 
    Is there a Javascript that I can assign to a Print button in my form that can be assigned to the Mouse Down action that will make the entire field contents print? I even recreated the form in WORD so that when the user inputs text into the field, the contents of the form move down the page. My client didn't like that approach. I'm not a programmer and so I haven't been able to write my own script to handle the printing issue. I'm MAC based so using Livecycle isn't an option for me. Thanks!

    I'm using Acrobat Professional 9. I used to use Livecycle which was more flexible, but I no longer have a PC, only MAC and Adobe doesn't make Livecycle for the MAC. 
    The client doesn't want larger fields unfortunately. They have questions that require 2 or 3 pages of information to be entered into a small text field but they don't want large fields. If they're reviewing the answers online, it's fine - they can just scroll through the text fields and read the answers but they don't want the completed text fields to expand unless the form is printed.
    I've already set up my text fields to be multi-line and scrollable so that the client can review all of the text in the field if they are looking at the saved PDF online. The problem I'm having is that I need the entire contents of the text field to be visible ONLY when printed out. They don't want larger fields to show in the form. The client was quite specific about it. The form is also going to be used infrequently, so collecting the data and storing it on a server isn't something they're particularly interested in. The information is also confidential, so they do not want me to be collecting and storing the data and sending it back to them in another format. The easiest option I could see was to create a script tied to a PRINT button that printed out the complete text field.
    Thanks!

  • How to print the content of a text edit ?

    Hi to all,
    I have a view with a text edit and I want to print its content. I created a button and I want to print text edit content pressing this button. How can I do? Which java code I have to insert in that button?
    thanks a lot,
    Antonio

    Antonio,
    Sadly, there is no way to do it directly. Even in plain HTML application it is impossible to print text of UI control (<textarea> in this case).
    So you have to open new browser window containing entered text and let user print text himself. Or invoke window.print() on document load event.
    VS

  • What is the best way  to print the contents within a scrolling textbox in a fillable form?

    I have created a form using Acrobat 9 Pro which contains several text boxes that allow for unlimited text.  When printing out completed forms,  any text that requires scrolling will not print.  Is there any way to be able to print the contents of all text boxes regardless of length of content?

    Yes, when you set the font size to Auto, the font size shrinks to include all the entered text in the visible area. Otherwise the hidden the text is not displayed and you see observe a "+" sign. You might also want to consider the option to make your form flowable using Adobe LiveCycle Designer.
    ~Deepak

  • Really need help... How to print the 'content' of a JTextArea?

    Hello, i'm currently developping a HTML Editor in java but i've got a problem with printing job... Does anyone know a simple code to print the content of a textarea by clicking on a button?
    for instance:
    JTextarea textarea = new JTextArea();
    JButton print = new JButton ();
    file_menu.add(print) ;
    print.addActionListener(
    new ActionListener()
    public void actionPerformed(ActionEvent event)
    ////----> what could i put here to print the content of my textarea named 'textarea' ?
    I've searched on the web but i didn't find it...
    Thanks very much for your help...
    Sebastien Roupin

    thank you very much for your help... i'm checking this samples...
    Sebastien Roupin

  • How to print the contents of a form(window)

    I'm devloping visitors application in java. After the data entry, I need to display the selected information from database along with the photo and take a printout so that it looks like a card.
    I know how to display the contents in a form. How do I print the contents of the form?
    -Thanx
    Hane

    in JComponent there is a method called print(Graphics g)
    you can use that with a Printable class
    read bout the java.print package in the java doc

  • I need to print the footer in all pages except last page.

    Hi,
    I'm working on PO RTF template. I got one probelm, I need to print the footer in all pages except last page.
    Can someone help me in this.
    Thanks in advance.
    Venki.

    This question has been answered already multiple times - please search the forum before posting a question - in case you did and you didn't find it - we added a feature
    in 5.6.2 to solve this problem - It is described in the user guide in the RTF template section search for start@last-page:
    Last Page Support
    XML Publisher now has the ability to show content only on the last page. This is useful for documents such as checks, invoices or purchase orders where you want want content such as the check or a summary in a specific place only on the last page.
    The basic command is:
    <?start@last-page:body?>
    <?end body?>
    http://forums.oracle.com/forums/search.jspa?threadID=&q=%40last-page&objID=f245&dateRange=last90days&userID=&numResults=15&rankBy=9
    Any content above or below these two tags will only appear on the last page of the document.
    Hope that helps,
    Klaus

  • I have a MG6320 Printer. It will not print the contents of an email, only the outline

    I have a Canon MG 6320 printer. When I call up an email in GMail, it will not print the contents of the email, only the words and figures displaye don rails down the side and at the top. Can anyone tell me what I can do to change this?
    James O'Shea

    Hi JOShea432,
    In order to assist with this issue we will need more information.  Is the problem only occuring in Gmail?  If so, are you using the print button from within Gmail or are you using the print option under the File menu in your web browser?
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Would Like to Get Report of Daily Emails In and Out from Members to a DL Exchange version : 2007 I am the supervisor for the group and want to quantify this information. I do not need to see the content, just quantity is it possible ?

    Would Like to Get Report of Daily Emails In and Out from Members to a DL
    Exchange version : 2007
    I am the supervisor for the group and want to quantify this information. I do not need to see the content, just quantity
    is it possible ?

    Well, distribution groups don't really have a concept of "in" or "out". They only serve to distribute messages sent to them -- unless you're asking to know who was a member of the distribution group at the time a message was sent to the DL.
    Message tracking logs hold the information you want, though. You'd have to look for EXPAND events that reference the distribution group and take the sender's e-mail address from that event. If the DL is a simple one that's not a member of any other groups
    you could also look for RECEIVE events sent to the e-mail address of the group and get the sender's name from that event.
    You can use Powershell extract the rows of data from the logs, but you'll have to write the code to get the data out of those rows and into a format you want. Perhaps LogParser could be useful in place of Powershell?
    --- Rich Matheisen MCSE&I, Exchange MVP

  • This is about iPhoto:  I need to print the FULL IMAGE as shown on the screen:  the image is SQUARE (equal on four sides).  iPhoto keeps cropping it into a rectangle - THIS IS NOT ACCEPTABLE!  How do I get what I see on the screen in print form???

    I need to print the FULL image as shown on the screen - the image is SQUARE (equal on all four sides).  iPhoto keeps cropping it into a rectangle - this is not acceptable!  How do I get what I see on the screen into print form?

    Like Terence explained:
    OT

  • I need to erase the contents of my phone and restore to factory settings. Does anybody know how to save your texts so you don't lose them?  Can I back those up to iCloud?  My phone was very likely hacked (Apple's advice was to call the police!)

    "I need to erase the contents of my phone and restore to factory settings. Does anybody know how to save your texts so you don't lose them?  Can I back those up to iCloud?  My phone was very likely hacked (Apple's advice was to call the police!)"
    That was all I could put in the initial "box."  Then it brought me to this page with instructions on how to write a good sentence.
    Proceeding ...
    After going back and forth between Apple, AT&T and the police (all telling me to go to the other two) I took AT&Ts suggestion and got a new number. One tech warned against doing a backup, especially on my Mac, saying if my phone had been hacked then whatever bug was there would then invade my computer. But nobody knows how to determine if the phone has been hacked or a virus was planted there. Unfortunately I know who would have reason to do such a thing and all I can say is that he is at the top technologically and could easily do it. Almost impossible to prove, however.
    So I need to preserve my text messages and my emails as well. I backed up my photos to that Microsoft product (One-Drive) and it froze (Surprise, Surprise) with four short videos to go, and no way of stopping that (when I tried it crashed repeatedly) so I'm in crisis mode here.
    Help ...
    Running 8.0 on 5S
    Thanks!

    Betty I don't know if you fixed your hacking problem but I feel your pain. I've seen some strange things going on between my iMac and my iPhone and Apple has told me the same thing, call the police which I have done. The hackers have stole 500.00 out of my checking account have access to every internet account I use and no matter how often I change the password their right back on the account. I closed my FB account 3 times only to have someone reopen it. Right now I've got a link in my reading list (Safari) that if I click on it, it allows me to log onto my FB account anonymously.
    I've seen a green folder come out of no where while I was trying to delete my passwords out of keychain when that green folder was put into the key chain I was immediately locked out. I than went into system preferences to try to make changes to my security settings, when I clicked on the icon it wouldn't open. I've seen log files of automator receiving commands and sending out my personal information thats on my computer.
    I have a legitamate program called iExplorer that allows you to look at the contents of your iPhone back ups and saw a transaction someone made at the Apple store for some full length movies, some albums, ibooks and other apps but when I called the iTunes store and they said none of those items were showing up on my account. If their not on my account how can they be on my iPhone 6? One day someone was using my gmail account and unknowingly used google maps to search for an Italian restaurant, than a Mexican restaurant than a coffee shop and their search showed up on my iPhone but I didn't have my gmail account installed on my iPhone 6. Using my computer I logged onto my gmail account and looked at the maps history and sure enough there were the searches when I'd hover my curser over the link it gave me the longitude and latitude of the where the hacker was when he was using google maps. I know whoever reads this thinks Im crazy but I've documented everything and can prove the things that I have mentioned in this post actually happened.
    One day I had my laptop (pc) and my iMac next to each other as I was using both. when I clicked on airport it showed that my laptop and my iMac had made a connection and were actually communicating with each other. I know I didn't do it I don't know how. The iMac was logged into my iCloud account while my laptop wasn't. I have formatted my iPhone at least a dozen times, Apple and an Apple retailer have formatted my hard drive not to mention the numerous times I have formatted it but the hackers keep getting on my devices. Im formatting my lap top at this very second because during the course of the night I left the ethernet cable plugged into it and they locked me out of my c: drive, and configured the system so I can't download any updates from Microsoft, overtime I type in www.microsoft.com it changes to ww38.microsoft.com which takes me to a blank page. I right clicked on the page I was redirected to and read the java script and couldn't believe that someone had actually configured Internet Explorer to redirect me to a blank page when I tried to go to Microsoft. Apples answer to all this is there was nothing wrong with my iPhone or my iMac and if I thought there was a problem to call the police which I have done.
    Theres no doubt the hackers are reading this while I type it or will read it and I simply don't care anymore. I no longer email anyone, don't use my iCloud account and have taken precautions to protect my credit but if I ever find out who has invaded my privacy to this extreme the police are going to want to talk to me because Im going to hurt them like they've never been hurt before

  • How to print the content of a textarea in java?

    Hello, i'm currently developping a HTML Editor in java but i've got a problem with printing job... Does anyone know a simple code to print the content of a textarea by clicking on a button?
    for instance:
    JTextarea textarea = new JTextArea();
    JButton print = new JButton ();
    file_menu.add(print) ;
    print.addActionListener(
    new ActionListener()
    public void actionPerformed(ActionEvent event)
    ////----> what could i put here to print the content of my textarea named 'textarea' ? Does anyone know a class i could implement here? for instance: 'Print print = new Print(textarea);'
    I've searched on the web but i didn't find it...
    Thanks very much for your help...
    S�bastien

    public class TA extends JTextArea implements Printable{
    public TA(){
    super();
    this.setPreferredSize(new Dimension(500,500));
    public TA(int x, int y){
    super(x,y);
    public int print(Graphics g, PageFormat pf,int pi){
    if (pi >= 1) {
    return Printable.NO_SUCH_PAGE;
    Graphics2D g2 = (Graphics2D) g;
    g2.translate(pf.getImageableX(),pf.getImageableY());
    Font f = new Font("Monospaced", Font.PLAIN,6);
    g2.setFont (f);
    g2.drawString(this.getText(),100,100);
    this.paint(g2);
    return Printable.PAGE_EXISTS;
    And use in Action Listener
    // get the print job
    if(pj.printDialog()){
    PageFormat pformat = pj.defaultPage();
    pformat.setOrientation(PageFormat.PORTRAIT);
    System.out.println(pj.defaultPage());
    pj.setPrintable(ta,pj.pageDialog(pformat));
    try{
    pj.print();
    catch(PrinterException p){

  • How to print the content of LinkedList int[] and LinkedList LinkedList ?

    Hi guys, its been a long time since i posted here, and now im coming back to programming using java. My problem is, how can i print the content of the list?
    Example:
    LinkedList<int[]> list = new LinkedList<int[]>;
    int[] input = {1,2,3,4,5};
    int[] input2 = {2,32,43,54,65};
    list.add(input);
    list.add(input2);
    how can i print all the content of the linkedlist?
    Please help me..I know its a dumb question but i really dunno how.
    here is the code:
    import java.util.LinkedList;
    import java.util.Scanner;
    import java.util.Arrays;
    public class Test{
         static void printThis(String[] in){
              System.out.print("Value: ");
              for(int i = 0;i<in.length;i++){
                   System.out.print(in[i] + " ");
              System.out.println();
         static void reset(String[] val){
              for(int i = 0;i<val.length;i++){
                   val[i] = "";
         public static void main(String[] args){
              LinkedList<String[]> list = new LinkedList<String[]>();
              LinkedList<String> listTrans = new LinkedList<String>();
              System.out.print("Enter the number of records: ");
              Scanner s = new Scanner(System.in);
              int numOfRecords = s.nextInt();
              System.out.print("Enter the number of records per run: ");
              s = new Scanner(System.in);
              System.out.println();
              int numOfRecordsInMemory = s.nextInt();
              String[] getData = new String[numOfRecords];
              String[] transferData = new String[numOfRecordsInMemory];
              int numOfRuns = 0;
              int counter = 0;
              for(int i = 0;i<numOfRecords;i++){
                   counter++;
                   System.out.print("Enter value number " + counter + ": ");
                   Scanner scan = new Scanner(System.in);
                   getData[i] = scan.next();
                   listTrans.add(getData);
              if(getData.length%numOfRecordsInMemory == 0){
                   numOfRuns = getData.length/numOfRecordsInMemory;
              }else if(getData.length%numOfRecordsInMemory != 0){
                   numOfRuns =(int)(getData.length/numOfRecordsInMemory)+ 1;
              System.out.println();
              System.out.println("Number of Runs: " + numOfRuns);
         int pass = 0;
         System.out.println("Size of the main list: " + listTrans.size());
         while(listTrans.size() != 0){
              if(listTrans.size() >= numOfRecordsInMemory){
                   for(int i = 0;i<numOfRecordsInMemory;i++){
                        transferData[i] = listTrans.remove();
                   System.out.println("Size of the list: " + listTrans.size());
                   printThis(transferData);
                   System.out.println();
                   Arrays.sort(transferData);
                   list.add(transferData);
                   reset(transferData);
              }else if(listTrans.size() < numOfRecordsInMemory){
                   pass = listTrans.size();
                   for(int k = 0;k<pass;k++){
                        transferData[k] = listTrans.remove();
                   System.out.println("Size of the list: " + listTrans.size());
                   printThis(transferData);
                   System.out.println();
                   Arrays.sort(transferData);
                   list.add(transferData);
                   reset(transferData);
    //This is the part that is confusing me.
    //im trying to print it but its not working.
              System.out.println("Size of the next list: " + list.size());
    //          for(int i = 0;i<list.size();i++){
    //                    System.out.println();
    //               for(int j = 0;j<list.get(i)[j].length();j++){                    
    //                    System.out.print(list.get(i)[j] + " ");

    Here's the funnest, mabye clearest way you could do it: Use 2 Mappers
    package tjacobs.util;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import tjacobs.Arrays;
    public class Mapper <T>{
         public static interface MappedFunc<T> {
              void map(T value);
         public Mapper(T[] vals, MappedFunc<T> function) {
              this (new Arrays.ArrayIterator<T>(vals), function);
         public Mapper(Iterator<T> iterator, MappedFunc<T> function) {
              while (iterator.hasNext()) {
                   function.map(iterator.next());
         public static void main(String[] args) {
              String[] s = new String[] {"a","b", "c", "abc", "ab"};
              MappedFunc<String> func = new MappedFunc<String>() {
                   public void map(String s) {
                        if (s.toLowerCase().startsWith("a")) {
                             System.out.println(s);
              Mapper m = new Mapper(s, func);
    }

  • How to print the contents of doubly-Linked List

    Hi
    I have a DLList consists of header , trailer and 10 linked nodes in between
    Is there a simple way to print the contents ie "the elements"
    of the list
    thanks

    In general you should write an iterator for every linked data structure for fast traversal. I'm guessing you're writing your own DLL for an assignment because one normally uses the LinkedList structure that is included in the api. Anyway, here is an example of how the iterator is implemented for a double linked list:
    http://www.theparticle.com/_javadata2.html#Doubly_Linked_Lists_with_Enumeration

Maybe you are looking for