{% load wagtailcore_tags %}
{% with block.value as pdf %}

{{ pdf.document.title }}

{% if pdf.embed_mode == 'IFRAME' %} {% elif pdf.embed_mode == 'EMBED' %} {% else %}
Click here to open the document in new window {% endif %} {% endwith %}