What would be the best way to capture user entries and selections in an established PDF form?

I’m working on an app in Workshop that takes user inputs and selections and uses them to generate a few outputs. One of the first things it does is record user selections. I did this by having the user trigger a “create object” action by clicking a button and routing the entries to the appropriate fields of an object type.

Having that record will be great for future data adventures, but the powers that be also need those values captured in an existing standardized PDF form. For example, first name, last name, etc. on a Form 1040..

Ideally, I’d be able to auto-fill the different fields with the values that were recorded. Is that possible or would I have to put together some code to replicate the form entirely and then route the values in that??

I don’t know how to do that directly in Workshop. You’ll need to write code that fills in the PDF (and generates a new copy of the PDF form each time). You could use a TypeScript package to do that. Or you could use a Python library to do that. Either way, you’ll need to first write the data to the object and then save the new PDF. If TypeScript, then this can happen in the context of an Action. If Python, you’ll need to materialize the edits dataset for that object type (look in Ontology Manager app under the Datasources tab for that object type). And you’d want to create an incremental transform that fills in the PDF.