0

I want to be able to open up documents containing a combination of one or two pictures and text from java. The documents don't have to be pretty, but I need to be able to switch documents relatively quickly. I'm trying to figure out what the easiest method to do this is.

I can save the documents in whatever format is easiest for me, for instance html or PDF. But the documents must be somewhat easy to modify or generate new ones. I don't care if the document is displayed within a java frame or by an external tool so long as the tool is common enough to be installed on most OS and I can switch documents quickly and without too much hassle. This is an internal tool so it doesn't have to work at professional level quality.

Unfortunately, various company limitations make it a real hassle to get approval to use open source packages that haven't been pre-approved. So I can't do the obvious thing and grab an open source implementation of PDF or HTML reader for java.

So, any suggestions on the easiest format for my documents and how to read it?

drew
  • 577
  • 2
  • 8
  • 20
  • So long as a `JEditorPane` supports the HTML elements of interest, I suggest JEP+HTML. See an [example](http://stackoverflow.com/questions/6373621/loading-images-from-jars-for-swing-html/6373907#6373907). – Andrew Thompson Jun 30 '11 at 13:51

1 Answers1

1

You can use XHTML. So, your document will be directory that contains HTML document and image files as-is. you do not need anything beyond JDK to implement this and can use any browser to view such document. Modification is easy too.

Note: I said XHTML as a HTML that can be parsed using regular XML parser. I think it is the best choice for you.

AlexR
  • 114,158
  • 16
  • 130
  • 208