Logo

arrow2 File Converters

arrow2 Forensic

arrow2 TIFF and PDF apps

arrow2 Freeware

Convert Doc Files On Web Servers With Total Doc ConverterX

  Example JavaScript:

var c = new ActiveXObject("DocConverter.DocConverterX");
c.Convert("C:\\test\\source.docx", "C:\\test\\dest.pdf", "-c PDF");
if (c.ErrorMessage!="")
  alert(c.ErrorMessage)
If you need examples on other languages please contact us. We will create any example specially for you.

Note that ActiveX is 32-bit only. If you are trying to use activeX under 64-bit internet information server (IIS) activeX will not work. Use command line version instead (it works with both 32- and 64-bit servers). Download

Examples of Total Doc ConverterX

Convert Doc files With TotalDocConverterX and .NET

string src="C:\\test\\Source.Doc";
string dest="C:\\test\\Dest.PDF";

DocConverterX Cnv = new DocConverterX();
Cnv.Convert(src, dest, "-c PDF -log c:\\test\\Doc.log");

MessageBox.Show("Convert complete!");

Download .NET Doc Covnerter example

Convert Doc Files On Web Servers With Total Doc ConverterX

dim C
Set C=CreateObject("DocConverter.DocConverterX")
C.Convert "c:\source.DOC", "c:\dest.TIF", "-cTIF -log c:\doc.log"
Response.Write C.ErrorMessage
set C = nothing
Example2 ASP: directly stream the resulting PDF
dim C
Set C=CreateObject("DocConverter.DocConverterX")
Response.Clear
Response.AddHeader "Content-Type", "binary/octet-stream"
Rresponse.AddHeader "Content-Disposition", "attachment; filename=test.pdf"
Response.BinaryWrite c.ConvertToStream("C:\www\ASP\Source.doc", "C:\www\ASP", "-cpdf  -log c:\html.log")
set C = nothing
If you use ActiveX on a web-server, please, remember to register it in your web-server account. If you don't have MS Office or MS Word installed on your computer, please download this additional free office converter pack to convert doc files.

Some more samples in C# specifically for ASP.net. If you need examples on other languages please contact us. We will create any example specially for you.

Convert Doc Files On Web Servers With Total Doc ConverterX

$src="C:\test.doc";
$dest="C:\test.htm";
if (file_exists($dest)) unlink($dest);
$c= new COM("DocConverter.DocConverterX");
$c->convert($src,$dest, "-c htm  -log c:\doc.log");
if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;

Convert Doc Files With Total Doc ConverterX and Ruby

require 'win32ole'
c = WIN32OLE.new('DocConverter.DocConverterX')

src="C:\\test\\test.docx";
dest="C:\\test\\test.pdf";

c.convert(src,dest, "-c PDF -log c:\\test\\Doc.log");

if not File.exist?(dest)
  puts c.ErrorMessage
end

Convert Doc files With Total Doc ConverterX 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, "-c PDF -log c:\\test\\Doc.log");

if not os.path.exists(file_path):
  print(c.ErrorMessage)

Convert Doc files With Pascal and Total Doc ConverterX

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 ConverterX

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

Convert Doc files With Total Doc ConverterX 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, "-c pdf  -log c:\\test\\Doc.log");
print $c->ErrorMessage if -e $dest;
Support
Get all CoolUtils products
for $99 only
read more

  (you save up to $500)


Total Doc Converter X Preview1

Coolutils.com

Latest News

  • In the updated PDF Combine a new command line parameter is added -IgnoreInvalidSource when any file from the input list does not exist.
  • In the updated Total Doc Converter an export to XHTML format is improved.
  • The updated Total CSV Converter can convert the files with over a million lines.
  • New PDF Combine Pro can create multiple line headers and footers.
  • In the new Total PDF Converter , the conversion from xps\oxps to docx was significantly improved.
  • Online converter now supports Biological Formats spe; nd2; pds; lsm; sif; fpf; vff; nmr; zvi; dm3; isac; afm; ser; mri.

Newsletter Subscribe

No worries, we don't spam.


© 2021. All rights reserved. CoolUtils File Converters

Cards