[ 
https://issues.apache.org/jira/browse/FOP-2601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

adam Retter reopened FOP-2601:
------------------------------

Unfortunately this was closed in favour of FOP-2532.

However FOP-2532 does not solve our issue. The change in FOP-2532 assumes that 
the URL can be read by {{java.net.URLConnection}} by using

{code:java}
URLConnection conn = url.openConnection();
try {
    return conn.getLastModified();

{code}

Unfortunately the URLs used in our system are for resources inside the database 
(eXist-db) and these are not resolvable by {{URLConnection}}. {{URLConnection}} 
really only understands http, https, file and jar URL schemes and so is not 
helpful here.

The patch I provided extended {{org.apache.xmlgraphics.io.ResourceResolver}} 
specifically for that reason. I would ask that you again review my patch (which 
I have updated for the latest Apache FOP and XML Graphics), as it adds the 
support that we (and presumably others) will need in an extensible way.

> [PATCH] Cannot resolve fonts from custom URI schemes
> ----------------------------------------------------
>
>                 Key: FOP-2601
>                 URL: https://issues.apache.org/jira/browse/FOP-2601
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: adam Retter
>         Attachments: fop-last-modified-resolution.patch, 
> xmlgraphics-commons-last-modified-resolution.patch
>
>
> I attach two patches (one for xmlgraphics-commons and one for fop) that allow 
> fonts to be resolved from custom URI schemes. Previously this only worked if 
> you disabled font caching, because the font cache tries to get the last 
> modified date using java.io.File, which will fail for fonts that are resolved 
> from locations other than the filesystem. The fix is relatively trivial, 
> basically the UriResolver needs to also be able to resolve the last modified 
> date of the resource or return -1 if it is not possible.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to