File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

printable file

 
Per Lovdinger
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to create a printable file.
What is the correct way to indicate Linefeed, is there
a carriage return needed ? Does the order matter ?

What is the correct way to indicate new page ?
regards Per
 
Mikael Jonasson
Ranch Hand
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly do you mean by "a printable file"?
/Mike
 
Per Lovdinger
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's say I want to create a file in such a way that it includes the proper escape-kodes for linefeed and newPage.
So that when I open the file in notepad and print it, it will for example print 6 lines,break for newpage, print next 5 lines and
so on.

I want to write a file to disk and when I open that file in
notepad
 
Mikael Jonasson
Ranch Hand
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think notepad has support for page-break.
Otherwise, ascii 13 is Carrige Return(CR).
I think 10 is Linefeed and 12 is formfeed, or if it is the other way around.
As far as notpad is concerned, I thing you only need CR for it to work.
Doesn't the \n notation work in Java (I'm mainly used to C++). If so, that will work as new line.
/Mike
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Count 80 characters.
Go backwards until you find a space.
Insert "\n".
Start over.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic