0

I am trying to create an online CV maker.I intend to use HTML form to get input from user and then put this text into a template/file. I am not able to figure out that how can i do so using JavaScript? Please guide me,Thank you

2
  • 1
    Possible duplicate of stackoverflow.com/questions/742271/… ? Commented Sep 4, 2020 at 16:35
  • Thanks for your help.Can you please let me know how can i import my data(input taken from user using html form) to the solutions offered in the answers.Sorry this is the first time i am working with data or files. Commented Sep 4, 2020 at 16:43

1 Answer 1

1

First, in javascript you can get your input from the HTML by using javascript/JQuery

var input = document.getelementbyid("#id").value

or

var input = $("#id").val()

Then proceed like explained in the example of the topic (Generating PDF files with JavaScript)

var doc = new jsPDF()

doc.text(input, 10, 10)
doc.save('a4.pdf')
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer i am new to this so will try and respond soon
Use an id for each input of your form -> Upon validation, get the value(s) with JS or Jquery using the id(s) of the input(s) -> Generate the PDF using the jsPDF library

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.