CoolUtils Logo

Convert HTML Files Via Command Line With Total HTML Converter

Total HTML Converter can convert HTML and MHT files to PDF, DOC, XLS, JPEG, TIFF, EMF, TXT, RTF, TXTW, OpenOffice in batch. It works via graphic user interface and command line.

Usage: HtmlConverter.exe <source> <destination> <options>
If you have a path with spaces use quotation marks.
By the way You can use macroses in the Destination path

  •  <DATE[:format]> - current date, default format is yyyymmdd
  •  <TIME[:format]> - current time, default format hhmmss

For example: destination C:\<DATE>_<TIME:hhmm> produce file C:\20160620_1312

Options:

  • -verbosity - Log file verbosity
    • error - Write to log file only errors (default)
    • detail - Write detailed log file
  • -logmode - Log file mode
    • overwrite - Overwrite (default)
    • append - Append
  • -xmllog - XML format log file name
  • -list - File with files mask to convert. Simple text file, each file on new line
  • -Recurse:off - Include subfolders
  • -do - Delete originals
  • -kfs - Keep folder structure
  • -kfl:off - Keep folder level
  • -fo - Force overwrite existed files
  • -threads - Multi thread processing (0 - auto)
  • -limit - Limit converted files to count
  • -combine:off - Combine all files into one document (pdf, tiff)
  • -ds:off - Copy original date stamps to converted documents
  • -sort - Sort source file list
    • unsorted - Unsorted, natural order (default)
    • name - Sort by file name
    • date - Sort by file modification date
    • numbers - Sort by numbers in file name
  • -ext - Use custom extension for output files
  • -optionfile - text file with options to use, "opt=value", one line - one option definition
  • -c - Convert to
    • DOC - convert to DOC
    • PDF - convert to PDF
    • XLS - convert to XLS
    • JPG - convert to JPG
    • TIFF - convert to TIFF
    • PNG - convert to PNG
    • GIF - convert to GIF
    • TXT - convert to TXT
    • RTF - convert to RTF
    • EMF - convert to EMF
    • SVG - convert to SVG
    • XHTML - convert to XHTML
    • URL - convert to URL
  • -text - Text output codepage
    • ansi - ansi
    • unicode - unicode
    • utf8 - utf8
  • -justify:off - Justify text output
  • -toc:off - Create table of contents
  • -bc - Background Color
  • -bi - Background Image
  • -bo:off - Do not print background
  • -engine - HTML render engine
    • chrome - chrome
    • internal - internal
  • -xlsmethod - XLS Convert Method
    • simple - simple
    • complex - complex
  • -pghead - IE's hearders and footers are supported. Example: (&w&bPage &p of &P) adds page numbers ("Page 1 of 10")
  • -pgfoot - IE's hearders and footers are supported. Example: (&u&b&d)
  • -headerfilename - Set the header html file for the output document
  • -footerfilename - Set the footer html file for the output document
  • -Head:off - Turn off header text
  • -HeadText - Header text. Where [page] - Page Number and [date] - current date
  • -HeadAlign - Header align
    • left - align left
    • right - align right
    • center - align center
  • -HeadFont - Header font name
  • -HeadSize - Header font size
  • -Foot:off - Turn off footer text
  • -FootText - Footer text. Where [page] - Page Number and [date] - current date
  • -FootAlign - Footer align
    • left - align left
    • right - align right
    • center - align center
  • -FootFont - Footer font name
  • -FootSize - Footer font size
  • -HeadImage - Draw picture on the header
  • -HeadImageAlign - Header image align
    • left - align left
    • right - align right
    • center - align center
  • -FooterImage - Draw picture on the footer
  • -FooterImageAlign - Footer image align
    • left - align left
    • right - align right
    • center - align center
  • -wmt - Watermark text
  • -wmr - Watermark rotate angle
  • -wtr - Watermark transparency (0-100)
  • -wmf - Watermark font [name,size,color]
  • -wmh - Watermark horizontal position
    • Left - Left
    • Center - Center
    • Right - Right
  • -wmv - Watermark vertical position
    • Top - Top
    • Center - Center
    • Bottom - Bottom
  • -wmm - Watermark margins [left,top,right,bottom]
  • -wif - Watermark image file name
  • -onefile:off - Do not break document by pages, make one long image
  • -TM - Top Margin (inches)
  • -LM - Left Margin (inches)
  • -BM - Bottom Margin (inches)
  • -RM - Right Margin (inches)
  • -po - Paper Orientation
    • Portrait - Portrait
    • Landscape - Landscape
  • -ps - Paper size
    • Letter - Letter
    • LetterSmall - LetterSmall
    • Tabloid - Tabloid
    • Ledger - Ledger
    • Legal - Legal
    • Statement - Statement
    • Executive - Executive
    • Folio - Folio
    • A0 - A0
    • A1 - A1
    • A2 - A2
    • A3 - A3
    • A4 - A4
    • A4Small - A4Small
    • A5 - A5
    • B4 - B4
    • B5 - B5
    • Quarto - Quarto
    • EnvC5 - Envelope C5
    • EnvC3 - Envelope C3
    • EnvC4 - Envelope C4
    • EnvC6 - Envelope C6
    • EnvB4 - Envelope B4
    • EnvB5 - Envelope B5
    • EnvB6 - Envelope B6
    • EnvMonarch - Envelope Monarch
    • Custom - Custom, you need to set paper dimensions
  • -pd - Custom paper size dimensions in mm <width>x<height>
  • -fitpage:off - Fit content to page
  • -fitwidth:off - Fit content to page by width
  • -enlargeimg:off - Enlarge images for PDF output
  • -zoom - Zoom image to n%
  • -pc - PDF file compression
    • Fastest - Fastest compression
    • Normal - Normal compression
    • Maximum - Maximum compression
  • -mp - PDF master (owner) password
  • -up - PDF user password
  • -perm - PDF user permissions
    • Print - Print
    • Copy - Copy
    • Modify - Modify
    • Annotation - Annotation
    • FormFill - FormFill
    • Accessibility - Accessibility
    • DocAssembly - DocAssembly
    • HighResPrint - HighResPrint
  • -PFXFile - PFX File for sign document
  • -PFXPass - The password to open the PFX file
  • -SignName - The name of the signature field to sign
  • -SignLoc - The location that the signing was done
  • -SignCon - The contact information of the signer
  • -SignRes - The reason for signing document
  • -PDFAuthor - PDF document author
  • -PDFSubject - PDF document subject
  • -PDFTitle - PDF document title
  • -PDFProducer - PDF document Producer
  • -pdfa:off - PDF/A compatibility mode
  • -pdfver - PDF document format version 1.2 - 1.6
  • -maxpages - Limit PDF document to maxpages pages
  • -tc - TIFF Image Compression
    • Uncompressed - uncompressed TIFF
    • LZW - LZW compression
    • RLE - RLE compression (packbits)
    • JPEG - JPEG compression
    • CCITT1D - Bilevel Huffman compression (CCITT1D)
    • G3FAX1D - Bilevel Group 3 CCITT compression, monodimensional (G3FAX1D)
    • G3FAX2D - Bilevel Group 3 CCITT compression, bidimensional (G3FAX2D)
    • G4FAX - Bilevel Group 4 CCITT compression, bidimensional (G4FAX)
  • -tiffpi - TIFF Photometric interpretation
    • wz - White is zero
    • bz - Black is zero
    • rgb - RGB
    • pal - RGB Palette
    • mask - Transparent mask
    • cmyk - CMYK
    • ycbcr - YCBCR
    • cielab - CIELAB
  • -dpi - Image DPI
  • -tjq - TIFF JPEG Quality (1-100)
  • -Multipage:off - Multipage tiff file
  • -dco - Doc Combine Options
    • TOC - TOC
    • EveryFileNewPage - EveryFileNewPage

Examples:

  • HtmlConverter.exe C:\Documents\index.htm C:\Pages\Doc1.doc -c doc -log c:\Log\html.txt
    Convert file index.htm into Word document Doc1.doc
  • HtmlConverter.exe http://www.CoolUtils.com C:\Pages\CoolUtils.pdf -c pdf -log c:\Log\html.txt
    Convert URL http://www.CoolUtils.com into PDF document CoolUtils.pdf
  • HtmlConverter.exe C:\Documents\*.htm C:\PDF\dest.pdf -cPDF -combine -log c:\Log\html.txt
    Convert all HTML files from this folder C:\Documents\ to PDF format and place the converted files to file C:\PDF\dest.pdf
  • HtmlConverter.exe -list List.txt C:\PDF\ -cPDF -log c:\Log\html.txt
    Convert all files from file list List.txt to PDF and place them to C:\PDF\
  • HtmlConverter.exe C:\Documents\index.htm C:\Pages\Doc1.pdf -c pdf -pfxfile c:\DigSignFile.pfx -pfxpass qwe -log c:\Log\html.txt
    Convert file index.htm into PDF document Doc1.pdf and apply digital signature
Site Map  |  Contacts |  Resellers | About |  Privacy Policy |    Copyright © 1998-2024 CoolUtils Development. All rights reserved.