VeryPDFToobox is a perfect solution, with the help of which, you can easily merge PDF files into one PDF files and set a password for the output file. The sample as following shows a way to add an open or a permissions password for the result file.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Call_PDFToolBoxCom
{
class Program
{
static void Main(string[] args)
{
string strExePath = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
PDFToolBoxCom.PDFToolBoxCom p = new PDFToolBoxCom.PDFToolBoxCom();
string strReturn = p.RunCMD(strExePath + @"\1.pdf " + strExePath + @"\2.pdf -merge -outfile " + strExePath + @"\3.pdf -key40bit -ownerpassword foopass");
Console.WriteLine(strReturn);
Console.WriteLine("Please enter any key to continue...");
Console.ReadKey();
}
}
}
Lear more about VeryPDF PDF Toolbox Component for .NET.