Mht Tcl Reference Documentation
Mht
Current Version: 10.1.0
Chilkat MHT can generate email objects from HTML files and URLs, and convert HTML to MHT or EML files.
Object Creation
set myMht [new CkMht]
Properties
AbortCurrent
set boolVal [CkMht_get_AbortCurrent $myMht]
CkMht_put_AbortCurrent $myMht $boolVal
When set to 1, causes the currently running method to abort. Methods that always finish quickly (i.e.have no length file operations or network communications) are not affected. If no method is running, then this property is automatically reset to 0 when the next method is called. When the abort occurs, this property is reset to 0. Both synchronous and asynchronous method calls can be aborted. (A synchronous method call could be aborted by setting this property from a separate thread.)
topBaseUrl
# ckStr is a CkString
CkMht_get_BaseUrl $myMht $ckStr
set strVal [CkMht_get_baseUrl $myMht]
CkMht_put_BaseUrl $myMht $strVal
When processing an HTML file or string (not a website URL), this defines the base URL to be used when converting relative HREFs to absolute HREFs.
topConnectTimeout
set intVal [CkMht_get_ConnectTimeout $myMht]
CkMht_put_ConnectTimeout $myMht $intVal
The amount of time in seconds to wait before timing out when connecting to an HTTP server. The default value is 10 seconds.
topDebugHtmlAfter
# ckStr is a CkString
CkMht_get_DebugHtmlAfter $myMht $ckStr
set strVal [CkMht_get_debugHtmlAfter $myMht]
CkMht_put_DebugHtmlAfter $myMht $strVal
A filename to save the result HTML when converting a URL, file, or HTML string. If problems are experienced, the before/after HTML can be analyzed to help determine the cause.
topDebugHtmlBefore
# ckStr is a CkString
CkMht_get_DebugHtmlBefore $myMht $ckStr
set strVal [CkMht_get_debugHtmlBefore $myMht]
CkMht_put_DebugHtmlBefore $myMht $strVal
A filename to save the input HTML when converting a URL, file, or HTML string. If problems are experienced, the before/after HTML can be analyzed to help determine the cause.
topDebugLogFilePath
# ckStr is a CkString
CkMht_get_DebugLogFilePath $myMht $ckStr
set strVal [CkMht_get_debugLogFilePath $myMht]
CkMht_put_DebugLogFilePath $myMht $strVal
If set to a file path, causes each Chilkat method or property call to automatically append it's LastErrorText to the specified log file. The information is appended such that if a hang or crash occurs, it is possible to see the context in which the problem occurred, as well as a history of all Chilkat calls up to the point of the problem. The VerboseLogging property can be set to provide more detailed information.
This property is typically used for debugging the rare cases where a Chilkat method call hangs or generates an exception that halts program execution (i.e. crashes). A hang or crash should generally never happen. The typical causes of a hang are:
- a timeout related property was set to 0 to explicitly indicate that an infinite timeout is desired,
- the hang is actually a hang within an event callback (i.e. it is a hang within the application code), or
- there is an internal problem (bug) in the Chilkat code that causes the hang.
DebugTagCleaning
set boolVal [CkMht_get_DebugTagCleaning $myMht]
CkMht_put_DebugTagCleaning $myMht $boolVal
When 1 causes the Mht class to be much more verbose in its logging. The default is 0.
topEmbedImages
set boolVal [CkMht_get_EmbedImages $myMht]
CkMht_put_EmbedImages $myMht $boolVal
Controls whether images are embedded in the MHT/EML, or whether the IMG SRC attributes are left as external URL references. If false, the IMG SRC tags are converted to absolute URLs (if necessary) and the images are not embedded within the MHT/EML.
topEmbedLocalOnly
set boolVal [CkMht_get_EmbedLocalOnly $myMht]
CkMht_put_EmbedLocalOnly $myMht $boolVal
If 1, only images found on the local filesystem (i.e. links to files) will be embedded within the MHT.
topFetchFromCache
set boolVal [CkMht_get_FetchFromCache $myMht]
CkMht_put_FetchFromCache $myMht $boolVal
If 1, page parts such as images, style sheets, etc. will be fetched from the disk cache if possible. The disk cache root may be defined by calling AddCacheRoot. The default value is 0.
topIgnoreMustRevalidate
set boolVal [CkMht_get_IgnoreMustRevalidate $myMht]
CkMht_put_IgnoreMustRevalidate $myMht $boolVal
Some HTTP responses contain a "Cache-Control: must-revalidate" header. If this is present, the server is requesting that the client always issue a revalidate HTTP request instead of serving the page directly from cache. If IgnoreMustRevalidate is set to 1, then Chilkat MHT will serve the page directly from cache without revalidating until the page is no longer fresh. (assuming that FetchFromCache is set to 1)
The default value of this property is 0.
topIgnoreNoCache
set boolVal [CkMht_get_IgnoreNoCache $myMht]
CkMht_put_IgnoreNoCache $myMht $boolVal
Some HTTP responses contain headers of various types that indicate that the page should not be cached. Chilkat MHT will adhere to this unless this property is set to 1.
The default value of this property is 0.
topLastErrorHtml
# ckStr is a CkString
CkMht_get_LastErrorHtml $myMht $ckStr
set strVal [CkMht_get_lastErrorHtml $myMht]
Provides information in HTML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.
topLastErrorText
# ckStr is a CkString
CkMht_get_LastErrorText $myMht $ckStr
set strVal [CkMht_get_lastErrorText $myMht]
Provides information in plain-text format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.
LastErrorXml
# ckStr is a CkString
CkMht_get_LastErrorXml $myMht $ckStr
set strVal [CkMht_get_lastErrorXml $myMht]
Provides information in XML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.
topLastMethodSuccess
set boolVal [CkMht_get_LastMethodSuccess $myMht]
CkMht_put_LastMethodSuccess $myMht $boolVal
Indicate whether the last method call succeeded or failed. A value of 1 indicates success, a value of 0 indicates failure. This property is automatically set for method calls. It is not modified by property accesses. The property is automatically set to indicate success for the following types of method calls:
- Any method that returns a string.
- Any method returning a Chilkat object, binary bytes, or a date/time.
- Any method returning a standard boolean status value where success = 1 and failure = 0.
- Any method returning an integer where failure is defined by a return value less than zero.
Note: Methods that do not fit the above requirements will always set this property equal to 1. For example, a method that returns no value (such as a "void" in C++) will technically always succeed.
topNoScripts
set boolVal [CkMht_get_NoScripts $myMht]
CkMht_put_NoScripts $myMht $boolVal
Only applies when creating MHT files. Scripts are always removed when creating EML or emails from HTML. If set to 1, then all scripts are removed, if set to 0 (the default) then scripts are not removed.
topNtlmAuth
set boolVal [CkMht_get_NtlmAuth $myMht]
CkMht_put_NtlmAuth $myMht $boolVal
Setting this property to 1 causes the MHT component to use NTLM authentication (also known as IWA -- or Integrated Windows Authentication) when authentication with an HTTP server.
The default value of this property is 0.
topNumCacheLevels
set intVal [CkMht_get_NumCacheLevels $myMht]
CkMht_put_NumCacheLevels $myMht $intVal
The number of directory levels to be used under each cache root. The default is 0, meaning that each cached item is stored in a cache root directory. A value of 1 causes each cached page to be stored in one of 255 subdirectories named "0","1", "2", ..."255" under a cache root. A value of 2 causes two levels of subdirectories ("0..255/0..255") under each cache root. The MHT control automatically creates subdirectories as needed. The reason for mutliple levels is to alleviate problems that may arise when huge numbers of files are stored in a single directory. For example, Windows Explorer does not behave well when trying to display the contents of directories with thousands of files.
topNumCacheRoots
set intVal [CkMht_get_NumCacheRoots $myMht]
The number of cache roots to be used for the disk cache. This allows the disk cache spread out over multiple disk drives. Each cache root is a string indicating the drive letter and directory path. For example, "E:\Cache". To create a cache with four roots, call AddCacheRoot once for each directory root.
topPreferIpv6
set boolVal [CkMht_get_PreferIpv6 $myMht]
CkMht_put_PreferIpv6 $myMht $boolVal
If 1, then use IPv6 over IPv4 when both are supported for a particular domain. The default value of this property is 0, which will choose IPv4 over IPv6.
topPreferMHTScripts
set boolVal [CkMht_get_PreferMHTScripts $myMht]
CkMht_put_PreferMHTScripts $myMht $boolVal
This property provides a means for the noscript option to be selected when possible. If PreferMHTScripts = 0, then scripts with noscript alternatives are removed and the noscript content is kept. If 1 (the default), then scripts are preserved and the noscript options are discarded.
topProxy
# ckStr is a CkString
CkMht_get_Proxy $myMht $ckStr
set strVal [CkMht_get_proxy $myMht]
CkMht_put_Proxy $myMht $strVal
(Optional) A proxy host:port if a proxy is necessary to access the Internet. The proxy string should be formatted as "hostname:port", such as "www.chilkatsoft.com:100".
topProxyLogin
# ckStr is a CkString
CkMht_get_ProxyLogin $myMht $ckStr
set strVal [CkMht_get_proxyLogin $myMht]
CkMht_put_ProxyLogin $myMht $strVal
If an HTTP proxy is used and it requires authentication, this property specifies the HTTP proxy login.
topProxyPassword
# ckStr is a CkString
CkMht_get_ProxyPassword $myMht $ckStr
set strVal [CkMht_get_proxyPassword $myMht]
CkMht_put_ProxyPassword $myMht $strVal
If an HTTP proxy is used and it requires authentication, this property specifies the HTTP proxy password.
topReadTimeout
set intVal [CkMht_get_ReadTimeout $myMht]
CkMht_put_ReadTimeout $myMht $intVal
The amount of time in seconds to wait before timing out when reading from an HTTP server. The ReadTimeout is the amount of time that needs to elapse while no additional data is forthcoming. During a long data transfer, if the data stream halts for more than this amount, it will timeout. Otherwise, there is no limit on the length of time for the entire data transfer.
The default value is 20 seconds.
topRequireSslCertVerify
set boolVal [CkMht_get_RequireSslCertVerify $myMht]
CkMht_put_RequireSslCertVerify $myMht $boolVal
If 1, then the HTTP client will verify the server's SSL certificate. The certificate is expired, or if the cert's signature is invalid, the connection is not allowed. The default value of this property is 0.
topSocksHostname
# ckStr is a CkString
CkMht_get_SocksHostname $myMht $ckStr
set strVal [CkMht_get_socksHostname $myMht]
CkMht_put_SocksHostname $myMht $strVal
The SOCKS4/SOCKS5 hostname or IPv4 address (in dotted decimal notation). This property is only used if the SocksVersion property is set to 4 or 5).
topSocksPassword
# ckStr is a CkString
CkMht_get_SocksPassword $myMht $ckStr
set strVal [CkMht_get_socksPassword $myMht]
CkMht_put_SocksPassword $myMht $strVal
The SOCKS5 password (if required). The SOCKS4 protocol does not include the use of a password, so this does not apply to SOCKS4.
topSocksPort
set intVal [CkMht_get_SocksPort $myMht]
CkMht_put_SocksPort $myMht $intVal
The SOCKS4/SOCKS5 proxy port. The default value is 1080. This property only applies if a SOCKS proxy is used (if the SocksVersion property is set to 4 or 5).
topSocksUsername
# ckStr is a CkString
CkMht_get_SocksUsername $myMht $ckStr
set strVal [CkMht_get_socksUsername $myMht]
CkMht_put_SocksUsername $myMht $strVal
The SOCKS4/SOCKS5 proxy username. This property is only used if the SocksVersion property is set to 4 or 5).
topSocksVersion
set intVal [CkMht_get_SocksVersion $myMht]
CkMht_put_SocksVersion $myMht $intVal
SocksVersion May be set to one of the following integer values:
0 - No SOCKS proxy is used. This is the default.
4 - Connect via a SOCKS4 proxy.
5 - Connect via a SOCKS5 proxy.
UnpackDirect
set boolVal [CkMht_get_UnpackDirect $myMht]
CkMht_put_UnpackDirect $myMht $boolVal
If 1, then the UnpackMHT and UnpackMHTString methods will unpack the MHT directly with no transformations. Normally, the related parts are unpacked to a "parts" sub-directory, and the unpacked HTML is edited to update references to point to the unpacked image and script files. When unpacking direct, the HTML is not edited, and the related parts are unpacked to sub-directories rooted in the directory where HTML file is created (i.e. the unpack directory). When unpacking direct, the "partsSubDir" argument of the UnpackMHT* methods is unused.
Note: It is only possible to directly unpack MHT files where the Content-Location headers DO NOT contain URLs. The MHT must be such that the Content-Location headers of the related items contain relative paths.
Note: The default value of this property is 0.
topUnpackUseRelPaths
set boolVal [CkMht_get_UnpackUseRelPaths $myMht]
CkMht_put_UnpackUseRelPaths $myMht $boolVal
Controls whether absolute or relative paths are used when referencing images in the unpacked HTML. The default value is 1 indicating that relative paths will be used. To use absolute paths, set this property value equal to 0.
topUpdateCache
set boolVal [CkMht_get_UpdateCache $myMht]
CkMht_put_UpdateCache $myMht $boolVal
Controls whether the cache is automatically updated with the responses from HTTP GET requests. If 1, the disk cache is updated, if 0 (the default), the cache is not updated.
topUseCids
set boolVal [CkMht_get_UseCids $myMht]
CkMht_put_UseCids $myMht $boolVal
Controls whether CID URLs are used for embedded references when generating MHT or EML documents. If UseCids is 0, then URLs are left unchanged and the embedded items will contain "content-location" headers that match the URLs in the HTML. If 1, CIDs are generated and the URLs within the HTML are replaced with "CID:" links.
The default value of this property is 1.
topUseFilename
set boolVal [CkMht_get_UseFilename $myMht]
CkMht_put_UseFilename $myMht $boolVal
If 1, a "filename" attribute is added to each Content-Disposition MIME header field for each embedded item (image, style sheet, etc.). If 0, then no filename attribute is added.
The default value of this property is 1.
topUseIEProxy
set boolVal [CkMht_get_UseIEProxy $myMht]
CkMht_put_UseIEProxy $myMht $boolVal
If 1, the proxy host/port used by Internet Explorer will also be used by Chilkat MHT.
topUseInline
set boolVal [CkMht_get_UseInline $myMht]
CkMht_put_UseInline $myMht $boolVal
If 1, an "inline" attribute is added to each Content-Disposition MIME header field for each embedded item (image, style sheet, etc.). If 0, then no inline attribute is added.
The default value of this property is 1.
topUtf8
set boolVal [CkMht_get_Utf8 $myMht]
CkMht_put_Utf8 $myMht $boolVal
When set to 1, all "const char *" arguments are interpreted as utf-8 strings. If set to 0 (the default), then "const char *" arguments are interpreted as ANSI strings. Also, when set to 1, and Chilkat method returning a "const char *" is returning the utf-8 representation. If set to 0, all "const char *" return values are ANSI strings.
topVerboseLogging
set boolVal [CkMht_get_VerboseLogging $myMht]
CkMht_put_VerboseLogging $myMht $boolVal
If set to 1, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is 0. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.
topVersion
WebSiteLogin
# ckStr is a CkString
CkMht_get_WebSiteLogin $myMht $ckStr
set strVal [CkMht_get_webSiteLogin $myMht]
CkMht_put_WebSiteLogin $myMht $strVal
(Optional) Specifies the login if a a Web page is accessed that requires a login
topWebSiteLoginDomain
# ckStr is a CkString
CkMht_get_WebSiteLoginDomain $myMht $ckStr
set strVal [CkMht_get_webSiteLoginDomain $myMht]
CkMht_put_WebSiteLoginDomain $myMht $strVal
The optional domain name to be used with NTLM authentication.
topWebSitePassword
# ckStr is a CkString
CkMht_get_WebSitePassword $myMht $ckStr
set strVal [CkMht_get_webSitePassword $myMht]
CkMht_put_WebSitePassword $myMht $strVal
Optional) Specifies the password if a a Web page is accessed that requires a login and password
topMethods
AddCacheRoot
CkMht_AddCacheRoot $dir
If disk caching is used, this must be called once for each cache root. For example, if the cache is spread across D:\cacheRoot, E:\cacheRoot, and F:\cacheRoot, an application would setup the cache object by calling AddRoot three times -- once with "D:\cacheRoot", once with "E:\cacheRoot", and once with "F:\cacheRoot".
AddCustomHeader
# value is a string
CkMht_AddCustomHeader $name $value
Adds a custom HTTP header to all HTTP requests sent by the MHT component. To add multiple header fields, call this method once for each custom header.
topAddExternalStyleSheet
CkMht_AddExternalStyleSheet $url
(This method rarely needs to be called.) Includes an additional style sheet that would not normally be included with the HTML. This method is provided for cases when style sheet names are constructed and dynamically included in Javascript such that MHT .NET cannot know beforehand what stylesheet to embed. MHT .NET by default downloads and embeds all stylesheets externally referenced by the HTML
topClearCustomHeaders
Removes all custom headers that may have accumulated from previous calls to AddCustomHeader.
topExcludeImagesMatching
CkMht_ExcludeImagesMatching $pattern
(This method rarely needs to be called.) Tells Chilkat MHT .NET to not embed any images whose URL matches a pattern. Sometimes images can be referenced within style sheets and not actually used when rendering the page. In cases like those, the image will appear as an attachment in the HTML email. This feature allows you to explicitly remove those images from the email so no attachments appear.
topGetAndSaveEML
# emlPath is a string
set status [CkMht_GetAndSaveEML $url_or_htmlFilepath $emlPath]
Creates an EML file from a web page or HTML file. All external images and style sheets are downloaded and embedded in the EML file.
Returns 1 for success, 0 for failure.
topGetAndSaveEMLAsync (1)
# url_or_htmlFilepath is a string
# emlPath is a string
set ret_task [CkMht_GetAndSaveEMLAsync $url_or_htmlFilepath $emlPath]
Creates an asynchronous task to call the GetAndSaveEML method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topGetAndSaveMHT
# mhtPath is a string
set status [CkMht_GetAndSaveMHT $url_or_htmlFilepath $mhtPath]
Creates an MHT file from a web page or local HTML file. All external images, scripts, and style sheets are downloaded and embedded in the MHT file.
Returns 1 for success, 0 for failure.
GetAndSaveMHTAsync (1)
# url_or_htmlFilepath is a string
# mhtPath is a string
set ret_task [CkMht_GetAndSaveMHTAsync $url_or_htmlFilepath $mhtPath]
Creates an asynchronous task to call the GetAndSaveMHT method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topGetAndZipEML
# zipEntryFilename is a string
# zipFilename is a string
set status [CkMht_GetAndZipEML $url_or_htmlFilepath $zipEntryFilename $zipFilename]
Creates an EML file from a web page or HTML file, compresses, and appends to a new or existing Zip file. All external images and style sheets are downloaded and embedded in the EML.
Returns 1 for success, 0 for failure.
topGetAndZipEMLAsync (1)
# url_or_htmlFilepath is a string
# zipEntryFilename is a string
# zipFilename is a string
set ret_task [CkMht_GetAndZipEMLAsync $url_or_htmlFilepath $zipEntryFilename $zipFilename]
Creates an asynchronous task to call the GetAndZipEML method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topGetAndZipMHT
# zipEntryFilename is a string
# zipFilename is a string
set status [CkMht_GetAndZipMHT $url_or_htmlFilepath $zipEntryFilename $zipFilename]
Creates an MHT file from a web page or HTML file, compresses, and appends to a new or existing Zip file. All external images and style sheets are downloaded and embedded in the MHT.
Returns 1 for success, 0 for failure.
topGetAndZipMHTAsync (1)
# url_or_htmlFilepath is a string
# zipEntryFilename is a string
# zipFilename is a string
set ret_task [CkMht_GetAndZipMHTAsync $url_or_htmlFilepath $zipEntryFilename $zipFilename]
Creates an asynchronous task to call the GetAndZipMHT method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topGetCacheRoot
# outStr is a CkString (output)
set status [CkMht_GetCacheRoot $index $outStr]
set retStr [CkMht_getCacheRoot $myMht $index]
Returns the Nth cache root (indexing begins at 0). Cache roots are set by calling AddCacheRoot one or more times.
Returns 1 for success, 0 for failure.
topGetEML
# outStr is a CkString (output)
set status [CkMht_GetEML $url_or_htmlFilepath $outStr]
set retStr [CkMht_getEML $myMht $url_or_htmlFilepath]
Creates EML from a web page or HTML file, and returns the EML (MIME) message data as a string.
Returns 1 for success, 0 for failure.
topGetEMLAsync (1)
# url_or_htmlFilepath is a string
set ret_task [CkMht_GetEMLAsync $url_or_htmlFilepath]
Creates an asynchronous task to call the GetEML method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topGetMHT
# outStr is a CkString (output)
set status [CkMht_GetMHT $url_or_htmlFilepath $outStr]
set retStr [CkMht_getMHT $myMht $url_or_htmlFilepath]
Creates MHT from a web page or local HTML file, and returns the MHT (MIME) message data as a string
Returns 1 for success, 0 for failure.
topGetMHTAsync (1)
# url_or_htmlFilepath is a string
set ret_task [CkMht_GetMHTAsync $url_or_htmlFilepath]
Creates an asynchronous task to call the GetMHT method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topHtmlToEML
# outStr is a CkString (output)
set status [CkMht_HtmlToEML $htmlText $outStr]
set retStr [CkMht_htmlToEML $myMht $htmlText]
Creates an in-memory EML string from an in-memory HTML string. All external images and style sheets are downloaded and embedded in the EML string that is returned.
Returns 1 for success, 0 for failure.
topHtmlToEMLAsync (1)
# htmlText is a string
set ret_task [CkMht_HtmlToEMLAsync $htmlText]
Creates an asynchronous task to call the HtmlToEML method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topHtmlToEMLFile
# emlFilename is a string
set status [CkMht_HtmlToEMLFile $html $emlFilename]
Creates an EML file from an in-memory HTML string. All external images and style sheets are downloaded and embedded in the EML file.
Returns 1 for success, 0 for failure.
topHtmlToEMLFileAsync (1)
# html is a string
# emlFilename is a string
set ret_task [CkMht_HtmlToEMLFileAsync $html $emlFilename]
Creates an asynchronous task to call the HtmlToEMLFile method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topHtmlToMHT
# outStr is a CkString (output)
set status [CkMht_HtmlToMHT $htmlText $outStr]
set retStr [CkMht_htmlToMHT $myMht $htmlText]
Creates an in-memory MHT web archive from an in-memory HTML string. All external images and style sheets are downloaded and embedded in the MHT string.
Returns 1 for success, 0 for failure.
topHtmlToMHTAsync (1)
# htmlText is a string
set ret_task [CkMht_HtmlToMHTAsync $htmlText]
Creates an asynchronous task to call the HtmlToMHT method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topHtmlToMHTFile
# mhtFilename is a string
set status [CkMht_HtmlToMHTFile $html $mhtFilename]
Creates an MHT file from an in-memory HTML string. All external images and style sheets are downloaded and embedded in the MHT file.
Returns 1 for success, 0 for failure.
topHtmlToMHTFileAsync (1)
# html is a string
# mhtFilename is a string
set ret_task [CkMht_HtmlToMHTFileAsync $html $mhtFilename]
Creates an asynchronous task to call the HtmlToMHTFile method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)
Returns NULL on failure
topLoadTaskCaller
set status [CkMht_LoadTaskCaller $task]
RemoveCustomHeader
CkMht_RemoveCustomHeader $name
Removes a custom header by header field name.
topRestoreDefaults
Restores the default property settings.
topUnpackMHT
# unpackDir is a string
# htmlFilename is a string
# partsSubDir is a string
set status [CkMht_UnpackMHT $mhtFilename $unpackDir $htmlFilename $partsSubDir]
Unpacks the contents of a MHT file. The destination directory is specified by unpackDir. The name of the HTML file created is specified by htmlFilename, and supporting files (images, javascripts, etc.) are created in partsSubDir, which is automatically created if it does not already exist.
Returns 1 for success, 0 for failure.
UnpackMHTString
# unpackDir is a string
# htmlFilename is a string
# partsSubDir is a string
set status [CkMht_UnpackMHTString $mhtString $unpackDir $htmlFilename $partsSubDir]
Same as UnpackMHT, except the MHT is passed in as an in-memory string.
Returns 1 for success, 0 for failure.