as vector.
C#
public string GetEPSView(string EPSFileName, int iWidth, int iHeight, string path)
{
string result = EPSFileName.Replace(".eps", ".gif");
appIll.Open(System.Configuration.ConfigurationSettings.AppSettings["TmpFolder"] + EPSFileName, Illustrator.AiDocumentColorSpace.aiDocumentCMYKColor, openOptions);
Illustrator.Document curDok = appIll.ActiveDocument;
Illustrator.ExportOptionsGIF gifOptions = new Illustrator.ExportOptionsGIF();
gifOptions.AntiAliasing = true;
gifOptions.Transparency = true;
gifOptions.Matte = false;
gifOptions.ColorCount = 255;
Double dScale = 100;
if (iHeight > iWidth)
dScale = Math.Round(iWidth / curDok.Width * 100);
else
dScale = Math.Round(iHeight / curDok.Height * 100);
curDok.Export(System.Configuration.ConfigurationSettings.AppSettings["TmpFolder"] + result, Illustrator.AiExportType.aiGIF, gifOptions);
if (!File.Exists(System.Configuration.ConfigurationSettings.AppSettings["TmpFolder"] + result))
result = "Error";
curDok.Close(Illustrator.AiSaveOptions.aiDoNotSaveChanges);
return result;
}
but how can I establish new size of image and as vector graphics?
C#
public string GetEPSView(string EPSFileName, int iWidth, int iHeight, string path)
{
string result = EPSFileName.Replace(".eps", ".gif");
appIll.Open(System.Configuration.ConfigurationSettings.AppSettings["TmpFolder"] + EPSFileName, Illustrator.AiDocumentColorSpace.aiDocumentCMYKColor, openOptions);
Illustrator.Document curDok = appIll.ActiveDocument;
Illustrator.ExportOptionsGIF gifOptions = new Illustrator.ExportOptionsGIF();
gifOptions.AntiAliasing = true;
gifOptions.Transparency = true;
gifOptions.Matte = false;
gifOptions.ColorCount = 255;
Double dScale = 100;
if (iHeight > iWidth)
dScale = Math.Round(iWidth / curDok.Width * 100);
else
dScale = Math.Round(iHeight / curDok.Height * 100);
curDok.Export(System.Configuration.ConfigurationSettings.AppSettings["TmpFolder"] + result, Illustrator.AiExportType.aiGIF, gifOptions);
if (!File.Exists(System.Configuration.ConfigurationSettings.AppSettings["TmpFolder"] + result))
result = "Error";
curDok.Close(Illustrator.AiSaveOptions.aiDoNotSaveChanges);
return result;
}
but how can I establish new size of image and as vector graphics?