I am creating the pdfs using the basic flow of datamapper, create print content and presets. Is there a way to create the indexing for the pdf that is being generated here. It will be used for searching particular document.
Are you looking for a separate index file for each pdf or metadata in the pdf?
no I need single index file containing details of all records.
Are you on Automate or Workflow?
In an Automate flow, you can access the ID of the data set used to produce the PDFs through msg.dataSetId . You can use this ID to retrieve the data records from the OL Connect database with the Data Get node.
In my example, I retrieve the data as a simplified JSON structure consisting of key-value pairs. The JSON data is then converted to CSV format and written to disk.
Erik
[{"__recordid":16556,"first_name":"Mélina","last_name":"Newbold","full_name":"Mélina Newbold","address":"Almo 944","zip":"3560 FL","city":"Utrecht (stad)","country":"Netherlands","admitted":false,"age":17,"kix":"3560FL944","student_number":"2024_000001","ExtraData":""}]
__recordid,first_name,last_name,full_name,address,zip,city,country,admitted,age,kix,student_number,ExtraData
16556,Mélina,Newbold,Mélina Newbold,Almo 944,3560 FL,Utrecht (stad),Netherlands,false,17,3560FL944,2024_000001,
I am using workflow. What is the solution in that.
I’m a bit rusty on Workflow, perhaps someone with more recent Workflow experience can suggest the most appropriate approach.
If the job does any sorting or filtering it would probably be better to use Job Statistics task in Workflow to make sure that the index file matches output.
In job preset, add fields you require as the metadata, either on document set or document level. Then, after job has been created add a Job Statistics task - this will produce either a JSON file or XML file with metadata assigned to each document/document set.
If you need a different file format, you can process the JSON using a script, or use XML splitter and Set Job Infos → Create File → Send to Folder with Concatenate files.
Please note that Job Statistics will not know anything about banners and slip sheets as they are added by output preset.

