See Also
dtSearch Text Retrieval Engine -- .NET API (.NET 2.0-4.0) 7.70
ExtractionOptions Class

ExtractionOptions (attached to a FileConvertJob) specifies how embedded images and attachments should be handled.

dtSearch::Engine::ExtractionOptions
C#
public class ExtractionOptions;
Visual Basic
Public Class ExtractionOptions
Remarks

During conversion, embedded images and attachments can be extracted to a folder, with links to the extracted images and attachments inserted in the output. Example:

    dtSearch.Engine.FileConverter conv = new FileConverter();
    conv.OutputToString = true;
    conv.InputFile = "c:\\docs\\sample.doc";
    conv.OutputFormat = OutputFormats.itHTML;
 
    dtSearch.Engine.ExtractionOptions extractionOptions = new dtSearch.Engine.ExtractionOptions();
    // This prevents attachments from being created with executable extensions
    extractionOptions.AllowedExtensions = "jpg jpeg pdf doc xls ppt zip";
    // Attachments with disallowed extensions will have ".data" appended to the output filename
    extractionOptions.DefaultExtension = "data";
    extractionOptions.OutputLocation = "c:\\output";
    extractionOptions.Flags = dtSearch.Engine.ExtractionOptionsFlags.dtsExoExtractAttachments |
       dtSearch.Engine.ExtractionOptionsFlags.dtsExoExtractImages |
       dtSearch.Engine.ExtractionOptionsFlags.dtsExoLimitExtensions;
    extractionOptions.FilenamePrefix = "tmp_";
    extractionOptions.OutputReference = extractionOptions.OutputLocation;
    extractionOptions.UnnamedAttachmentLinkText = "[Attachment]";
    conv.ExtractionOptions = extractionOptions;
    conv.Execute();
See Also
You are here: dtSearch::Engine Namespace > ExtractionOptions Class
Copyright (c) 1998-2012 dtSearch Corp. All rights reserved.