simonbengtsson / jsPDF-AutoTable

jsPDF plugin for generating PDF tables with javascript
https://simonbengtsson.github.io/jsPDF-AutoTable/
MIT License
2.33k stars 624 forks source link

Allow cells to be TextFields #804

Open puyma opened 3 years ago

puyma commented 3 years ago

Would be awesome in order to get input in a table.

simonbengtsson commented 3 years ago

Sounds like a great improvement!

iamziike commented 2 years ago

@simonbengtsson @puyma to further clarify, do you mean having a td or th which has an input field nested within it to "act" as its value during pdf generation ?

<tr>
  <td>
    <input type="text" placeholder="enter name"/>
  </td>
</tr>
puyma commented 2 years ago

@simonbengtsson @iamziike It would be as if, when adding a table to the jsPDF document, the body parameter accepted TextField objects. Then, once generated the pdf, the contents of the table would be editable as text fields are.

doc.autoTable({
    ...
    head: [
        ["first column", "second column"]
    ],
    body: [
        [**new TextField()**, **new TextField()**]
    ],
})
mmghv commented 1 year ago

What?!! editable PDF fields? am I missing something here? isn't PDF just for printing?

lucaslm commented 11 months ago

I think I've seem those before. I did some digging and there's a spec called XFA forms that appears to do just that. It seems though it would still be a bold feat to achieve