Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes Java Print Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Print" Watch "Java Print" New topic
Author

Java Print

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
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

Joined: Oct 08, 2008
Posts: 492
someone please help me to resolve this issue
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38472
    
  23
Too difficult a question for beginners. Moving.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi there,

This has probably something to do with Character Encoding. What character encoding are you using? Is it consistent throughout your code?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Martin,

Thanks for the reply. Am new to java, I submitted the full code. Please help me.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

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...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java Print