Reputation: 43
I am currently having a requirement where I need to extract values from a CSV file onto a template within Kofax TotalAgility designer and generate a PDF from it accordingly.
The process would pick CSV files from shared folder on the network as an input and fill a template which is in word format with merge fields with corresponding values and generate a PDF from the populated word document as an output to another shared folder.
Any help is much appreciated.
Upvotes: 0
Views: 955
Reputation: 1388
There is not anything built into KTA that will handle the CSV file. I would recommend you handle this in C# (preferably your own dll rather than a script activity). The specifics of how you store the CSV data you read will probably depend a lot on how exactly your template is organized and the specifics around your data. But ultimately you will want data in separate KTA variables to map into your merge fields.
The primary KTA functionality relevant to your goal is the Document Creation activity (under "Other" when choosing activity type). You will want to read the help topics for a full understanding of the options, but it will allow you to map variables into merge fields from a Word Template (dotx).
The configuration interface of the activity does not make this immediately apparent, but the Document Save Location can be a document variable instead of a path. Once you provide a document variable, the interface will expand to also allow you to choose a folder variable to which the document will be added. Then you can map your data from variables into the merge fields.
Note that using a document variable for the Document Save Location, rather than a file path, is essential because PDF generator works on Document/Folders within KTA, not file paths.
After your Document Creation activity, you can add an Image Processing activity (to convert the merged Word document to tif), and then a PDF Generator activity to create your PDF. Use an Export activity to export the PDF to the location of your choosing.
I think PDF Generator requires tif pages be created first, but you could try sending the Word document without the IP activity if you want to confirm.
Upvotes: 2