Links
dtSearch Text Retrieval Engine -- Java API 7.70
ExtractionOptions Class
Classes | Legend | Members | Methods | Send Feedback

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

Class Hierarchy
public class ExtractionOptions;
File

ExtractionOptions.java

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:

        com.dtsearch.engine.FileConverter cj = new com.dtsearch.engine.FileConverter();
    cj.setInputFile(inputFilename);
    cj.setOutputToString(true);
    cj.setOutputFormat(com.dtsearch.engine.OutputFormats.itHTML);

    com.dtsearch.engine.ExtractionOptions exo = new com.dtsearch.engine.ExtractionOptions();
    exo.setOutputLocation("c:\\output");
    exo.setOutputReference("c:\\output");
    // This prevents attachments from being written with executable extensions like .exe or .bat
    exo.setAllowedExtensions("doc docx xls xlsx ppt pptx jpg jpeg png txt zip xml pdf wpd");
    // Attachments with disallowed extensions will have ".data" appended to the filename
    exo.setDefaultExtension("data");
    exo.setFlags(ExtractionOptionsFlags.dtsExoExtractImages |
         ExtractionOptionsFlags.dtsExoExtractAttachments |
         ExtractionOptionsFlags.dtsExoLimitExtensions);
    cj.setExtractionOptions(exo);

    cj.execute();
Group
Methods
Method 
Description 
If the dtsExoLimitExtensions flag is set, image and attachment filename extensions will be limited to the values listed in allowedExtensions. 
Extension to add to images and attachments when the dtsExoLimitExtensions flags is set and an image or attachment has an extension that is not listed in allowedExtensions. 
Filename prefix for extracted files stored in outputLocation 
Name of text file to create with the names of all images and attachments extracted to the outputLocation. 
Output folder for images and attachments extracted from the input file 
URL of the outputLocation for links in the conversion output. 
Text to use for link to an attachment that has no name 
Legend
 
Method 
Links
You are here: Classes > ExtractionOptions Class
Copyright (c) 1998-2012 dtSearch Corp. All rights reserved.