A
A
Artyom2020-12-07 01:04:45
JavaScript
Artyom, 2020-12-07 01:04:45

How to save a file locally using jsPDF?

var doc = new jsPDF({
      orientation: 'landscape',
      unit: 'in',
      format: [4, 2]
    })

    doc.text('Hello world!', 1, 1)
    doc.save('two-by-four.pdf')

this is my code, in general it is copied from the docks (I wanted to see how the package works)

When you save, the "save as" menu opens in the application. I just need to save the document locally. Please tell me how.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question