[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-user
Subject:    Re: Using <fo:external-graphic ... /> in applet
From:       dahepe <peger () gmx ! net>
Date:       2009-12-15 13:15:31
Message-ID: 26794599.post () talk ! nabble ! com
[Download RAW message or body]

Hi,

I'm really surprised, that no one else seems to have this problem...

At least we found a workaround to make the templates and the
&lt;external-graphic ... /&gt; work for us. There seem to be two feasible
solutions that don't require too much changes:

  
Implement a custom 
http://java.sun.com/javase/6/docs/api/javax/xml/transform/URIResolver.html
URIResolver , that loads the external references in the template in advance
and make the Transformer use this resolver. As the external references might
also come from included files, you will have to generate the FO first and
than fetch the referenced graphics in the URIResolver.
  
Replace the used SecurityManager by a custom implementation, that allows
access to the requested resources. As the SecurityManager is a system (JVM)
wide setting you should probably replace the SecurityManager after
generation of the PDF again with the one used previously.


Best Regards
-- 
View this message in context: \
http://old.nabble.com/Using-%3Cfo%3Aexternal-graphic-...--%3E-in-applet-tp26628106p26794599.html
 Sent from the FOP - Users mailing list archive at Nabble.com.


[Attachment #3 (text/html)]

Hi,
<p>
I'm really surprised, that no one else seems to have this problem...
<p>
At least we found a workaround to make the templates and the \
<code>&lt;external-graphic ... /&gt;</code> work for us. There seem to be two \
feasible solutions that don't require too much changes: <ol>
  <li>Implement a custom <code><a \
href="http://java.sun.com/javase/6/docs/api/javax/xml/transform/URIResolver.html" \
target="_top" rel="nofollow">URIResolver</a></code>, that loads the external \
references in the template in advance and make the <code>Transformer</code> use this \
resolver. As the external references might also come from included files, you will \
have to generate the FO first and than fetch the referenced graphics in the \
<code>URIResolver</code>.</li>  <li>Replace the used <code>SecurityManager</code> by \
a custom implementation, that allows access to the requested resources. As the \
<code>SecurityManager</code> is a system (JVM) wide setting you should probably \
replace the <code>SecurityManager</code> after generation of the PDF again with the \
one used previously.</li> </ol>
<p>
Best Regards
<br><hr align="left" width="300">
View this message in context: <a \
href="http://old.nabble.com/Using-%3Cfo%3Aexternal-graphic-...--%3E-in-applet-tp26628106p26794599.html">Re: \
Using <fo:external-graphic ... /> in applet</a><br> Sent from the <a \
href="http://old.nabble.com/FOP---Users-f353.html">FOP - Users mailing list \
archive</a> at Nabble.com.<br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic