Catch
Catch

Reputation: 1

How do I get values from Palantir Foundry Workshop app into a PDF?

I've got a Workshop app that walks users through the process of making selections and entering information, both of which are then stored in an object instance of a specific object type. This helps satisfy the need to digitally record user choices so that we can do follow-on analysis; however, that's only one of the required outputs. The next required output is that the user values be printed on in the appropriate fields of a standardized form (e.g., Form 1040).

Has anyone done something like this? Is there a best guess at what it might look like? I'm at a total loss.

I tried recreating the form in the Notepad tool, but I couldn't find a way to do it effectively.

Upvotes: 0

Views: 173

Answers (1)

ZettaP
ZettaP

Reputation: 1359

You should be able to do this, if you are able to edit the PDF in a Foundry Function.

The idea would be:

  • You have an Object Type/Instance with an attachment which is the "base form" (the raw PDF, empty).
  • You have a Foundry Function that reads from the 1st attachment, take some input parameters and combine both into an "edited PDF", and store it as a new attachment (maybe to a new object instance)

https://www.palantir.com/docs/foundry/functions/api-attachments

The workflow:

  • You do your selection in Workshop etc.
  • You click a button that says "create the PDF" (probably passing the reference of an object)
  • This triggers an Action that triggers the function, which reads from the raw PDF, fill it and save it as new attachment
  • You display the attachment in Workshop (and users can download it if needs be)

I haven't tested this exact workflow (you might need some library in Function, etc.) but I believe this should work.

Upvotes: 0

Related Questions