Links
dtSearch Text Retrieval Engine Programmer's Reference 7.70
DFileConvertJob Class
Data Members | Classes | Legend | Members | Methods | SetInputItem Method | SetInputText Method | Send Feedback

Class wrapper around dtsFileConvertJob2; used to convert files to HTML, RTF, or Ansi text.

Class Hierarchy
class DFileConvertJob : public DOutputBase;
File

dtsfc.h

Remarks

DFileConvertJob provides an easy way to display retrieved files in a web browser, web browser control, or other viewer with hits highlighted. 

When working with search results, the recommended way to set up DFileConvertJob is to use SetInputItem, which automatically sets up the DFileConvertJob based on data in the search results object. 

If a list of hits is provided, these hits will be highlighted using the BeforeHit and AfterHit markers in the output document. The Header and Footer markers will appear at the beginning and end of the output file. Output can go to a disk file (SetOutputToFile), a memory buffer (SetOutputToString) or a callback function (SetOutputToCallback). Input can come from a disk file (InputFile) or from a memory buffer (SetInputText). 

See the DJobBase base class for execution control functions (Cancel(), GetErrors(), etc.) common to the C++ support classes.

Data Members
DOutputBase Class
Data Member 
Description 
Text inserted after each hit 
Text inserted before each hit 
Text inserted at the end of the file 
Text inserted at the start of the file 
For HTML output, an HREF for a BASE tag to be inserted in the header. 
For HTML output, HTML tags to insert in the header 
Name of file to create, if the output is to be written to a file. 
DFileConvertJob Class
Data Member 
Description 
The location of the dtSearch alphabet file to use when highlighting hits. 
The index in which the document was found. 
Input file to be converted 
Group
Methods
Method 
Description 
Requests termination of the job in progress. 
Requests immediate termination of the job in progress. 
Called to execute a job. 
Returns non-zero if the job failed 
Format all errors that occurred during execution as a single string, with line breaks separating the errors 
Returns the number of errors recorded during execution 
Returns a dtsErrorInfo with any errors that occurred during execution 
Returns true if the job has been cancelled 
Returns true if the job has started and is not yet done. 
Called while a job is executing every time the dtSearch Engine checks to see if the job has been cancelled. 
Called while a job is executing if an error is encountered, with the error code and message. 
Not used 
SetTimeout() causes a job to cancel automatically after the specified number of seconds 
Do not pump waiting windows messages during callbacks 
DOutputBase Class
Method 
Description 
Clear all fields to default values 
Called to execute a job. 
If output was to a string, returns a pointer to the output string 
Get the length of the output string 
Returns true if output was directed to a string 
Called while a job is executing every time the dtSearch Engine checks to see if the job has been cancelled. 
 
Callback function to receive output as it is generated 
Callback function to update the progress of the conversion or search report 
Specifies the format of the converted text. 
Send output only to the virtual callback function, OnOutput 
Send output to a file 
Send output to a string buffer managed by the class, and set the maximum length of the output string. 
DFileConvertJob Class
Method 
Description 
Execute the job 
The file type of the input document, as detected by the dtSearch file parsers during the conversion 
Returns the ConvertFlags for the job 
Returns the document id for the document in the index it was retrieved from. 
The file type of the input document when it was indexed. 
Set a ConvertFlags value for this job 
Set ConvertFlags for this job 
Set the word offsets of hits to highlight. 
Set the build number used to index this file for purposes of maintaining backward compatibility (this will eliminate some compatibility issues but not all). 
! Reserved for internal use 
This is the overview for the SetInputItem method overload. 
! obsolete -- use SetInputStream 
DFileConvertJob can get input from a file, a memory buffer, or from a dtsInputStream. Use SetInputStream to attach a dtsInputStream to use as input. 
This is the overview for the SetInputText method overload. 
The file type of the input document when it was indexed. 
Legend
 
Method 
 
virtual 
 
abstract 
 
Data Member 
Links
You are here: C++ Support Classes > dtSearch Namespace > Classes > DFileConvertJob Class
Copyright (c) 1995-2012 dtSearch Corp. All rights reserved.