개정판 4c942b07
Fix: FinalService_DL에서 이미지에 접근하지 못할때 오류 메시지 처리
Change-Id: If2765c1f454b459f6329fabc6987fe78fd816d12
FinalService/KCOM_FinalService_DL/MarkupToPDF/Controls_PDF/DrawSet_Image.cs | ||
---|---|---|
142 | 142 |
contentByte.RestoreState(); |
143 | 143 |
} |
144 | 144 |
|
145 |
/// <summary> |
|
146 |
/// url의 이미지를 가져온다. |
|
147 |
/// </summary> |
|
148 |
/// <param name="uri"></param> |
|
149 |
/// <returns></returns> |
|
145 | 150 |
public static Image FromURI(string uri) |
146 | 151 |
{ |
152 |
Image image = null; |
|
153 |
|
|
147 | 154 |
HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create(uri); |
148 | 155 |
webRequest.AllowWriteStreamBuffering = true; |
149 |
WebResponse webResponse = webRequest.GetResponse(); |
|
150 |
//System.Drawing.Image image = System.Drawing.Image.FromStream(webResponse.GetResponseStream()); |
|
151 |
Image image = Image.GetInstance(webResponse.GetResponseStream()); |
|
152 |
webResponse.Close(); |
|
156 |
using (WebResponse webResponse = webRequest.GetResponse()) |
|
157 |
{ |
|
158 |
image = Image.GetInstance(webResponse.GetResponseStream()); |
|
159 |
webResponse.Close(); |
|
160 |
} |
|
153 | 161 |
|
154 | 162 |
return image; |
155 | 163 |
} |
FinalService/KCOM_FinalService_DL/MarkupToPDF/MarkupToPDF.cs | ||
---|---|---|
1284 | 1284 |
string FilePath = control.ImagePath; |
1285 | 1285 |
//Uri uri = new Uri(s.ImagePath); |
1286 | 1286 |
|
1287 |
Controls_PDF.DrawSet_Image.DrawImage(StartPoint, EndPoint, PointSet, contentByte, FilePath, Angle, Opacity); |
|
1287 |
try |
|
1288 |
{ |
|
1289 |
Controls_PDF.DrawSet_Image.DrawImage(StartPoint, EndPoint, PointSet, contentByte, FilePath, Angle, Opacity); |
|
1290 |
} |
|
1291 |
catch (Exception ex) |
|
1292 |
{ |
|
1293 |
SetFinalPDFLog(FinalItem.ID, FinalItem.PROJECT_NO, ex.StackTrace); |
|
1294 |
} |
|
1288 | 1295 |
} |
1289 | 1296 |
break; |
1290 | 1297 |
#endregion |
내보내기 Unified diff