This workflow is able to convert Word files (*.docx, *.doc, *.rtf, *.txt, etc) to PDF. It can convert either one file at a time or all files in a specified folder.
in_WordDocument (String) - the Word document which should be converted to PDF.
in_PdfDocument (String) - if this is empty, the PDF document will be saved in the same path and with the same name as the in_WordDocument.
in_WordDocumentsFolder (String) - this is used in case the in_WordDocument is empty. The activity converts all documents in the specified folder to PDF.
in_PdfDocumentsFolder (String) - this is the output folder for the converted files. If it is empty, the PDF files will be saved in the same path as the Word files.
out_ValidWordDocuments (Array of String) - this output argument returns a list of all the files that were successfully converted.
out_InvalidWordDocuments (Array of String) - this output argument returns a list of all the files which could not be converted to PDF.
out_PdfDocuments (Array of String) - this output argument returns a list of all the PDF files resulted from the convertion.
"File WORD_DOCUMENT_NAME could not be converted to pdf" - if exception is thrown when trying to convert the file.
"No files converted" - when no files have been converted.
"The following files have been converted:" - shows the list of all the files which have been converted.
"The following files have not been converted because they are invalid:" - shows the list of all the files which have not been converted.
"in_WordDocument and in_WordDocumentsFolder are empty"
"Folder in_WordDocumentsFolder does not exist"
There are a lot of cases when we need to convert files from Word supported file types (docx, doc, txt, rtf) to PDF. By importing this workflow a developer's job is simplified. He can invoke this workflow by passing a file or a folder of files to the workflow and it will handle everything from that moment.
The workflow returns 3 arrays as output arguments containing the files which could be converted, the files which couldn't be converted and the resulted PDFs for later use.