0

I want to create a cv maker that takes people's info and makes a pdf out of it but I have not worked with PDFs before. I have been searching the internet and I don't know where to start. I get packages like jspdf, react-pdf and some others, some of which would make me upload a pdf file and then it would preview a page of the uploaded pdf. But that's not what I want. I want a package that can easily generate a pdf from my html and CSS designs to pdf, which can be previewed on my react app and downloadable as pdf file. Or maybe I can just use vanilla JavaScript instead of a package? Or maybe I would have to do the pdf generation on the backend which I don't prefer - I would use Django on the backend?

Please help me out!!

Ibrahim
  • 67
  • 1
  • 9
  • Does this answer your question: https://stackoverflow.com/questions/63538459/htmltocanvas-crops-svg/63539058#63539058 – SakoBu Sep 18 '20 at 07:34
  • ok, I think it does, Thank you. so I use html2canvas and jspdf to convert from html to pdf. That way I can preview the html as if they were pdfs and actually download as the pdf!! – Ibrahim Sep 18 '20 at 16:42
  • I believe html2canvas will generate a PDF that is just an image. So no selectable/searchable text, and no vector content (so blurry when zoomed in). I am not aware of any general purpose html to pdf that works entirely client side. Unless your HTML is (very) simple, you will get much better results doing html2pdf conversion server side. – Ryan Sep 18 '20 at 17:21
  • Thank you Ryan, I've been trying xhtml2pdf on the django side (since html2pdf says it is not supported on windows) but xhtml2pdf only understands very little CSS, so I can't make a well designed pdf. Perhaps you can suggest another package or something I can read to know how to design pdf with basic CSS syntax using xhtml2pdf. – Ibrahim Sep 20 '20 at 06:20

0 Answers0