Solid Framework SDK 10.0.12602
SDK for converting and extracting value from PDFs
Public Member Functions | Static Public Member Functions | Properties | List of all members
SolidFramework.Services.ToTextJobEnvelope Class Reference

A job that attempts to convert a single PDF file or TIFF image into a text file while adding searchable text for scanned pages. More...

Inheritance diagram for SolidFramework.Services.ToTextJobEnvelope:
SolidFramework.Services.ToPdfJobEnvelope SolidFramework.Services.Plumbing.PdfToJobEnvelope SolidFramework.Services.Plumbing.JobEnvelope

Public Member Functions

 ToTextJobEnvelope ()
 Initializes a new instance of the ToTextJobEnvelope class.
 
override void Execute ()
 Executes this instance. More...
 
virtual string GetHashString ()
 Creates a hash of the JobEnvelope's options and it's source file to be used in duplicate envelope detection Will return null if the JobEnvelope contains unique data that excludes it from duplicate envelope detection More...
 
virtual void Cancel ()
 Cancels this instance.
 
string GetJobDescription ()
 Gets a string representation of this JobEnvelope. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 

Static Public Member Functions

static JobEnvelope Parse (string description, WorkerProcess.IMessageChannel outputChannel, Action< IEnumerable< JobEnvelopeData >, JobEnvelope > additionalOptionProcessor)
 Parses a JobEnvelope from the specified job description or throws an exception if it can't be parsed. More...
 
static bool TryParse (string description, WorkerProcess.IMessageChannel outputChannel, Action< IEnumerable< JobEnvelopeData >, JobEnvelope > additionalOptionProcessor, out JobEnvelope jobEnvelope)
 Creates a JobEnvelope from a job description (created by GetJobDescription). A return value indicates whether the conversion succeeded or failed. More...
 
static bool TryParse (string description, WorkerProcess.IMessageChannel outputChannel, out JobEnvelope jobEnvelope)
 Creates a JobEnvelope from a job description (created by GetJobDescription). A return value indicates whether the conversion succeeded or failed. More...
 
static void RegisterCustomJobEnvelopeType (Type customJobEnvelopeType)
 Registers a custom JobEnvelope type As the regular JobHandler won't understand the custom JobEnvelope type you'll also need to create a JobProcessor that uses a custom JobHandler. The JobHandler should be a console application that registers the same custom JobEnvelope types before calling new JobHandler().Run(); More...
 
static bool UnregisterCustomJobEnvelopeType (Type customJobEnvelopeType)
 Unregisters a custom JobEnvelope type More...
 

Properties

string OcrLanguage [getset]
 Gets or sets the text recovery language. The default is null (automatic language detection).
 
TextRecovery OcrMode [getset]
 Gets or sets the Text Recovery type.
 
override string Name [get]
 Gets the name for this type of JobEnvelope. More...
 
bool CreateTagged [getset]
 Gets or sets whether to tag content in the PDF. The default is false.
 
string Password [getset]
 Gets or sets the password.
 
bool GraphicsAsImages [getset]
 Gets or sets whether vector images should be converted to bitmap images. The default is false.
 
bool KeepBackgroundColorText [getset]
 Gets or sets whether to recover text that is invisible because it is exactly the same colour as the background. The default is false. More...
 
bool KeepInvisibleText [getset]
 Gets or sets whether to recover text that is invisible because it has no stroke or fill. This is typically used in PDFs to provide a searchable layer in scanned pages. The default is false.
 
PageRange PageRange [getset]
 Gets or sets the page range that should be converted. The default is null (all pages).
 
string ImageWatermarkPath [getset]
 Gets or sets the path to the watermark image file. The default is null (no watermark).
 
object CustomData [getset]
 Gets or sets the custom data. The default is null. Note: setting this to a non-string value will prevent duplicate job detection
 
string SourcePath [getset]
 Gets or sets the path to the source file.
 
IList< string > OutputPaths [get]
 Gets the list of output paths.
 
JobStatus Status [get]
 Gets the status of the conversion. This can indicate success, whether there was a problem, etc.
 
string Message [get]
 Gets the message.
 
int ID [get]
 Gets the ID.
 
bool DoProgress [getset]
 Gets or sets whether events should be raised to indicate how far the conversion has progressed. The default is false.
 
bool NoCopies [getset]
 Gets or sets whether the conversion should be performed on the original source file rather than a temporary copy. The default is false (perform the conversion on a temporary copy). Setting this to true can risk data loss if: More...
 
bool Duplicate [getset]
 Gets or sets whether the JobEnvelope is a duplicate.
 
TimeSpan ProcessDuration [get]
 Gets the time it took to process the job.
 

Detailed Description

A job that attempts to convert a single PDF file or TIFF image into a text file while adding searchable text for scanned pages.

Member Function Documentation

◆ Execute()

override void SolidFramework.Services.ToTextJobEnvelope.Execute ( )
virtual

Executes this instance.

Reimplemented from SolidFramework.Services.ToPdfJobEnvelope.

◆ GetHashString()

virtual string SolidFramework.Services.Plumbing.JobEnvelope.GetHashString ( )
virtualinherited

Creates a hash of the JobEnvelope's options and it's source file to be used in duplicate envelope detection Will return null if the JobEnvelope contains unique data that excludes it from duplicate envelope detection

Returns
A hash of the JobEnvelope's options and source file, or null if the JobEnvelope contains unique data

◆ GetJobDescription()

string SolidFramework.Services.Plumbing.JobEnvelope.GetJobDescription ( )
inherited

Gets a string representation of this JobEnvelope.

Returns
A string representation of this JobEnvelope.

◆ Parse()

static JobEnvelope SolidFramework.Services.Plumbing.JobEnvelope.Parse ( string  description,
WorkerProcess.IMessageChannel  outputChannel,
Action< IEnumerable< JobEnvelopeData >, JobEnvelope additionalOptionProcessor 
)
staticinherited

Parses a JobEnvelope from the specified job description or throws an exception if it can't be parsed.

Parameters
descriptionThe job description to parse (as created by JobEnvelope.GetJobDescription).
outputChannelThe output channel the JobEnvelope should write to.
additionalOptionProcessorA function to handle options added by JobProcessor.GetAdditionalJobOptions
Returns
The JobEnvelope that was parsed from the description.

◆ RegisterCustomJobEnvelopeType()

static void SolidFramework.Services.Plumbing.JobEnvelope.RegisterCustomJobEnvelopeType ( Type  customJobEnvelopeType)
staticinherited

Registers a custom JobEnvelope type As the regular JobHandler won't understand the custom JobEnvelope type you'll also need to create a JobProcessor that uses a custom JobHandler. The JobHandler should be a console application that registers the same custom JobEnvelope types before calling new JobHandler().Run();

Parameters
customJobEnvelopeTypeThe custom JobEnvelope type to register

◆ TryParse() [1/2]

static bool SolidFramework.Services.Plumbing.JobEnvelope.TryParse ( string  description,
WorkerProcess.IMessageChannel  outputChannel,
Action< IEnumerable< JobEnvelopeData >, JobEnvelope additionalOptionProcessor,
out JobEnvelope  jobEnvelope 
)
staticinherited

Creates a JobEnvelope from a job description (created by GetJobDescription). A return value indicates whether the conversion succeeded or failed.

Parameters
descriptionThe description of the JobEnvelope.
outputChannelThe output channel the JobEnvelope should write to.
additionalOptionProcessorA function to handle options added by JobProcessor.GetAdditionalJobOptions
jobEnvelopeThe JobEnvelope to store the result in.
Returns
true if the conversion succeeded, otherwise false.

◆ TryParse() [2/2]

static bool SolidFramework.Services.Plumbing.JobEnvelope.TryParse ( string  description,
WorkerProcess.IMessageChannel  outputChannel,
out JobEnvelope  jobEnvelope 
)
staticinherited

Creates a JobEnvelope from a job description (created by GetJobDescription). A return value indicates whether the conversion succeeded or failed.

Parameters
descriptionThe description of the JobEnvelope.
outputChannelThe output channel the JobEnvelope should write to.
jobEnvelopeThe JobEnvelope to store the result in.
Returns
true if the conversion succeeded, otherwise false.

◆ UnregisterCustomJobEnvelopeType()

static bool SolidFramework.Services.Plumbing.JobEnvelope.UnregisterCustomJobEnvelopeType ( Type  customJobEnvelopeType)
staticinherited

Unregisters a custom JobEnvelope type

Parameters
customJobEnvelopeTypeThe custom JobEnvelope type to unregister
Returns
true if the custom JobEnvelope type was registered, otherwise false

Property Documentation

◆ KeepBackgroundColorText

bool SolidFramework.Services.Plumbing.PdfToJobEnvelope.KeepBackgroundColorText
getsetinherited

Gets or sets whether to recover text that is invisible because it is exactly the same colour as the background. The default is false.

Note that if recovered it will not be obvious in the reconstructed document if the formatting is maintained, since it will still be the same colour as the background.

◆ Name

override string SolidFramework.Services.ToTextJobEnvelope.Name
get

Gets the name for this type of JobEnvelope.

The name for this type of JobEnvelope.

◆ NoCopies

bool SolidFramework.Services.Plumbing.JobEnvelope.NoCopies
getsetinherited

Gets or sets whether the conversion should be performed on the original source file rather than a temporary copy. The default is false (perform the conversion on a temporary copy). Setting this to true can risk data loss if:

  • don't have correct permissions to access source file
  • the source file disappears during conversion (i.e. the file is deleted or its drive is unmounted)
  • etc.