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