Which is the best way to create PDF in django?

I want to know the best way to create PDF on basis of performance and optimization? Basically as i know, create pdf from two ways-

1. Using HTML - Build HTMl page and convert into PDF through string conversion method.

2. Using Methods - In this, need to define every thing through some methods - like shape, text, font etc.

So here is my question:

  1. Which one is the way to generate PDF with some explanation ?

Please recommend the best PDF lib with django compatibility. Also please share resourse if you can.

Thank you