Hi All,
I have a requirement to make an editable form . The form fields should be fillable and the data entered should get saved into the database on click of submit in an interface. The upload interface should contain fillable pdf as well as a submit button .(form layout ) Also the user can download the newly edited pdf in non editable format on click of download button.
I am making use of Fill PDF tool available in PDF tools pluggin. I need to know the what should we fill in the value part of the service. From where can I make a pdf to be in the same format as needed? The pdf that we need to make fillable consists of textfields, some image along with check box fields. (version 20.3)
Thanks
Discussion posts and replies are publicly visible
Use Smart service named PDF Doc From Template. (Use a PDF template to populate data into and save as a PDF file in Appian)
I vastly prefer "Fill PDF" which it sounds like Shikha is referring to, because it allows you to expressionize the generation which is dramatically more efficient especially when dealing with repeating fields or lists, etc.
To use the Fill PDF smart service it's super easy - just create an expression rule that outputs a list of dictionaries where each one has 2 properties, "name" and "value". "name" needs to match the PDF's fillable field name. You can see this when you go into Form Edit mode in Adobe Acrobat Editor, which is what you'll need to have/use in order to make your fillable PDF.
Also, you can use the "getpdffields()" rule found in the PDF Tools plug-in to return the plaintext field names for all fields in the PDF, once you've uploaded the template to your Appian environment.
Hi Mike , as suggested I have a rule with name value pairs in dictionary format. I am passing this as the input for the fill PDF service. Ideally , the PDF should get populate with the given values . But the generated PDF does not gets populated with the given values .Flatten is true so its getting genrated in read only format.The document I am uploading is a simple PDF with textfields created online via pdf editor. Attached screenshots:
Your rule is returning the wrong data structure. As I said in my prior comment, you will need to return a list of dictionaries where each dictionary has the fields "name" and "value". For instance, your first dictionary would be:
{ name: "fullLegal", value: "Adam" }
Thanks Mike, this works only if flatten parameter is set to false.
I'm surprised - what happens if you set it to TRUE? As far as I remember, I've been able to make both work. However, I've seen some funny results in the case of certain unusually-created PDF forms, so that might be what you're up against.
If flatten is set to true, we get only the labels of the fields, no textfields come up(pdf flattened maybe) . Also, no value populates. That's how it works I guess, though I expected it to show the values I provided.
Basically I wanted to have the values populated into the pdf fields in read only mode only(non editable) mode.(just visible field values, like name=adam ). Setting flatten to false do populates the textfields, but I can edit those values. (textfields)
That sounds familiar, i think it might be a bug in the plug-in. Check to see if anyone (like me maybe) has commented on the plug-in's comments in the app market, and potentially leave your own comment there on the issue.
Edit: found the comment I was thinking of, link added. Community doesn't notify me when people reply to comments in certain cases (like on plug-in pages), so sorry for not replying to your question there originally.
No problem Mike . Thanks for your input.
I am trying to use this plugin but I do not understand why I am unable to get fields data from PDF using getpdffields fucntion. the doc is in arabic.