I have a simple workflow as a POC which takes in a PDF with multiple pages and I need to merge documents together that have the same address. So in the data mapper I extract the address and add to the metadata in a field called “Address”. I then have a metadata sorter by address and then a Level creation. However that isn’t re-grouping the documents, below is a screenshot of the setup for this, can anyone see why this wouldn’t be working?
First, I wouldn’t use the Execute Data Mapping to generate the metadata you need to re-organize your PDF. It could work properly but I never tried it this way. Here is what I suggest:
Create Metadata plugin where the Documents is None
Metadata Level Creation plugin. Document->Begin when the rule you use to separate each documents of you PDF (address or invoice number, etc…)
Metadata Field Management plugin.
Action = Add
Field Information
Level = Document
Field name = Address
Field value = <your address from the PDF>
Rule = <same rule as at the Metadata Level Creation>
Metadata Sorter, same setting as you currently have
Metadata Sequencer and your rule would be on change on the field Address. This will act as a splitter based on the rule defined in it.
Then you will need use the Create PDF plugin to create all separated PDF.
I need to do the merging after the data mapper though as I firstly need to report on the number of records received and assign some matching data that comes in a XML index file. Once these have been merged in the data mapper I then create a report on counts etc, then I want to merge packs that are the same address and then pass to a template to add production marks etc
Then you don’t need to sort the data in the metadata after the datamapper. You simply need to do it in the Job Preset. Then separate the document in the Output Preset.
I’ve created a job config with grouping and then setup a output preset with split in and names the the file “GetMeta(_vger_fld_ID[0], 10, Job.Group[0].Document[0]).pdf”, but what I get is a single PDF which is actually a TXT file with the below in.
In Workflow, you have to select, in the Create Output plugin, As defined by Output Preset. In your Output Preset, you tell it where to output the files.
You used Through Workflow, which in case of multiple files, will give you what you have, which is the temporary output folder of your resulting PDF.
Done that and now got what appears to be the original XML file? I’m trying to use a value from the metadata called ID so I have put the below in for the filename but I’m only getting 1 file?
If there is no error, then it could be that there is no resulting file from your Template. Do you have any conditions either in your Datamapper or Template that would prevent a PDF generation?
Just been doing some testing and I’ve taken a output config that works fine and I just ticked the “separation” and selected new file every document. As soon as I do that i either get a txt file with 2 files listed if I don’t tick “As defined by Output Preset”, if I tick that then I get my original XML? Below is a screenshot of the config
Your output preset says “Output to: Prompt for File”. That means Connect does not know where to output the result and how to name it. So you can not use “As defined by Output Preset”.
Connect output seperation in a workflow only works properly with defined output location and name in the output presets.