Package com.xpn.xwiki.pdf.impl
Class PDFResourceResolver
- java.lang.Object
-
- com.xpn.xwiki.pdf.impl.PDFResourceResolver
-
- All Implemented Interfaces:
org.apache.xmlgraphics.io.ResourceResolver
@Component(roles=PDFResourceResolver.class) @Singleton public class PDFResourceResolver extends Object implements org.apache.xmlgraphics.io.ResourceResolver
Resolves URIs sent by Apache FOP to embed images in the exported PDF. We bypass the standard resource resolver provided for Resource that XWiki handles since that resolver simpy opens an un-authenticated URL Connection to get the content and if the XWiki resource is protected (e.g. if an attachment is located in a document that requires some permission to access), then the exported content in the PDF will be empty.- Since:
- 7.4M2
- Version:
- $Id: 26f95358c0bd2be4a53dd65abc0ad0483266aa0d $
-
-
Constructor Summary
Constructors Constructor Description PDFResourceResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputStream
getOutputStream(URI uri)
org.apache.xmlgraphics.io.Resource
getResource(URI uri)
-
-
-
Method Detail
-
getResource
public org.apache.xmlgraphics.io.Resource getResource(URI uri) throws IOException
- Specified by:
getResource
in interfaceorg.apache.xmlgraphics.io.ResourceResolver
- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream(URI uri) throws IOException
- Specified by:
getOutputStream
in interfaceorg.apache.xmlgraphics.io.ResourceResolver
- Throws:
IOException
-
-