Java printing - problem with large strings
Up until recently I have had zero exposure to Java printing but now I must...so I have to print out a String that could be more than a page of 12pt text with formatting. Just simple new lines, and a page number (x of y) at the bottom.
Can anyone help as my trials with drawstring() don't do new lines and I think it won't take a new page.
How do I dolve this problem?
If it helps the text is taken from a JTextArea and just has to be sans-serif 12pt.
Any help greatly appreciated, even a SIMPLE tutorial.
(I have goolged for it but found nothing that I think helps.)
This is the code im using to try and print:
BUT no paper...its driving me nuts!
i am abt 15 min old with java printing ... googled a bit and came here ... i saw another code available online at http://www-106.ibm.com/developerwork...ary/j-mer0322/
the difference is the code in the above listing is for PNG ... i changed tht to AUTODETECT and it did print something (on paper).... havent checked out multiline multipage yet ... hope it helps
edited: was able to print multipage document ... but the line does not wrap ... line longer than the length of the page is not printed
|All times are GMT -5. The time now is 12:19 PM.|