How To Submit and Print Multiple PDFs

Customers who want to generate PDFs programmatically, especially if they need a single PDF per FormID in their package, can do so with a combination of the Submit button event and the /print API method.

Configure The Submit Button

In order for the Submit button to appear and post the data needed for the Print endpoint, you should configure the following properties for the submit button:

HTMLButtonSubmit property:Show: true
SubmitURL: {{your endpoint}}
SubmitContentType: "json"
Name: {{The text of the button, this is optional and the default is “Submit”}}. Example: "Send"

The Quik! Viewer should now display a Submit button. Upon clicking the submit button, a JSON similar to the following will be sent to your endpoint:

{ "EditablePDF": false, "IncludeCoverPage": true, "UNID": "6DurN...", "CustomerID": "1.....", "Fields": [ { "FormID": 12, "FormInstance": 0, "Order": 1, "HTMLFields": [ { "Name": "FormId-Instance.1", "Value": "12" }, { "Name": "QuikRadio12.1acc.RegType", "Value": "44" }, { "Name": "1own.DOB", "Value": "12/12/2010" } } ], "NativeESign": "false", "NativeESignatures": [], "SignAllDocsCombined": "True", "SignMultipleDocs": "True", "CustomFields": { "MetaData": [], "Fields": [] }, "ForSign": false }

Click to expand inline (36 lines)

You can take that JSON and post it to the Print Endpoint: https://websvcs.quikforms.com/rest/QuikFormsEngine/print

How To Get One PDF per FormID

In order to get one PDF per FormID you must set these flags to true (they are in the JSON):

  • ForSign

  • SignMultipleDocs

Also, don't forget to add the Authorization header with a Bearer token.

That's it, you will get a list of PDFs in the response, similar to the following output:

{ "ResultData": [ { "PDF": "JVBE...", "FileName": "American Funds.....pdf", "ID": "12", "FormShortName": "...", "DealerName": "American Funds" }, { "PDF": "JVBE...", "FileName": "American Funds.....pdf", "ID": "2", "FormShortName": "...", "DealerName": "American Funds" } ], "ErrorCode": 0, "Message": "", "Errors": null }

If you’re creating PDFs to use with e-signature, please see this article for more details on e-signing.

 

Related pages

For help regarding Quik! Forms and the Quik! API
Email: support@quikforms.com | Phone: (877) 456-QUIK