RE: problem resolve external image resource with fop
Hmmm I think you are talking about how we do it We process contents of web pages from the web pulling in data etc from remote sites and putting them into a template, A small example here (imagedataservlet returns xml containing the width and height in pixels of an image) http://www.example.com/ImageDataServlet-1.0/ImageDataServlet?imgsr c= Kindest regards Theresa Forster Senior Software Developer -Original Message- From: Robyp1 [mailto:rob...@hotmail.com] Sent: 17 May 2011 08:57 To: fop-users@xmlgraphics.apache.org Subject: problem resolve external image resource with fop hi, i have a problem using a fop in a web application. First of all, this is not only only a kind a web application but a maven web application with others dependencies like libs or maven module (not web) linked. One kind of this lib/maven module keep the source with embed a fop code for translate xml into pdf using an xsl stylesheet. My problem is that the user request is processed by a servlet. I try to use URIResolver with ServletContext and "servlet-context:" for accessing external resource in xsl with "". This is work fine but i prefere that fop access resource without serveletContext but with the ClassLoader without placing images in a context web root. I try to place my images in a application class-path where fop is embed but this not work. Anybody now how can i solve my problem? How can find where fop external resource would be place? Thank you very much Roby -- View this message in context: http://old.nabble.com/problem-resolve-external-image-resource-with-fop-tp316 35640p31635640.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1325 / Virus Database: 1509/3644 - Release Date: 05/17/11 - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: problem resolve external image resource with fop
Roby, then don't use the ServletContextURIResolver and instead write your own URIResolver which then can work exactly how you want it. You could define your own "classpath:" URI scheme. You could copy FOP's ServletContextURIResolver and adjust it to your liking. Then just set your new URIResolver instead of the ServletContextURIResolver using FopFactory.setURIResolver(URIResolver). That allows FOP to find your images the way you want FOP to. HTH On 17.05.2011 09:57:29 Robyp1 wrote: > > hi, > > i have a problem using a fop in a web application. First of all, this is > not only only a kind a web application but a maven web application with > others dependencies like libs or maven module (not web) linked. One kind of > this lib/maven module keep the source with embed a fop code for translate > xml into pdf using an xsl stylesheet. My problem is that the user request is > processed by a servlet. I try to use URIResolver with ServletContext and > "servlet-context:" for accessing external resource in xsl with > "". This is work fine but i prefere that fop > access resource without serveletContext but with the ClassLoader without > placing images in a context web root. I try to place my images in a > application class-path where fop is embed but this not work. Anybody now how > can i solve my problem? How can find where fop external resource would be > place? > > Thank you very much > > Roby > -- > View this message in context: > http://old.nabble.com/problem-resolve-external-image-resource-with-fop-tp31635640p31635640.html > Sent from the FOP - Users mailing list archive at Nabble.com. > Jeremias Maerki - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
problem resolve external image resource with fop
hi, i have a problem using a fop in a web application. First of all, this is not only only a kind a web application but a maven web application with others dependencies like libs or maven module (not web) linked. One kind of this lib/maven module keep the source with embed a fop code for translate xml into pdf using an xsl stylesheet. My problem is that the user request is processed by a servlet. I try to use URIResolver with ServletContext and "servlet-context:" for accessing external resource in xsl with "". This is work fine but i prefere that fop access resource without serveletContext but with the ClassLoader without placing images in a context web root. I try to place my images in a application class-path where fop is embed but this not work. Anybody now how can i solve my problem? How can find where fop external resource would be place? Thank you very much Roby -- View this message in context: http://old.nabble.com/problem-resolve-external-image-resource-with-fop-tp31635640p31635640.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org