You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't find any documentation that specifies all API actions available. I'm looking for a way to do the following:
Replace placeholder text with values. A PDF might contain [[full_name]] and I need to replace that with the name of the user viewing the document, e.g. page.content = page.content.replace('[[full_name]]', 'Kieran P')
Return field name/value combos for all fields in the PDF. If a PDF had a field for DOB, with a field name of "dob", being able to call something like pdf.fields() and get back { 'dob': '2020-01-01' } would be useful
Be able to fill in PDF form fields programmatically, Using DOB field from above, being able to do something like this: pdf.field('dob').value = '2020-01-01'
With these three things, users would be able to view PDFs that are dynamically tailored to them (their name inserted), fill in all fields which can then be programmatically fetched and saved in a DB when the user clicks a "Submit" button outside the PDF, and then later return to that PDF and see their previously entered data in the appropriate fields.
We currently use a commercial solution to achieve this, but it costs us a whopping $20k USD per year. Is PDF.js capable of doing these things? If not, is there any roadmap to support such things? And if not, does anyone know of any free or cheaper solution to achieve what we're doing?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I can't find any documentation that specifies all API actions available. I'm looking for a way to do the following:
Replace placeholder text with values. A PDF might contain [[full_name]] and I need to replace that with the name of the user viewing the document, e.g.
page.content = page.content.replace('[[full_name]]', 'Kieran P')
Return field name/value combos for all fields in the PDF. If a PDF had a field for DOB, with a field name of "dob", being able to call something like
pdf.fields()
and get back{ 'dob': '2020-01-01' }
would be usefulBe able to fill in PDF form fields programmatically, Using DOB field from above, being able to do something like this:
pdf.field('dob').value = '2020-01-01'
With these three things, users would be able to view PDFs that are dynamically tailored to them (their name inserted), fill in all fields which can then be programmatically fetched and saved in a DB when the user clicks a "Submit" button outside the PDF, and then later return to that PDF and see their previously entered data in the appropriate fields.
We currently use a commercial solution to achieve this, but it costs us a whopping $20k USD per year. Is PDF.js capable of doing these things? If not, is there any roadmap to support such things? And if not, does anyone know of any free or cheaper solution to achieve what we're doing?
Thanks :-)
Beta Was this translation helpful? Give feedback.
All reactions