VintaSoft Imaging .NET SDK 15.2: Documentation for Web developer
Vintasoft.Imaging Namespace / WebFileConverterJS type / convertFileTo Methods / convertFileTo(object,function,function) Property
Syntax Exceptions Remarks BrowserCompatibility SeeAlso
In This Topic
convertFileTo(object,function,function) 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
var successFunc; // Type: function
var errorFunc; // Type: function

value = instance.convertFileTo(converterParams, successFunc, errorFunc);

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.
successFunc
Function that will be executed if request is executed successfully.
errorFunc
Function that will be executed if request is failed.
Here is function prototype "function __error(data)".
The data parameter can be:
  1. An object with following properties:
    • errorMessage (string): Error message.
    • blocked (boolean): Indicates that the requested action is blocked by another request.
    if exception is catched inside web service.
  2. Otherwise, jqXHR object.

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" functions to determine that converter does not have active file conversion and the request for file conversion was not sent.

Browser Compatibility
56+
45+
11
See Also