![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am struggling with the following problem: a Java program generates a report which consists of a number of text strings, horizontal lines and (possibly) images. All report elements have absolute position WRT the top of the page. I need to convert the report to HTML format to either e-mail it, or make it accessible over the Web. Generating the necessary CSS constructs to set the fonts, text positions and straight lines is not a problem. Handling the images is. They are stored in a database as BLOBs, and although the Java program can recreate .jpeg or .gif files for every image retrieved from the DB, the question (to me, at least) is: how should the HTML content that includes images be saved? It cannot go all into one file (HTML does not support embedding images' binary data inside itself); should I create a temporary directory with separate files for HTML and images so that it can be served over the Web? Is there any way to stream the whole thing to a Web browser without saving it as files first? Any suggestion, especially from those who work in Java environment, will be appreciated. Alex Molochnikov Gestalt Corporation |
#3
| |||
| |||
|
|
I am struggling with the following problem: a Java program generates a report which consists of a number of text strings, horizontal lines and (possibly) images. All report elements have absolute position WRT the top of the page. I need to convert the report to HTML format to either e-mail it, or make it accessible over the Web. Generating the necessary CSS constructs to set the fonts, text positions and straight lines is not a problem. Handling the images is. They are stored in a database as BLOBs, and although the Java program can recreate .jpeg or .gif files for every image retrieved from the DB, the question (to me, at least) is: how should the HTML content that includes images be saved? It cannot go all into one file (HTML does not support embedding images' binary data inside itself); should I create a temporary directory with separate files for HTML and images so that it can be served over the Web? Is there any way to stream the whole thing to a Web browser without saving it as files first? Any suggestion, especially from those who work in Java environment, will be appreciated. Alex Molochnikov Gestalt Corporation |
#4
| |||
| |||
|
|
In alt.html,alt.html.tags Alexandr Molochnikov said: Generating the necessary CSS constructs to set the fonts, text positions and straight lines is not a problem. Handling the images is. They are stored in a database as BLOBs, very inefficient the question (to me, at least) is: how should the HTML content that includes images be saved? It cannot go all into one file (HTML does not support embedding images' binary data inside itself); yes it does http://moreshit.usenetshit.info/base64-thingy.shit supported by modern browsers and old crappy NS4.x. html has an attribute length limit of about 65k characters but browser support may be less. should I create a temporary directory with separate files for HTML and images so that it can be served over the Web? that would be best -- the facts and opinions expressed by brucies l i t t l e v o i c e s are not necessarily the same as those held by brucie. |
#5
| |||
| |||
|
|
Alexandr Molochnikov wrote: I am struggling with the following problem: a Java program generates a report which consists of a number of text strings, horizontal lines and (possibly) images. All report elements have absolute position WRT the top of the page. I need to convert the report to HTML format to either e-mail it, or make it accessible over the Web. Generating the necessary CSS constructs to set the fonts, text positions and straight lines is not a problem. Handling the images is. They are stored in a database as BLOBs, and although the Java program can recreate .jpeg or .gif files for every image retrieved from the DB, the question (to me, at least) is: how should the HTML content that includes images be saved? It cannot go all into one file (HTML does not support embedding images' binary data inside itself); should I create a temporary directory with separate files for HTML and images so that it can be served over the Web? Is there any way to stream the whole thing to a Web browser without saving it as files first? Any suggestion, especially from those who work in Java environment, will be appreciated. Alex Molochnikov Gestalt Corporation And... "no" -- x theSpaceGirl (miranda) # lead designer @ http://www.dhnewmedia.com # # remove NO SPAM to email, or use form on website # |
#6
| |||
| |||
|
|
SpaceGirl, you lost me. Your first response: XML is your friend Your next response: And... "no" I suppose these are the responses to different parts of my post, but which ones? (Esp. the "no" response). Alex. |
#7
| |||
| |||
|
|
Alexandr Molochnikov wrote: SpaceGirl, you lost me. Your first response: XML is your friend Your next response: And... "no" I suppose these are the responses to different parts of my post, but which ones? (Esp. the "no" response). Alex. Okay, XML for handling the stuff when it comes out of your database, or even store it natively in XML. Makes life SOOOOOOOO much easier if you're groing to translate it into other stuff. Especially reports. Using XSLT you could turn your XML report into a PDF, an XHTML web page, a CSV that'll load happily in Excel... whatever just using a little XSLT. As for the images, leave them as they are, spit them out as jpegs as and when needed. We do this for one project; we have scriptlets that generate reports in XML, and using XSLT and CSS they get turned into web pages. In turn we use XSLT to let the user save reports as PDF and CSV. Also the reports contain graphs generated by CEWOLF, which get spat out as jpegs, which can easily be sent to the users browser without actually having to be stored on the server anywhere. So, a combination of XML, XSLT, JSTL & scriptlets, and a bit of CSS on the front end. Works really well. -- x theSpaceGirl (miranda) # lead designer @ http://www.dhnewmedia.com # # remove NO SPAM to email, or use form on website # |
![]() |
| Thread Tools | |
| Display Modes | |
| |