public Task <Stream> PrintLayout(string authenticationCookie, string seriesInstanceUID, Layout layout, PrintOptions options) { return(Task.Factory.StartNew <Stream>(() => { try { string annotationData = string.Empty; if (options.BurnAnnotations) { annotationData = LoadAnnotations(options.AnnotationsFileName); } var userName = AuthHandler.Authorize(authenticationCookie, PermissionsTable.Instance.CanExport); var pdf = _exportAddin.PrintLayout(userName, seriesInstanceUID, layout, options, annotationData); return pdf; } catch { return null; } })); }
public Task <string> PrintLayout(string authenticationCookie, string seriesInstanceUID, Layout layout, PrintOptions options) { return(Task.Factory.StartNew(() => { try { string annotationData = string.Empty; if (options.BurnAnnotations) { annotationData = LoadAnnotations(options.AnnotationsFileName); } var userName = AuthHandler.Authorize(authenticationCookie, PermissionsTable.Instance.CanExport); var pdf = _exportAddin.PrintLayout(userName, seriesInstanceUID, layout, options, annotationData); string url = Save(authenticationCookie, "Layout_", ".pdf", pdf); pdf.Dispose(); return url; } catch { return string.Empty; } })); }
public string PrintLayout(string authenticationCookie, string seriesInstanceUID, Layout layout, PrintOptions options) { try { Stream pdf = null; string annotationData = string.Empty; if (options.BurnAnnotations) { annotationData = LoadAnnotations(options.AnnotationsFileName); } var userName = ServiceUtils.Authorize(authenticationCookie, PermissionsTable.Instance.CanExport); pdf = _exportAddin.PrintLayout(userName, seriesInstanceUID, layout, options, annotationData); string url = SavePdf("Layout", pdf); pdf.Dispose(); return(url); } catch { return(string.Empty); } }