jsreport / jsreport-pdf-utils

jsreport extension providing pdf operations like merge or concatenation
MIT License
8 stars 4 forks source link

Nuget for AspNetCore? #12

Closed deckertron9000 closed 6 years ago

deckertron9000 commented 6 years ago

Any chance this could become available via Nuget to extend the functionality of the jsreport.AspNetCore package?

pofider commented 6 years ago

I added strong types for pdf utils into the jsreport.Types nuget. Update to the latest 2.2.3 and then you can use it as:

rs.RenderAsync(new RenderRequest
            {
                Template = new Template()
                {
                    Content = "Helo world from {{message}}",
                    Engine = Engine.Handlebars,
                    Recipe = Recipe.ChromePdf,
                    Chrome = new Chrome
                    {
                        MarginTop = "2cm"
                    },
                    PdfOperations = new List<PdfOperation>()
                {
                    new PdfOperation
                    {
                        Type = PdfOperationType.Merge,
                        Template = new Template
                        {
                            Content = "Header",
                            Engine = Engine.None,
                            Recipe = Recipe.ChromePdf
                        }
                    }
                }
                }
            });