Develop C# Console Application using VeryPDF PDFPrint Command Line

Dear VeryPDF Support,

I would like to know is it possible to create C# Console Application using VeryPDF PDF Command?

Thank You!

Regards,
Customer
---------------------------------------

image
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,

http://www.verypdf.com/app/pdf-print-cmd/try-and-buy.html#buy
http://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

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

This entry was posted in PDF Print and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!