Total Doc Converter X is a server app that once installed, allows multiple network users to convert DocX to PDF from the command line. Because Doc Converter X is accessed via a web server any number of end users can be granted permission to use it. Alternatively, our command line converter can be employed as a stand-alone application as well. Bottom line; when you need to perform quiet conversions free of interruption, this is the perfect tool for the job.
Quick answer: To convert DOCX to PDF from the command line, install Total Doc Converter X on your Windows server, open a command prompt, and run the converter against a wildcard such as *.docx pointing at an output folder with the PDF target flag. Add options for page numbers, headers, watermarks, encryption, or merging, then save the line in a .bat file for unattended batch conversion with no GUI and no Microsoft Office.
Offering full ActiveX support, the Total Doc Converter X can be integrated into almost any Windows app. Use our converter as a reliable library to deal with all your conversion needs. Your users won't even need to know how to convert DocX to PDF from Windows command line. Simply call COM object through .NET!
After installing the Total Doc Converter X you'll be greeted with a master list of commands available for use when setting up conversion projects. Server administrators and network users alike are able to benefit from this straight-forward, access-oriented design. Once you've arrived at the optimal project settings, you can save them for future use with our convenient .bat save feature.
Our Doc to PDF library is not limited to PDF only. In fact it converts DocX to a variety of other formats too (XLS, HTML, JPEG, TIFF, RTF, TXT).
Additional options let you:
After many years spent developing conversion apps, we've learned what options users need the most. True to our goal of unmatched flexibility, we've added these options to provide users with a single, robust utility that includes the functionality of many tools.
Feel free to try before you buy. Download our free evaluation version and see what you think. When the time comes to upgrade to the full-version, we offer a variety of licenses to meet your specific needs. For enterprise licensing, contact us via this form.
Total Doc ConverterX runs fine on Windows Vista/7/8/10/11.
Download free trial and convert your files in minutes.
No credit card or email required.
string src = @"C:\test\Source.docx";
string dest = @"C:\test\Dest.pdf";
var cnv = new DocConverterX();
cnv.Convert(src, dest, "-cPDF -log c:\\test\\Doc.log");
if (!string.IsNullOrEmpty(cnv.ErrorMessage))
throw new Exception(cnv.ErrorMessage);
public static class Function1
{
[FunctionName("Function1")]
public static async Task Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
StringBuilder sbLogs = new StringBuilder();
sbLogs.AppendLine("started...");
try
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = false;
var assemblyDirectoryPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
assemblyDirectoryPath = assemblyDirectoryPath.Substring(0, assemblyDirectoryPath.Length - 4);
var executablePath = $@"{assemblyDirectoryPath}\Converter\DocConverterX.exe";
sbLogs.AppendLine(executablePath + "...");
var srcPath = $@"{assemblyDirectoryPath}\src\sample.docx";
var outPath = Path.GetTempFileName() + ".pdf";
startInfo.FileName = executablePath;
if (File.Exists(outPath))
{
File.Delete(outPath);
}
if (File.Exists(executablePath) && File.Exists(srcPath))
{
sbLogs.AppendLine("files exists...");
}
else
sbLogs.AppendLine("EXE & source files NOT exists...");
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = $"\"{srcPath}\" \"{outPath}\" -cPDF";
using (Process exeProcess = Process.Start(startInfo))
{
sbLogs.AppendLine($"wait...{DateTime.Now.ToString()}");
exeProcess.WaitForExit();
sbLogs.AppendLine($"complete...{DateTime.Now.ToString()}");
}
sbLogs.AppendLine("Conversion complete.");
}
catch (Exception ex)
{
sbLogs.AppendLine(ex.ToString());
}
return new OkObjectResult(sbLogs);
}
}
dim C
Set C=CreateObject("DocConverter.DocConverterX")
C.Convert "c:\source.docx", "c:\dest.pdf", "-cPDF -log c:\doc.log"
Response.Write C.ErrorMessage
set C = nothing
dim C
Set C=CreateObject("DocConverter.DocConverterX")
Response.Clear
Response.AddHeader "Content-Type", "binary/octet-stream"
Response.AddHeader "Content-Disposition", "attachment; filename=test.pdf"
Response.BinaryWrite C.ConvertToStream("C:\www\ASP\Source.docx", "C:\www\ASP", "-cpdf -log c:\doc.log")
set C = nothing
$src="C:\\test\\test.docx";
$dest="C:\\test\\test.pdf";
if (file_exists($dest)) unlink($dest);
$c= new COM("DocConverter.DocConverterX");
$c->convert($src,$dest, "-cPDF -log c:\\test\\Doc.log");
if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;
require 'win32ole'
c = WIN32OLE.new('DocConverter.DocConverterX')
src = "C:\\test\\test.docx"
dest = "C:\\test\\test.pdf"
c.convert(src, dest, "-cPDF -log c:\\test\\Doc.log")
if not File.exist?(dest)
puts c.ErrorMessage
end
import win32com.client
import os.path
c = win32com.client.Dispatch("DocConverter.DocConverterX")
src = "C:\\test\\test.docx"
dest = "C:\\test\\test.pdf"
c.convert(src, dest, "-cPDF -log c:\\test\\Doc.log")
if not os.path.exists(dest):
print(c.ErrorMessage)
uses Dialogs, Vcl.OleAuto;
var
c: OleVariant;
begin
c := CreateOleObject('DocConverter.DocConverterX');
c.Convert('c:\test\source.docx', 'c:\test\dest.pdf', '-cPDF -log c:\test\Doc.log');
if c.ErrorMessage <> '' then
ShowMessage(c.ErrorMessage);
end;
var c = new ActiveXObject("DocConverter.DocConverterX");
c.Convert("C:\\test\\source.docx", "C:\\test\\dest.pdf", "-cPDF");
if (c.ErrorMessage != "")
alert(c.ErrorMessage)
use Win32::OLE; my $src = "C:\\test\\test.docx"; my $dest = "C:\\test\\test.pdf"; my $c = CreateObject Win32::OLE 'DocConverter.DocConverterX'; $c->convert($src, $dest, "-cPDF -log c:\\test\\Doc.log"); print $c->ErrorMessage if -e $dest;