public void ManagerGenerateSinglePageThumbnail() { using (GhostscriptManager gs = GhostscriptManager.GetInstance()) { gs.Settings.Device = GhostscriptSharp.Settings.GhostscriptDevices.jpeg; gs.Settings.Page.Start = 1; gs.Settings.Page.End = 1; gs.Settings.Resolution = new System.Drawing.Size(100, 100); gs.Settings.Size.Native = GhostscriptSharp.Settings.GhostscriptPageSizes.a7; gs.DoConvert(MANAGER_SINGLE_FILE_LOCATION, TEST_FILE_LOCATION); } Assert.IsTrue(File.Exists(MANAGER_SINGLE_FILE_LOCATION)); }
public void ManagerGenerateMultiplePageThumbnails() { using (GhostscriptManager gs = GhostscriptManager.GetInstance()) { gs.Settings.Device = GhostscriptSharp.Settings.GhostscriptDevices.jpeg; gs.Settings.Page.Start = 1; gs.Settings.Page.End = MULTIPLE_FILE_PAGE_COUNT; gs.Settings.Resolution = new System.Drawing.Size(100, 100); gs.Settings.Size.Native = GhostscriptSharp.Settings.GhostscriptPageSizes.a7; gs.DoConvert(MANAGER_MULTIPLE_FILE_LOCATION, TEST_FILE_LOCATION); } for (var i = 1; i <= MULTIPLE_FILE_PAGE_COUNT; i++) { Assert.IsTrue(File.Exists(String.Format("man_output{0}.jpg", i))); } }