GhostScriptSharp/GhostscriptSharp.cs
/// <summary>
/// Returns an array of arguments to be sent to the Ghostscript API
/// </summary>
/// <param name="inputPath">Path to the source file</param>
/// <param name="outputPath">Path to the output file</param>
/// <param name="firstPage">The page of the file to start on</param>
/// <param name="lastPage">The page of the file to end on</param>
Returns an array of arguments to be sent to the Ghostscript API
Returns an array of arguments to be sent to the Ghostscript API
private static string[] GetArgs(string inputPath,
			string outputPath,
			int firstPage,
			int lastPage,
			int width,
			int height)
		{
			GhostscriptSettings s = new GhostscriptSettings();
			s.Device = Settings.GhostscriptDevices.jpeg;
			s.Page.Start = firstPage;
			s.Page.End = lastPage;
			s.Resolution = new System.Drawing.Size(width, height);
			Settings.GhostscriptPageSize pageSize = new Settings.GhostscriptPageSize();
			pageSize.Native = GhostscriptSharp.Settings.GhostscriptPageSizes.a7;
			s.Size = pageSize;
			return GetArgs(inputPath, outputPath, s);
		}
private static string [ ] GetArgs ( string inputPath , string outputPath , int firstPage , int lastPage , int width , int height ) { GhostscriptSettings s = new GhostscriptSettings ( ) ; s . Device = Settings . GhostscriptDevices . jpeg ; s . Page . Start = firstPage ; s . Page . End = lastPage ; s . Resolution = new System . Drawing . Size ( width , height ) ; Settings . GhostscriptPageSize pageSize = new Settings . GhostscriptPageSize ( ) ; pageSize . Native = GhostscriptSharp . Settings . GhostscriptPageSizes . a7 ; s . Size = pageSize ; return GetArgs ( inputPath , outputPath , s ) ; }
Returns an array of arguments to be sent to the Ghostscript API
Returns an array of arguments to be sent to the Ghostscript API
// To maintain backwards compatibility, this method uses previous hardcoded values.
inputPath
string
Path to the source file
Path to the source file
outputPath
string
Path to the output file
Path to the output file
firstPage
int
The page of the file to start on
The page of the file to start on
lastPage
int
The page of the file to end on
The page of the file to end on
width
int
height
int