Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Print

 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a Java bean which prints a text files which is generated by oracle. Am using Jeditorpane for printing, Curently this is printingall types of files like html, text and rtf files. But this java bean is not able to identify the end of page.

its simply printing a small square box in place of end of page character. Could some one please help me to resolve the issue.


 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
someone please help me to resolve this issue
 
Campbell Ritchie
Sheriff
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too difficult a question for beginners. Moving.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

This has probably something to do with Character Encoding. What character encoding are you using? Is it consistent throughout your code?
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin,

Thanks for the reply. Am new to java, I submitted the full code. Please help me.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, firstly, you need to look up encoding, here are some articles to help:

here
and
here

Then start looking at the Javadocs for some of the methods that you are using to display and translate text, can you see versions of that same method that take an encoding? You'll want to experiment with those...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic