Friday, July 31, 2009

How to set the text file size dynamically from java code while writing to a file using OubjectOutputStream?

I have written some contents into a text file ie to a notepad in java. How can i set size for that file? That is I have to remove the empty space in the notepad after i wrote the contents in it. Bec while printing that text file using dot matrix printer the paper is scrolling till the end of the file. The printer should stop after it reach the end of file. It shoud not scroll the empty paper. Plz help me..

How to set the text file size dynamically from java code while writing to a file using OubjectOutputStream?
A text file normaly contains an end-of-file marker at the point at which the file ends.


When you open this file using any text editor (say - notepad) - this character is not viewable.


Now when you print this file - this end-of-file character is send to the printer, which when sensing the same generate a form-feed which will cause the printer to scroll to the next page.





Also in dot matrix you can define paper-size


Check out:-


http://support.microsoft.com/default.asp...
Reply:get some sample are try


http://www.planetsourcecode.com


No comments:

Post a Comment