public Task <Stream> PrintSeries(string authenticationCookie, string[] seriesInstanceUIDs, 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.PrintSeries(userName, seriesInstanceUIDs, options, annotationData); return pdf; } catch { return null; } })); }
public string PrintSeries(string authenticationCookie, string[] seriesInstanceUIDs, PrintOptions options) { try { Stream pdf; string annotationData = string.Empty; if (options.BurnAnnotations) { annotationData = LoadAnnotations(options.AnnotationsFileName); } var userName = ServiceUtils.Authorize(authenticationCookie, PermissionsTable.Instance.CanExport); pdf = _exportAddin.PrintSeries(userName, seriesInstanceUIDs, options, annotationData); string url = SavePdf("Series", pdf); pdf.Dispose(); return(url); } catch { return(string.Empty); } }
public Task <string> PrintSeries(string authenticationCookie, string[] seriesInstanceUIDs, 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.PrintSeries(userName, seriesInstanceUIDs, options, annotationData); string url = Save(authenticationCookie, "Series_", ".pdf", pdf); pdf.Dispose(); return url; } catch { return string.Empty; } })); }