Hello,
I have a ByteArrayOutputStream, is it possible to print this through the browser? I have looked for examples and to my surprise I have found none.
Thanks.
Printable View
Hello,
I have a ByteArrayOutputStream, is it possible to print this through the browser? I have looked for examples and to my surprise I have found none.
Thanks.
Can you explain this?Quote:
to print this through the browser?
Is the output to be read by the browser? What is the browser supposed to do with it?
Normally browser's either read html files from a disk or ask servers for some html.
Or is the output do be displayed in an applet being hosted by the browser?
Or do you want an applet running in a browser to be able to user the local printer?
Sorry,
I have a ByteArrayOutputStream. I do not want to display what is whitin the ByteArrayOutputStream to the screen but use the browsers print functionality to print it.
For instance in IE if you click file > print I want to be able to send the ByteArrayOutputStream to that browser functionality.
Do you know if this is possible?
Thanks
What does the browser's "Print" button print?
Is it the contents of a rendered HTML that is being shown?
Are you asking: If there is a way to tell the browser to print something else besides what it is showing in its window?
Are there any browser plugins that can intercept the Print button press and do their own thing?
You could possibly code a button on your webpage that prints the byteoutputstream, but I don't think you can make the browser only print that using its built in print function.
tahnsk again for your reply.
I found that if I use iText and the the line:
it will do what I need.Code:com.lowagie.tools.Executable.printDocument("c:/test.pdf");
However I want to do this without a file as I do not want to save it. I need to find a way to print with a stream.
Thanks again
Use the Java Print Service?
Of course we still have no idea where you are planning on printing from...