Dear VeryPDF Support,
I would like to know is it possible to create C# Console Application using VeryPDF PDF Command?
Thank You!
Regards,
Customer
---------------------------------------
Yes, of course, you can create C# Console Application using VeryPDF PDFPrint Command Line application, you can download PDFPrint Command Line from this web page,
https://www.verypdf.com/app/pdf-print-cmd/try-and-buy.html#buy
https://www.verypdf.com/pdfprint/pdfprint_cmd.zip
after you download it, you can call pdfprint.exe by following sample C# source code,
using System.Diagnostics;
class Program
{
static void Main()
{
LaunchCommandLineApp();
}
/// <summary>
/// Launch the legacy application with some options set.
/// </summary>
static void LaunchCommandLineApp()
{
// For the example
const string ex1 = "C:\\";
const string ex2 = "C:\\Dir";
// Use ProcessStartInfo class
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.FileName = "D:\\VeryPDF\\pdfprint.exe";
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = "-printer docPrint D:\\test.pdf";
try
{
// Start the process with the info we specified.
// Call WaitForExit and then the using statement will close.
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
}
}
catch
{
// Log error.
}
}
}
VeryPDF