If you create a page and place the download component on the page and then configure it to make the example PDF available for downloading, you will notice that the URL used for the PDF has not changed. This is because even though you defined the necessary mappings (as we did above) and you can test them to make sure they work, AEM by default only uses the mapping rules for URLs associated with HTML pages.
So links to things like PDFs stored in the DAM never get rewritten. This behavior can be overridden by deploying a custom implementation of the com.day.cq.rewriter.pipeline.RequestRewriter service into the OSGi container. If you do this, AEM picks up the custom implementation and consults it when it comes to rewriting URLs in pages.