VeryUtils PDF Print Command Line for .NET

VeryUtils PDF Print Command Line can be used in any type of .NET application to silently print PDF documents. The integration with existing .NET applications is extremely easy and no installation is necessary. The downloaded archive contains PDFPrint Command Line application, you can call this PDFPrint Command Line from C# source code to print PDF files silent easily. You can select the target printer, set the paper size, orientation and margins, print in color or in gray scale, select the range of PDF pages to print.

https://veryutils.com/pdf-print-command-line

image

VeryUtils PDF Print does not depend on Adobe Reader or other third party tools.

PDF Print for .NET highlight features:
* Print PDF documents from any version of PDF files.
* Silently print without displaying any print dialog.
* Does not depend on Adobe Reader or other third party tools.
* Allows you to select the printer to be used for printing.
* Allows you to select the paper size, orientation and margins.
* Print password protected PDF documents.
* Add watermarks and stamps during printing.
* Print only a range of PDF pages.
* Get the number of pages in a PDF document.
* Support for .NET 4.0 framework and later.

You can use following C# source code to call pdfprint.exe application,

using System.Diagnostics;

class Program
{
    static void Main()
    {
        LaunchCommandLineApp();
    }

    static void LaunchCommandLineApp()
    {
        // Part 1: use ProcessStartInfo class.
        ProcessStartInfo startInfo = new ProcessStartInfo();
        startInfo.CreateNoWindow = false;
        startInfo.UseShellExecute = false;
        startInfo.FileName = "D:\\veryutils\\pdfprint.exe";
        startInfo.WindowStyle = ProcessWindowStyle.Hidden;

        // Part 2: set arguments.
        startInfo.Arguments = "-printer docPrint D:\\test.pdf";

        try
        {
            // Part 3: start with the info we specified.
            // ... Call WaitForExit.
            using (Process exeProcess = Process.Start(startInfo))
            {
                exeProcess.WaitForExit();
            }
        }
        catch
        {
            // Log error.
        }
    }
}

No votes yet.
Please wait...

Related Posts

Leave a Reply

Your email address will not be published.