Reputation: 1079
In my HTML page, 2 diff chart is available that's the way I convert full page as an image and after it saves as pdf using jspdf. I need set header or footer before it update in html2Canvas and jspdf. but how can I add header and footer in pdf?
Upvotes: 0
Views: 327
Reputation: 1
You don't add headers and footers in PDF. Read more about PDF, it is a low level standardized format, where the primitive operations are something like move to coordinate x=340, y=450 (in some unit, perhaps tenth of millimeters or typographical points) and change font to Helvetica 10 and show the a
letter. Read the PDF standard.
You may generate PDF from some higher level text format. I recommend reading about LaTeX and Lout and many other such document processors. You could consider generating some LaTeX or Lout file, then converting it to PDF (by running some pdflatex
or lout
process).
You could use a PDF generating library such as JagPDF and many others.
You might find HTML to PDF converters. Most web browsers have one. Look also into pandoc.
Upvotes: 1