static void Main(string[] args) { string strPath = System.AppDomain.CurrentDomain.BaseDirectory; // Instantiate Object APDocConverter.DocConverter docConverter = new APDocConverter.DocConverter(); // Enable extra logging (logging should only be used while // troubleshooting) C:\ProgramData\activePDF\Logs\ docConverter.Debug = true; // Set 40-bit encryption on PDF output // 40-bit encryption supported in Acrobat 3+ // A blank user password will allow the PDF to open without a // password. // (DocConverter also supports 128-bit and AES 128/256-bit // encryption.) docConverter.SetPDFSecurity( "userpass", "ownerpass", true, true, true, true); // Convert the file to PDF // If the output parameter is not used the created PDF will use // the input string substituting the filename extension to 'pdf' DCDK.Results.DocConverterResult result = docConverter.ConvertToPDF( $"{strPath}DocConverter.Word.Input.doc", $"{strPath}DocConverter.SetPDFSecurity.Output.pdf"); WriteResult(result); Console.WriteLine("Press any key to exit."); Console.ReadKey(); }