com.xpn.xwiki.pdf.impl
Class PDFURIResolver
java.lang.Object
com.xpn.xwiki.pdf.impl.PDFURIResolver
- All Implemented Interfaces:
- URIResolver
public class PDFURIResolver
- extends Object
- implements URIResolver
Resolves URIs sent by Apache FOP to embed images in the exported PDF. The strategy is the following:
- When an attachment is rendered during the export (specifically when
pdf.vm
is rendered), the
PdfURLFactory
is called and it saves the Attachment Entity Reference in a map in the XWiki Context
- When Apache FOP embeds an image it calls this URI Resolver and we try to locate the Attachment Entity
Reference from that map and return the attachment stream.
- Attachment links do not call the Resolver and are thus exported correctly using a full URL to the XWiki
server
- Since:
- 5.0RC1
- Version:
- $Id: e8b4b6d1e4081fd3ff040f47c83a603c94423d76 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PDFURIResolver
public PDFURIResolver(XWikiContext context)
- Parameters:
context
- the XWiki Context from where we try to find the attachment map saved in the PdfURLFactory
earlier on
resolve
public Source resolve(String href,
String base)
throws TransformerException
- Specified by:
resolve
in interface URIResolver
- Throws:
TransformerException
Copyright © 2004-2013 XWiki. All Rights Reserved.