Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

What is the best practice to configure Watchedfolder process to assemble multiple file types to single PDF file

Avatar

Level 2

I have a requirement to assemble multiple files from client app to a single PDF file. Please let me know the best practice to achieve it through watchedfolder configuration. We have to use watched folder sue to several reasons. I have noted down some design considerations please let me know if there is a better method. Also any reference to process input.xml file will also be very helpful.

Client App:

The client app will

    -> Generate a input.xml file and prepare few input files with multiple extensions like .doc, .html, .xls, .pdf etc.

    -> All these files along with input.xml will be copied inside a directory (input-dir) with unique name and input-dir will be copied to the 'input' directory of ALC ES4 watched folder.

    -> The app will wait for the result file to appear in the 'result' directory of ALC watched folder.

    -> The result file will be named same as name of input-dir.pdf as it is a unique name and it will help to troubleshoot the environment in case of any error.

The input.xml will contain below information.

   -> Header

   -> Footer

   -> List of file names

  

ALC ES4:

A process watching the folder will copy the input-dir along with all files and process it and write the output to result directory.

Flow of the process needs to be as below.

Option 1  

   -> Store the input-dir name to use in result PDf name

   -> Read input.xml file and store header and footer values to a variable

   -> Read the file list info from input.xml and convert files one by one to PDF in the same order (the order is important)

   -> Prepare a variable with generated file names

   -> Assemble all generated PDF files and apply header, footer information

   -> Write the result PDF to 'result' directory of watched folder

Option 2

   -> Store the input-dir name to use in result PDf name

   -> Read input.xml file and store header and footer values to a variable

   -> Read the file list info from input.xml and store it in a variable

   -> Assemble all input files as package and apply header, footer information

   -> All non PDF files will be automatically converted to PDF (is this available?)

   -> Write the result PDF to 'result' directory of watched folder

1 Accepted Solution

Avatar

Correct answer by
Level 10

I don't think option2 is possible as you would need to convert the documents into PDF first before assembling.

Nith

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

I don't think option2 is possible as you would need to convert the documents into PDF first before assembling.

Nith

Avatar

Level 2

Is there any reference which can help me to make the process to read a XML file and loop through file names in watchedfolder to convert first to PDF and then to assemble using DDX?