You have hundreds of HTML files or saved web pages on a server that need to become PDFs — for archiving, for offline distribution, or for a workflow that delivers printable documents to end users. Opening each file in a browser and printing to PDF does not scale. Total HTML Converter X converts HTML files to PDF from the command line, in batch, with no GUI and no browser installation. Install it on a Windows server, call it from a script or via ActiveX, and let it run unattended.
*.html) and the converter processes every matching file in one run
Windows 7/8/10/11 • Server 2008/2012/2016/2019/2022
HTML is a markup language designed for web browsers. An HTML file can reference external stylesheets, images, and scripts that may not be available offline. Rendering depends on the browser engine, installed fonts, and screen size. An HTML page printed from Chrome can look different from the same page printed from Firefox or Edge.
PDF is a fixed-layout format that looks identical on every device. It preserves fonts, images, and layout exactly as intended. PDF files can be password-protected, digitally signed, and restricted against editing or printing. They open natively in every browser, mobile OS, and desktop operating system without an internet connection.
| HTML | ||
|---|---|---|
| Rendering | Varies by browser and screen size | Identical on every device |
| Offline access | May depend on external resources | Self-contained, fully offline |
| Editability | Editable source code | Read-only (by design) |
| Security | No built-in protection | Passwords, encryption, permissions |
| Printing | Results vary by browser | Consistent, print-ready output |
| Use case | Web display, dynamic content | Distribution, archiving, compliance |
Download the installer from the link above and run it on your Windows server or workstation. The setup takes under a minute. No browser or Microsoft Office installation is required — the converter uses its own rendering engine that handles HTML tags, CSS 1/2 styles, and embedded images.
Open cmd.exe or PowerShell. The converter executable is HTMLConverter.exe, located in the installation folder (typically C:\Program Files\CoolUtils\TotalHTMLConverterX\). Add it to your system PATH or use the full path in your commands.
The simplest command converts all HTML files in a folder to PDF:
HTMLConverter.exe C:\Pages\*.html C:\Output\ -c PDF
This processes every .html file in C:\Pages\ and saves the resulting PDFs in C:\Output\. Each HTML file produces one PDF with the same base name.
Control the PDF output with additional flags:
HTMLConverter.exe C:\Pages\*.html C:\Output\ -c PDF -OwnerPassword admin123 -NoPrint -NoCopy
-OwnerPassword admin123 — set a PDF owner password that controls permissions-UserPassword open456 — set a password required to open the PDF-NoPrint — disable printing in the output PDF-NoCopy — prevent text selection and copying-Watermark "CONFIDENTIAL" — stamp text across every page-PageNum — add page numbers to the footer-log C:\Logs\html2pdf.log — write a conversion log for verificationSave your command in a .bat file and schedule it with Windows Task Scheduler:
@echo off "C:\Program Files\CoolUtils\TotalHTMLConverterX\HTMLConverter.exe" C:\Incoming\*.html C:\Archive\PDF\ -c PDF -OwnerPassword secret -NoPrint -log C:\Logs\html2pdf.log
This runs the conversion every night (or at whatever interval you set) and writes a log file so you can verify the results.
Total HTML Converter X includes a full ActiveX interface. You can call the converter from any COM-compatible environment — .NET, VBScript, PHP, Python, Ruby, or ASP. This lets you embed HTML-to-PDF conversion into your own web application, intranet portal, or document workflow without shelling out to a command-line process.
Example (C#/.NET):
HTMLConverterX Cnv = new HTMLConverterX();
Cnv.Convert("C:\\Pages\\report.html", "C:\\Output\\report.pdf", "-c PDF -log c:\\Logs\\html.log");
Example (PHP):
$c = new COM("HTMLConverter.HTMLConverterX");
$c->convert("C:\\Pages\\report.html", "C:\\Output\\report.pdf", "-c PDF -log c:\\Logs\\html.log");
The same call works from ASP.NET, VBScript, Python, Ruby, Perl, and JavaScript (Windows Script Host). Your web application can accept uploaded HTML files and return PDFs to the user in real time.
| Feature | Online Converters | Total HTML Converter X |
|---|---|---|
| Batch processing | One file at a time | Unlimited files per batch |
| File privacy | Files uploaded to third-party server | Files never leave your machine |
| CSS rendering | Basic, inconsistent | Full CSS 1/2 support |
| PDF security | Rarely available | Passwords, encryption, digital signatures |
| Watermarks | Not available or branded | Custom text and image watermarks |
| Automation | Manual only | Command line, .bat, Task Scheduler, ActiveX |
| Server deployment | Not possible | Designed for servers, no GUI needed |
| Requires internet | Yes | No |
The converter uses its own rendering engine to parse HTML and CSS. You do not need Chrome, Firefox, or any browser installed on the server. This eliminates browser update issues, reduces the server footprint, and avoids the instability of headless browser automation.
Total HTML Converter X is designed for unattended use. No GUI windows, no dialog boxes, no confirmation prompts. It runs silently from the command line or as part of a service — exactly what a production server needs.
Set passwords, restrict permissions, add watermarks, insert page numbers, add digital signatures, customize headers and footers, control paper size and margins — all from the command line. Every option is available as a command-line flag or ActiveX parameter.
The same command-line tool converts HTML to DOC, XLS, TIFF, JPEG, RTF, TXT, and more. One installation covers all your HTML conversion needs. Change -c PDF to -c TIFF and you get TIFF output with the same batch and automation features.
Windows 7/8/10/11 • Server 2008/2012/2016/2019/2022
"We generate thousands of HTML reports daily from our analytics platform. Total HTML Converter X converts them to PDF on the server via ActiveX, and the results are clean and consistent. No headless browser needed, no Chrome updates breaking the pipeline. It has been running on our Windows Server for over a year without a single issue."
Martin Schlegel Lead Developer, DataServ GmbH
"Our compliance team needed to archive intranet pages as PDF for regulatory audits. We set up a nightly .bat script that converts the saved HTML pages to password-protected PDFs with watermarks. The whole batch of 500 pages runs in under ten minutes. Setup took less than an hour."
Patricia Duval IT Project Manager
"I integrated the ActiveX interface into our PHP billing system to generate invoice PDFs from HTML templates. The COM call is straightforward and the output matches the HTML layout accurately. CSS 2 rendering covers everything we need. The only thing missing is native Linux support, but on Windows Server it does exactly what we need."
Andrei Volkov Full-Stack Developer
HTMLConverter.exe C:\Pages\*.html C:\Output\ -c PDF. This converts every HTML file in the source folder to PDF. Add flags like -OwnerPassword, -NoPrint, or -Watermark to control the output.-OwnerPassword to set a password that controls permissions (printing, copying), and -UserPassword to set a password required to open the PDF.HTMLConverter.HTMLConverterX). You can call it from .NET, PHP, Python, VBScript, ASP, Ruby, Perl, and any other COM-compatible environment.
Download free trial and convert your files in minutes.
No credit card or email required.
string src="C:\\test\\Source.HTML";
string dest="C:\\test\\Dest.PDF";
HTMLConverterX Cnv = new HTMLConverterX();
Cnv.Convert(src, dest, "-c PDF -log c:\\test\\HTML.log");
MessageBox.Show("Convert complete!");
Download
.NET HTML Covnerter example
Server samples in C# specifically for ASP.net
Client application with WinForms in C#
dim C
Set C=CreateObject("HTMLConverter.HTMLConverterX")
C.Convert "c:\source.HTML", "c:\dest.JPG", "-cJPG -log c:\html.log"
C.Convert "https://www.coolutils.com/", "c:\URL Page.PDF", "-cPDF -log c:\html.log"
set C = nothing
dim C
Set C=CreateObject("HTMLConverter.HTMLConverterX")
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.html", "C:\www\ASP", "-cpdf -log c:\html.log")
set C = nothing
Example PHP:
$src="C:\\test\\test.html";
$dest="C:\\test\\test.pdf";
if (file_exists($dest)) unlink($dest);
$c= new COM("HTMLConverter.HTMLConverterX");
$c->convert($src,$dest, "-c pdf -log c:\\HTML.log");
if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;
require 'win32ole'
c = WIN32OLE.new('HTMLConverter.HTMLConverterX')
src="C:\\test\\test.html";
dest="C:\\test\\test.tiff";
c.convert(src,dest, "-c TIFF -log c:\\test\\HTML.log");
if not File.exist?(dest)
puts c.ErrorMessage
end
import win32com.client
import os.path
c = win32com.client.Dispatch("HTMLConverter.HTMLConverterX")
src="C:\\test\\test.eml";
dest="C:\\test\\test.tiff";
c.convert(src, dest, "-c TIFF -log c:\\test\\HTML.log");
if not os.path.exists(file_path):
print(c.ErrorMessage)
uses Dialogs, Vcl.OleAuto;
var
c: OleVariant;
begin
c:=CreateOleObject('HTMLConverter.HTMLConverterX');
C.Convert('c:\test\source.html', 'c:\test\dest.tiff', '-c TIFF -log c:\test\HTML.log');
IF c.ErrorMessage<>'' Then
ShowMessage(c.ErrorMessage);
end;
var c = new ActiveXObject("HTMLConverter.HTMLConverterX");
c.Convert("C:\\test\\source.html", "C:\\test\\dest.pdf", "-c PDF");
if (c.ErrorMessage!="")
alert(c.ErrorMessage)
use Win32::OLE; my $src="C:\\test\\test.html"; my $dest="C:\\test\\test.tiff"; my $c = CreateObject Win32::OLE 'HTMLConverter.HTMLConverterX'; $c->convert($src,$dest, "-c TIFF -log c:\\test\\HTML.log"); print $c->ErrorMessage if -e $dest;