f %}

      function set_current_page(current_page) {
        var form_data = new FormData();
        form_data.append('pdf_id', '{{ pdf_id }}')
        form_data.append('current_page', current_page)

        fetch("{% url 'update_page'%}", {
          method: "POST",
          body: form_data,
          headers: {
            'X-CSRFToken': '{{ csrf_token }}',
          },
        });
      }

      {% if user_view_bool %}
      // send file via the fetch api to the backend
      function send_pdf_file(fil