/// <summary> /// Initializes a new instance of the <see cref="SaveAsTiffOnlineRequest"/> class. /// </summary> /// <param name="document">The document.</param> /// <param name="saveOptions">Tiff save options.</param> /// <param name="loadEncoding">Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.</param> /// <param name="password">Password for opening an encrypted document.</param> /// <param name="useAntiAliasing">The flag indicating whether to use antialiasing.</param> /// <param name="useHighQualityRendering">The flag indicating whether to use high quality.</param> /// <param name="imageBrightness">The level of brightness for the generated images.</param> /// <param name="imageColorMode">The color mode for the generated images.</param> /// <param name="imageContrast">The contrast for the generated images.</param> /// <param name="numeralFormat">The images numeral format.</param> /// <param name="pageCount">The number of pages to render.</param> /// <param name="pageIndex">The index of the page to start rendering.</param> /// <param name="paperColor">The background image color.</param> /// <param name="pixelFormat">The pixel format of the generated images.</param> /// <param name="resolution">The resolution of the generated images.</param> /// <param name="scale">The zoom factor for the generated images.</param> /// <param name="tiffCompression">The compression tipe.</param> /// <param name="dmlRenderingMode">The optional dml rendering mode. The default value is Fallback.</param> /// <param name="dmlEffectsRenderingMode">The optional dml effects rendering mode. The default value is Simplified.</param> /// <param name="tiffBinarizationMethod">The optional TIFF binarization method. Possible values are: FloydSteinbergDithering, Threshold.</param> /// <param name="zipOutput">The flag indicating whether to ZIP the output.</param> /// <param name="fontsLocation">Folder in filestorage with custom fonts.</param> public SaveAsTiffOnlineRequest(System.IO.Stream document, TiffSaveOptionsData saveOptions, string loadEncoding = null, string password = null, bool? useAntiAliasing = null, bool? useHighQualityRendering = null, double? imageBrightness = null, string imageColorMode = null, double? imageContrast = null, string numeralFormat = null, int? pageCount = null, int? pageIndex = null, string paperColor = null, string pixelFormat = null, double? resolution = null, double? scale = null, string tiffCompression = null, string dmlRenderingMode = null, string dmlEffectsRenderingMode = null, string tiffBinarizationMethod = null, bool? zipOutput = null, string fontsLocation = null) { this.Document = document; this.SaveOptions = saveOptions; this.LoadEncoding = loadEncoding; this.Password = password; this.UseAntiAliasing = useAntiAliasing; this.UseHighQualityRendering = useHighQualityRendering; this.ImageBrightness = imageBrightness; this.ImageColorMode = imageColorMode; this.ImageContrast = imageContrast; this.NumeralFormat = numeralFormat; this.PageCount = pageCount; this.PageIndex = pageIndex; this.PaperColor = paperColor; this.PixelFormat = pixelFormat; this.Resolution = resolution; this.Scale = scale; this.TiffCompression = tiffCompression; this.DmlRenderingMode = dmlRenderingMode; this.DmlEffectsRenderingMode = dmlEffectsRenderingMode; this.TiffBinarizationMethod = tiffBinarizationMethod; this.ZipOutput = zipOutput; this.FontsLocation = fontsLocation; }
public void TestPutDocumentSaveAsTiff() { var localName = "test_multi_pages.docx"; var remoteName = "TestPutDocumentSaveAsTiff.docx"; var fullName = Path.Combine(this.dataFolder, remoteName); var destFileName = Path.Combine(BaseTestOutPath, Path.GetFileNameWithoutExtension(remoteName) + ".tiff"); var body = new TiffSaveOptionsData { FileName = "abc.tiff", SaveFormat = "tiff" }; this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(BaseTestContext.CommonFolder) + localName)); var request = new PutDocumentSaveAsTiffRequest(remoteName, body, this.dataFolder, destFileName: destFileName); var actual = this.WordsApi.PutDocumentSaveAsTiff(request); Assert.AreEqual(200, actual.Code); }