My suggestion: Create a separate Servlet that is only responsible to return the byte stream for your TIFF image. Then modify your current servlet to simply pass the correct URL as a parameter to the XSLT process. That URL must be so that FOP can load the TIFF image directory from your database via that newly create Servlet. That's the easy and quick way. Below two other ways to solve this puzzle:
Simply passing in an (ByteArray)InputStream as XSLT parameter won't work. It might (!) work if the the TIFF image were encoded as a RFC 2397 data URL [1] and a corresponding URLHandler were present. But then you would probably have to pass it as a String, not as an InputStream. [1] http://www.ietf.org/rfc/rfc2397.txt Yet another way is to create a custom URL handler [2]. In this approach you create your own URL scheme, for example "dbimages://testDB/20040326110116". This lets you avoid the Servlet if you're concerned about not allowing outside access directly to your images in the database. But it's probably a bit more work if you already know how to create Servlets. [2] http://java.sun.com/developer/onlineTraining/protocolhandlers/ I hope this helps and good luck. On 06.04.2004 23:59:58 Jerry wrote: > John and folks, > > First of all, thank you for your help. > > I am still struggling with my PDF conversion. I am a > little headache with this. We have a lot of FOP/JAXP > professional here and hopefully I can get your > suggestion. > > From what you suggested me, I read a lot of reference > and resources. Now I tryed to use JAXP and FOP to > convert the binary tiff data into PDF format and I > got an error "Error 500:java.io.ByteArrayInputStream". > I know something wrong with my code. I just couldn't > figure out how to fix it. Below is the partcial codes > I wrote. Can you please take a look at my code and > give me your recommandation? I know I already > bothered you too much. You are not supposed to spend > time on this for me. If you don't have time, I totally > understand that. If you could help me, I will greatly > appreciate it. I use * to mark the part which I have > problem with. I also enclosed my XSL file here for > your reference. -- Jeremias Maerki <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
