VintaSoft Imaging .NET SDK 15.0: Documentation for Web developer
Vintasoft.Imaging Namespace / WebFileConverterJS type / convertFileTo Methods / convertFileTo(object) Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
In This Topic
    convertFileTo(object) Method
    In This Topic
    Sends an asynchronous request for converting the specified image/document file.
    Syntax
    var instance = new Vintasoft.Imaging.WebFileConverterJS(updateTimeout, service);
    
    var value; // Type: Vintasoft.Shared.WebRequestJS
    
    // Parameters
    var converterParams; // Type: object
    
    value = instance.convertFileTo(converterParams);
    
    
    function convertFileTo(
    converterParams
    Settings for converting of image/document file.
    An object with following properties:
    • fileId (string): A file identifier. Required parameter.
    • encoderSettings (object): An instance of WebImageEncoderSettingsJS class that defines the encoder settings. Required parameter.
    • password (string): A file password. Optional parameter, default value is null.
    • renderingSettings (object): WebRenderingSettingsJS object. Optional parameter, default value is null.
    • pageSize (object): The page size settings.
    • createFileInCacheFolder (boolean): A value indicating whether converter file must be created in cache folder. True - converter file must be created in cache folder (by default folder "VintasoftCache/{SessionId}/ConvertedFiles/"); False - converted file must be created in folder with source file (by default folder "UploadedImageFiles/{SessionId}/"). Default value is True.
    : object
    ) : WebRequestJS;

    Parameters

    converterParams
    Settings for converting of image/document file.
    An object with following properties:
    • fileId (string): A file identifier. Required parameter.
    • encoderSettings (object): An instance of WebImageEncoderSettingsJS class that defines the encoder settings. Required parameter.
    • password (string): A file password. Optional parameter, default value is null.
    • renderingSettings (object): WebRenderingSettingsJS object. Optional parameter, default value is null.
    • pageSize (object): The page size settings.
    • createFileInCacheFolder (boolean): A value indicating whether converter file must be created in cache folder. True - converter file must be created in cache folder (by default folder "VintasoftCache/{SessionId}/ConvertedFiles/"); False - converted file must be created in folder with source file (by default folder "UploadedImageFiles/{SessionId}/"). Default value is True.

    Return Value

    Request object.
    Exceptions
    ExceptionDescription
    Thrown if arguments have wrong types.
    Thrown if image file converter already has active image file converting process OR converter already sent the request.
    Remarks

    Before calling this method you must call the "get_IsStarted" and "get_IsActive" to determine that converter does not have active convertation and the request was not sent.

    Browser Compatibility
    56+
    45+
    11
    See Also