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
Similar Messages
-
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 :) -
How to print text vertically in smart forms
hi,
Can any one tell how to print text vertically in smartforms
ADVANCE THANKS
GUHAPRIYANHI,
Chk out this thread.Maybe it proves helpful.
Re: vertical writing in smartforms
Regards,
Gayathri -
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 sonavaneHi 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 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.
-
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 . -
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 -
How to Print text in two main windows
For printing label have created two main windows on a page. calling function write_form In ABAP Program under do loop for two times.
but program prints only one window. why is it so? how can i print text on two windows.
do 2 times.
COUNT = COUNT + 1.
loop at itab WHERE DEPTT LT 200.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'TEST'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
OTHERS = 7.
endloop.
enddo.
Please guide.Since the information is variable and coming out of the print program, I can assume you want to print many labels but two to a page. Also, any page numbering, etc will need to be updated. This is easily accomplished with SAPScript but a feature people rarely use I believe. Here are the simple steps:
1) On the Windows Screen: Creat a main window for the size of the label, etc knowing that you will be putting multiple windows on a page. For example, if page size is 8.5 x 11, maybe your window size is 6 X 4 or something similar. You only need one main window defined.
2) Now go to Page Windows Screen. Add a window MAIN and down at the bottom where it says Window Type put in MAIN. Next to this field is a little field about two characters long. In here put in '01'.
3) Now Add another window MAIN and down at the bottom put in '02'.
Hopefully this gives you the idea. I've done this with up to 30 small windows in order to print variable window for labels on label stock such as Avery 8167, etc.
Good Luck!
Tim Stadler
Menasha Corporation -
How to Print Text in the PLD when we select Type : Text
Hi All
I designed a PLD for Purchase Order which is working well but
whenever we select type: Text and we enter some text in the row level for each item. when we see the PLD priview
Items are displaying but the text below the items are not displaying
it displays an empty row after each item
How should i print text in the PLD
I required in this following Format
ITEMCODE DESCRIPTION QTY
001 XYZ 20
this is capital Good Item
002 PQR 30
this is Raw Material
In this above format
I didnt get the text below the Items
Can any one suggest the correct answerThanks for your reply
I already select the linetext field from table POR10 and kept it in the PLD
but i didnt get my required format
after giving that line text field iam getting
in this way
S.No. ITEMCODE DESCRIPTION QTY
1 001 XYZ 20
this is Capital Goods
2
this is Capital Goods
the text is repeating twice
I Put the ItemDescription field in POR1 and Line Text Field in POR10 in the same repetitve area -
How to print text in JClient ?
How to print CLOB content from an JClient application built in JDeveloper 9.0.3 ?
Peter,
the way you have to do it in all Swing applications. You use the Java print API for this. There is no native support for printing in JClient.
Frank -
How to print text bigger in size on whole screen on container?
Hi Friends,
My requirement is print text as big as possible on custom container.
Can any one guide me how to do this i am getting display but not big as i want
i am using class 'CL_DD_DOCUMENT' and method add_text to do this.
following code i have written for doing this only i want big display?
DATA: gv_message TYPE REF TO cl_dd_document. "bin display
CREATE OBJECT gv_message.
CALL METHOD gv_message->add_text
EXPORTING
text = gv_msg2 "text-s01
sap_style = co_style
sap_fontstyle = co_serif
sap_fontsize = cl_dd_area=>large "co_font
sap_emphasis = cl_dd_area=>strong. "co_emphasis
fix_lines = 'X'.
merge document
CALL METHOD gv_message->merge_document.
display document
CALL METHOD gv_message->display_document
EXPORTING
reuse_control = 'X'
container = 'T_MSG'
EXCEPTIONS
html_display_error = 1.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. -
Funtion is returning jstring, how to print it in java code
Plz let me know how to print a jstirng which is returning by a native function in java.
When i use System.out.print(view());
it gives me error.
what i shoulr do with jsting so that i can use/print it in java.dscdscWhat do you mean by that?
-
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
Maybe you are looking for
-
In pages 5, can we skip page numbering for certain pages? For example if i have a document with 10 pages, can I remove the page number in the 4th page and continue numbering from 5th page? Normal numbering: 1,2,3,4,5,6,7,8,9,10 I want to make it: 1,2
-
How to install Delegated Administrator 4.5 into an existing directory.
I have installed iDA 4.5 in a test environment and found that it works beautifully for what I need it to do. The problem that I have is that our existing directory is so different from the one used by iDA that I have no idea how to successfully make
-
Exchange 2010 Tracking Delivery to Remote Server
We're partway through a migration from Exchange 2003 to Exchange 2013. Currently we have our Exchange 2010 environment up and running for several weeks. I'm trying to determine how to use the message tracking in Exchange 2010 to verify delivery of ma
-
Illustrator 10 - Updating Adobe Online Components
My Illustrator won't let me in to my files because it says it needs to download 2 files. Specifically it says "Updating Adobe Online Components..." It downloads the first thing and then It gets locked on this screen. We have tried restarting the comp
-
I had another computer crash. I have all my music on an external hard drive after the last crash. I got a new hard drive and installed itunes on it. Set the path for the external drive and nothing. Can someone help me find my music. I know it is ther