I'm having a hard time believing there isn't a better example of using this from 64 bit .NET. I've tried 2 of your examples, and most of the knowledge base and it's a mismash of half baked stuff that doesn't work out of the box. It's very frustrating. Can you please point me to an actual working example of calling this from 64 bit .NET?
I'm using .NET 4.5 Visual Studio 2013 on 64 bit Win 7 machine.
Thanks!
Customer
---------------------------------------------
How do you call "Image to PDF Converter Command Line" from your C# code currently?
You may download "Image to PDF Converter Command Line" from following web page,
https://www.verypdf.com/app/image-to-pdf-ocr-converter/try-and-buy.html#buy-cvt-cmd
https://www.verypdf.com/tif2pdf/image2pdf_cmd.zip
after you download and unzip it to a folder, you can run following command line to convert your TIFF file to PDF file,
img2pdf.exe -o F:\output.pdf F:\input.tif
You can use following C# code to call img2pdf.exe to convert TIFF file to PDF file,
using System.Diagnostics;
class Program
{
static void Main()
{
LaunchCommandLineApp();
}
/// <summary>
/// Launch the legacy application with some options set.
/// </summary>
static void LaunchCommandLineApp()
{
// Use ProcessStartInfo class
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.FileName = "D:\\VeryPDF\\img2pdf.exe";
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = "-o F:\\output.pdf F:\\input.tif";
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.
}
}
}
We hoping this C# example will work fine to you, please to try.
VeryPDF