Page 1 of 1

keeping the Hierarchy info in generated PDFs

Posted: Tue Oct 16, 2018 3:05 pm
by pcarvalho
I want to build a flow that receives an email and extract all the attachments (PDF, .docx, .xlsx,...) storing the Hierarchy info to assemble it upfront.
The problem is that in between, i convert the word files to PDF.
When i try to assemble it it doesn't work.
How can i store the Hierarchy info to those PDFs generated from word?
Can anyone help me?

Thanks in advance.
Paulo

Re: keeping the Hierarchy info in generated PDFs

Posted: Tue Oct 16, 2018 5:41 pm
by jan_suhr
Export the dataset as XML and then when the file comes back do a XML pickup in to the PDF. It do requires the Metadata module.

Re: keeping the Hierarchy info in generated PDFs

Posted: Wed Oct 17, 2018 11:57 am
by pcarvalho
I don't have the Metadata module.
Is there any other way?

Re: keeping the Hierarchy info in generated PDFs

Posted: Wed Oct 17, 2018 2:02 pm
by Terkelsen
Jan Suhrs advice would be the obvious choice but if you don't have the metadata module you might be able to use the hierarchy info to add a specific prefix to the file names using Rename. You could then assemble based on that prefix and later use rename to remove the prefix again.

Re: keeping the Hierarchy info in generated PDFs

Posted: Wed Oct 17, 2018 5:31 pm
by Padawan
Can you try this?

1 Mail Receive with "Collect Attachments" set to "Yes".
2 Ungroup Job
3 Send docx files to word to convert to PDF, leave the other files alone
4 Send the created PDF and the other files to an Assemble Job element where the scheme is "Ungrouped Job".
5 The output will be a folder with all the original attachments, except that the word files will be converted to PDF. The output folder should have all the metadata which is added by the Mail Send.

I think this should work unless I am missing something about your usecase.

The ungroup job will remember all information necessary to assemble the files again. In background it will create unique ID's, remember the amount of files to assemble, ...