title: Most used approach to generate a PDF report (JavaScript, node.js)?
body: <p>Can anyone who worked on something like this describe the general process? I'm very confused right now. By report I mean a visually appealing document with logo, tables, headers and footers, and the data will be retrieved dynamically.</p>
  
  <p>The approaches I looked at are:</p>
  
  <ol>
  <li><p>Use a server side library (node.js module) that generates the PDF. Send the string representation as response with <code>Content-Type: application/pdf</code>.
  Problem: I chose PDFKit, but it doesn't work and no content shows up at all. It uses PDF 1.3, which is old.</p></li>
  <li><p>Generate PDF on client side.
  Problem: Most popular library seems to be jsPDF, but it's not very capable of producing sophisticated-looking documents.</p></li>
  <li><p>Write template in PDF source code and fill in the data on server side.
  Problem: The encoding is weird, for example if I just do <code>doc.text("1")</code>, a lot of unrecognizable characters appear for just the string "1". I'm very confused about this.</p></li>
  </ol>
  
  <p>Finally, it'll be super helpful if anyone provides a link that can help me understand the encoding! It's super confusing to me.</p>
  
  <p>Any experience with similar tasks is much appreciated!</p>