public void CloseStream(StreamProviderOptions options) { if (options != null && options.Stream != null) { options.Stream.Close(); } }
public void InitStream(StreamProviderOptions options) { string path = outputDir + Path.GetFileName(options.DefaultPath); options.CustomPath = path; Directory.CreateDirectory(Path.GetDirectoryName(path)); options.Stream = File.Create(path); }
public void InitStream(StreamProviderOptions options) { //string sourceDir = RunExamples.Get_SourceDirectory(); //Open the filestream of Aspose Logo and assign it to StreamProviderOptions.Stream property FileStream fi = new FileStream(sourceDir + "sampleControlExternalResourcesUsingWorkbookSetting_StreamProvider.png", FileMode.OpenOrCreate, FileAccess.Read); options.Stream = fi; }
public void InitStream(StreamProviderOptions options) { string sourceDir = RunExamples.Get_SourceDirectory(); System.Diagnostics.Debug.WriteLine("-----Init Stream-----"); //Read the new image in a memory stream and assign it to Stream property byte[] bts = File.ReadAllBytes(sourceDir + "newPdfSaveOptions_StreamProvider.png"); MemoryStream ms = new MemoryStream(bts); options.Stream = ms; }
public void CloseStream(StreamProviderOptions options) { }
public void CloseStream(StreamProviderOptions options) { System.Diagnostics.Debug.WriteLine("-----Close Stream-----"); }