msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, 'text/html')
msg.attach('pdf_filename.pdf', response.rendered_content, 'application/pdf')
msg.send()
Any way to create PDF file with wkhtmltopdf without returning HttpResponse or using URL? I just want to attach PDF file to email