Convert text files to PDF then merge PDFs in bulk with PowerShell and iTextSharp | Powershell | - Practical PowerShell for Humans
To demonstrate this process, I will show you how I export all the PowerShell help and convert it to PDF files that I use instead of looking at the help files in the PowerShell Console. I realize you can view the PowerShell help files in the console and online. The purpose of this script is to demonstrate how I solved what I viewed as a problem for me. You may be just fine looking through the help files in the console or online, as with any PowerShell script anyone hacks together, your mileage may vary. I have split the code into 3 functions; 1 to export the help files to text files, 1 to convert those text files to PDFs, and 1 to merge all the PDFs in a given folder into 1 PDF. This process requires the iTextSharp .net library which you can download here (. This is probably one of the more basic implementations of the iTextSharp library, it has a lot of functionality that I didn't need to accomplish my mission. You can find more technical information