VintaSoft Imaging .NET SDK 14.1: Документация для Веб разработчика
Vintasoft.Imaging.DocumentViewer Namespace / WebDocumentViewerJS type / exportFile Methods / exportFile(Vintasoft.Imaging.WebExportFileSettingsJS,function) Property
Syntax Exceptions Example BrowserCompatibility SeeAlso
exportFile(Vintasoft.Imaging.WebExportFileSettingsJS,function) Метод
Exports images (with annotations), which are loaded in web image viewer, to a file.
Синтаксис
var instance = new Vintasoft.Imaging.DocumentViewer.WebDocumentViewerJS(settings);

var value; // Type: any

// Parameters
var exportFileSettings; // Type: WebExportFileSettingsJS
var successFunc; // Type: function

value = instance.exportFile(exportFileSettings, successFunc);

Parameters

exportFileSettings
Экземпляр класса WebExportFileSettingsJS, который определяет настройки файла экспорта.
successFunc
Функция, которая будет выполнена, если запрос выполнен успешно.
Вот прототип функции "function __success(data)".
Параметр 'data' имеет следующие свойства:
  • imageInfos (object): Информация об изображениях в файле изображения.
  • isAuthenticationRequired (boolean): Значение, указывающее, требует ли текущий файл изображения аутентификации.
  • images (object): Массив объектов WebImageJS, созданный с использованием свойства imageInfos.
Исключения
ИсключениеОписание
Выбрасывается, если аргумент имеет неправильный тип.
Пример

ThisJavaScriptcodeshowshowtosaveimageswithannotationtoafile:
                  // create the export file settings
                  var exportFileSettings = new Vintasoft.Imaging.WebExportFileSettingsJS();
                  // specify the indexes of images, which must be saved
                  exportFileSettings.set_ImageIndexes([ 0, 2, 0, 1 ]);
                  // specify the name of the file, where images must be saved
                  exportFileSettings.set_FileId("document.pdf");
                  // specify that annotations must be saved with images
                  exportFileSettings.set_SaveAnnotations(true);
           
                  // export images to a file
                  docViewer1.exportFile(
                      exportFileSettings,
                      function(data) {
                          console.log("File is exported successfully.");
                      }
                  );

Совместимость с веб браузерами
9
5
11
5
Смотрите также