Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / March 2005

Tip: Looking for answers? Try searching our database.

Looking for a component for previewing formatted text

Thread view: 
Thomas Baruchel - 25 Mar 2005 07:43 GMT
Hi, I am writing a program which should include a "previewing system"
before the printing job. What I have to preview in only formatted text,
and the text editors included in the JVM would be fine if only the text
could be justified ; I only need :
  - justification
  - bold/italic
Really nothing else, and not even any editing feature (the user wants
only to see the document, not to change it). For the moment, I have to
very heavy solutions :
  - include FOP in the whole stuff (I want to give a single big JAR to
    the user, because it will be installed and reinstalled on several
    machines by people having no idea of classpath), and transform my
    XML document into XSL-FO before previewing it with a previewer
    hacked from the "official" previewer of FOP (current solution)
  - include ToastScript in the whole stuff, and convert my XML document
    into PostScript (which I can do, by using some special PostScript
    headers, like QuikScript (with no 'c' ;-) or tinydict.
What is sad is my document is a very simple XML one, that I could
convert easely to HTML or XHTML. Unfortunately the CSS2 support of Sun
hasn't the feature I want (justification). Do you know a little, simple,
free, HTML previewer having this feature, that I could ecapsulate in my
own program ?

Regards,

Signature

Thomas Baruchel
Pour m'écrire : http://cerbermail.com/?OEyHGNQFEa

John McGrath - 27 Mar 2005 23:53 GMT
> What I have to preview in only formatted text, and the text editors
> included in the JVM would be fine if only the text could be justified ;
> I only need :
>    - justification
>    - bold/italic

The bold and italic are not a problem, but unfortunately, justified is.
JTextPane is supposed to be able to handle that, but when you specify an
alignment of justified, it actually centers the text.  This bug has been
outstanding for years.  The Sun Bug Parade report is at:

  http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4263904

An interesting note has been added to the report: "we are targeting to fix
this bug for mustang release".  That is Java 6 (a.k.a. 1.6).  So if you
can wait a year or so, ...

Signature

Regards,

John McGrath



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.