Class 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 Detail

      • PDFResourceResolver

        public PDFResourceResolver()
    • Method Detail

      • getResource

        public org.apache.xmlgraphics.io.Resource getResource​(URI uri)
                                                       throws IOException
        Specified by:
        getResource in interface org.apache.xmlgraphics.io.ResourceResolver
        Throws:
        IOException
      • getOutputStream

        public OutputStream getOutputStream​(URI uri)
                                     throws IOException
        Specified by:
        getOutputStream in interface org.apache.xmlgraphics.io.ResourceResolver
        Throws:
        IOException