I don't understand the error. It complains for endif while it is there.
{% if pdf_enable %}
{% download_url request.get_full_path "Download as Excel" %}
{% endif %}
Am I missing something?
You need to load the custom template tag set containing the download_url tag.
For example, if the download_url tag was in a module called download_tags, you would add the following to your template.
{% load download_tags %}
download_urltemplate tag? - Alasdair