docs: def render_to_pdf(template, context, using=None, request=None, encoding="utf-8", **kwargs):
      """
      Create PDF document from Django html template.
  
      :param str template: Path to Django template
      :param dict context: Template context
      :param using: Optional Django template engine
      :param request: Django HTTP request
      :type request: :class:`django.http.HttpRequest`
  
      :returns: rendered PDF
      :rtype: :class:`bytes`
  
      :raises: :exc:`~easy_pdf.exceptions.PDFRenderingError`, :exc:`~easy_pdf.exceptions.UnsupportedMediaPathException`
      """
      content = loader.render_to_string(template, context, request=request, using=using)
      return html_to_pdf(content, encoding, **kwargs)