Logo
Home Products Support Contact About Us
arrow1 File Converters
arrow1 TIFF and PDF apps
arrow1 Forensic
arrow1 Freeware

Convert DOC to PDF Via Command Line

 

Total Doc Converter X is a server based tool to convert Doc to PDF in batch. By installing Doc Converter X on a web server you can choose to make it accessible to the entire network or make part of your application via ASP.NET. Or if you prefer, it can be used as a stand-alone app.

Once you've installed the Total Doc Converter X you'll notice that it is GUI-free. Instead we provide users with a comprehensive list of commands that can be sent through the command line environment. Whether you're a server administrator or network user, setting job parameters and initiating the conversion process is quick and easy. You'll even be able to save project settings in .bat format for automation purposes later on.

Other options (when converting to PDF) include:

  • Add page numeration.
  • Customize the header & footer.
  • Include a custom watermark.
  • Secure target document with encryption.
  • Ensure document authenticity with a digital signature.
  • Combine multiple documents into a single, multi-page PDF file.
  • Preserve the properties of the original document(s).
  • Perform batch conversions.
  • Able to convert Doc to multiple formats.

By taking advantage of this feature, it's not necessary that your network users know how to convert Doc to PDF from Windows command line. Thanks to ActiveX support, Doc Converter X can be easily integrated into other apps through the Windows shell.

With so many built-in customization options, there's no need to struggle with multiple toolsets. Total Doc Converter X does it all! You'll soon discover that your output files are more useful than the corresponding originals.

Because this is a command line converter app, network users are able to perform quiet, behind the scenes conversions without any interrupting messages.

Give our app a try today by purchasing the full version. We offer several different licensing options specifically designed to accommodate both large and small servers. For enterprise licensing, contact us via this form.

Each license is life-time and includes all major upgrades for 12 months. You can keep the current license after that or purchase an upgrade with a 70% discount later. To learn more, check us out online at Facebook, Twitter and visit our blog.

Windows Vista/7/8/10/11

 

Start working now!

Download free trial and convert your files in minutes.
No credit card or email required.

⬇ Download Free Trial Windows 7/8/10/11 • 135 MB

Examples of Total Doc Converter X

Convert Doc files with Total Doc Converter X and .NET


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);

Convert Doc files on web servers with Total Doc Converter X

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);
        }
    }
More information about Azure Functions.

Convert Doc files on web servers with Total Doc Converter X

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

Stream the resulting PDF directly from ASP

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

Convert Doc files with PHP and Total Doc Converter X

$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;

Convert Doc files with Total Doc Converter X and Ruby

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

Convert Doc files with Total Doc Converter X and Python

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)

Convert Doc files with Pascal and Total Doc Converter X

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;

Convert Doc files on web servers with Total Doc Converter X

var c = new ActiveXObject("DocConverter.DocConverterX");
c.Convert("C:\\test\\source.docx", "C:\\test\\dest.pdf", "-cPDF");
if (c.ErrorMessage != "")
  alert(c.ErrorMessage)

Convert Doc files with Total Doc Converter X and Perl

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;

Support
Total Doc Converter X Preview1

Latest News

Newsletter Subscribe

No worries, we don't spam.


© 2026. All rights reserved. CoolUtils File Converters

Cards