-2

It is possibile save a HTML page to PDF choosing which fields can be compiled after saving directly from the PDF document?

(I would only use jquery if possible)

Thanks in advance

Sieen
  • 68
  • 2
  • 11

1 Answers1

1

This is a poorly-asked question (no offense) which is leading to the downvotes I believe, but yes it is possible. Start here. Html2Pdf I allows "creating" a pdf form field, so you'll have to just coordinate that between the client and the server side when telling what you want to render.

The video's in French, but is very helpful regardless.

UPDATE: this SO question also is relevant and has plenty of good information, whether you'd be using PHP or not. Also, after re-reading your "requirements" in your question, you might be able to pull off some wizardry with pdf.js if you're just trying to stay client-side, or a google search for "render pdf from html using javascript" or something to that affect (not being glib or condescending -- sometimes knowing where to start in Google searches is half the battle).

ZagNut
  • 1,431
  • 15
  • 20
  • You probably are right because your answer is not what I was looking for. I'm sorry, but my English isn't so good, I try to explain agian... I'm interested in saving an HTML page in PDF format but deciding (from the HTML page) which fields can be compiled directly from Adobe Acrobat using the option "Fill & Sign" – Sieen Aug 13 '17 at 15:24
  • @Sieen i believe this is what you are looking for. You have to dig in it to learn how to use it and how to generate a pdf from an html template. 1) use your online html form to select whatever option you want 2) hit submit 3) on server side generate your pdf the way you wish including fields selected . A few example to start from https://github.com/spipu/html2pdf/tree/master/examples . – G-Cyrillus Aug 13 '17 at 16:34
  • @Sieen deciding on the client side what to render or not really comes down to just flagging blocks of data then sending only the flagged data to render. G-Cyr is also pointing that out. Your steps with be: (1) load html page for user (2) user updates form and submits it (3) you handle submission event client-side, and gather user data (4) you send user data (and anything else) to the pdf render method (either client-side call or AJAX call to server) (5) you "return" rendered pdf to user either as file or onscreen using said pdf.js library or equivalent – ZagNut Aug 14 '17 at 12:31
  • Hey @ZagNut the website in your profile is throwing Microsoft SQL errors; just a fyi. – John Dec 22 '21 at 16:17