Skip to content

Instantly share code, notes, and snippets.

@serpel
Created September 7, 2020 07:22
Show Gist options
  • Save serpel/0e9b714c539d7744d584c1253dd8559d to your computer and use it in GitHub Desktop.
Save serpel/0e9b714c539d7744d584c1253dd8559d to your computer and use it in GitHub Desktop.
using jsreport.AspNetCore;
using jsreport.Local;
public void ConfigureServices(IServiceCollection services)
{
//setup MVC because we need the server pdf rendering
services.AddMvc();
services.AddJsReport(new LocalReporting()
.UseBinary(RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ?
jsreport.Binary.Linux.JsReportBinary.GetBinary() :
jsreport.Binary.JsReportBinary.GetBinary())
.AsUtility()
.Create());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment