장고 템플릿을 pdf로 변환할 일이 있어서
xhtml2pdf 라이브러리를 사용함 (pip install xhtml2pdf)
xhtml2pdf 에서 pisa 모듈을 임포트 한 후
pisa.createPDF()함수를 사용
-> pdf가 생성되었으나... 이 pdf가 깨짐!!!!!!!!!!! 으아아아...
pisaStatus = pisa.CreatePDF(html.encode("UTF-8"), dest=response, link_callback=link_callback
)