Logo

arrow2 File Converters

arrow2 Forensic

arrow2 TIFF and PDF apps

arrow2 Freeware

Total Doc Converter X

Convert Doc files With Total Doc ConverterX and Python

Please, download and install Total Doc ConverterX. Using the sample code below you will be able to convert XLS to PDF, DOC, TXT, etc.

 

  Example 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)
If you need examples on other languages please contact us. We will create any example specially for you.

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 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.
  • New Total Excel Converter adds the ability to Export hidden sheets.
  • New Total Image Converter has improved working with Open Office images (.fh7 - 11).
  • After the update, our converters use a new data encryption standard: AES 128 and 256 bits.
  • The updated Total PDF Converter has improved / accelerated work with large files of 10,000 or more pages.

Newsletter Subscribe

No worries, we don't spam.


© 2020. All rights reserved. CoolUtils File Converters

Cards