Scryber.Core.Mvc 5.0.1-alpha

This is a prerelease version of Scryber.Core.Mvc.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Scryber.Core.Mvc --version 5.0.1-alpha                
NuGet\Install-Package Scryber.Core.Mvc -Version 5.0.1-alpha                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Scryber.Core.Mvc" Version="5.0.1-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Scryber.Core.Mvc --version 5.0.1-alpha                
#r "nuget: Scryber.Core.Mvc, 5.0.1-alpha"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Scryber.Core.Mvc as a Cake Addin
#addin nuget:?package=Scryber.Core.Mvc&version=5.0.1-alpha&prerelease

// Install Scryber.Core.Mvc as a Cake Tool
#tool nuget:?package=Scryber.Core.Mvc&version=5.0.1-alpha&prerelease                

scryber.core

The dotnet core scryber pdf creation library

Scryber PDF Library

The scryber library is an advanced, complete, document creation library for dotnet 5. It supports the easy definition of documents, pages, content, shapes and images by xml template, html and css, or simple code.

With a styles based layout it is easy to create good looking and flowing documents. Binding in your models and datasources allows you to quickly generate the template and output to pdf.

Getting Started

The easiest way to begin is to use the Nuget Packages here

scryber.core package (Base libraries for GUI or console applications)

OR for asp.net mvc

scryber.core.mvc package (Which includes the scryber.core package).

The full documentation is available here

scryber.core documentation

Hello World Plus

Just a bit more than a hello world example.

Create your template pdfx (xml) file.


      <?xml version='1.0' encoding='utf-8' ?>
      <doc:Document xmlns:doc='http://www.scryber.co.uk/schemas/core/release/v1/Scryber.Components.xsd'
                    xmlns:styles='http://www.scryber.co.uk/schemas/core/release/v1/Scryber.Styles.xsd'
                    xmlns:data='http://www.scryber.co.uk/schemas/core/release/v1/Scryber.Data.xsd' >
        <Params>
          <doc:String-Param id='Title' value='Hello World'  />
        </Params>
        <Styles>
          <styles:Style match='doc:Page'>
            <styles:Font family='Arial' size='14pt' />
          </styles:Style>

          <styles:Style match='.heading' >
            <styles:Fill color='#FF7777'/>
            <styles:Text decoration='Underline'/>
          </styles:Style>
      
        </Styles>
        <Pages>

          <doc:Page styles:margins='20pt'>
            <Content>
              <doc:H1 styles:class='heading' text='{@:Title}' />
              <doc:Div>We hope you like scryber.</pdf:Div>

            </Content>
          </doc:Page>
        </Pages>

      </doc:Document>

From your application code.


      //using Scryber.Components

      static void Main(string[] args)
      {
          using(var doc = Document.ParseDocument("[input template].pdfx"))
          {
              doc.Params["Title"] = "Hello World from Scryber";
              var page = doc.Pages[0] as Page;
              page.Contents.Add(new Label(){ Text = "My Content" });
              doc.SaveAsPDF("[output file].pdf");
          }
      }

Or from an MVC web application


      //using Scryber.Components
      //using Scryber.Components.Mvc

      public IActionResult HelloWorld(string title = "Hello World from Scryber")
      {
        using(var doc = Document.ParseDocument("[input template].pdfx"))
          {
              doc.Params["Title"] = title;
              var page = doc.Pages[0] as Page;
              page.Contents.Add(new Label(){ Text = "My Content" });
          
              return this.PDF(doc); // inline:false, outputFileName:"HelloWorld.pdf"
          }
      }

And the output

Hello World Output

Check out Read the Docs for more information on how to use the library.

scryber.core documentation

Getting Involved

We would love to hear your feedback. Feel free to get in touch. Issues, ideas, includes are all welcome.

If you would like to help with building, extending then happy to get contributions

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.0.1-beta 10,833 3/24/2023
6.0.0.16-beta 168 3/1/2023
6.0.0.14-beta 7,502 1/1/2023
6.0.0.13-beta 162 12/6/2022
6.0.0.11-beta 172 12/6/2022
6.0.0.8-beta 328 9/23/2022
5.1.0.2-beta 374 8/31/2021
5.1.0-beta 1,263 7/19/2021
5.0.7 8,285 6/16/2021
5.0.6.3 1,653 4/9/2021
5.0.6.1-beta 256 4/6/2021
5.0.6 520 3/30/2021
5.0.5.4 498 3/30/2021
5.0.5.1 484 3/5/2021
5.0.5 531 2/26/2021
5.0.5-beta 264 2/21/2021
5.0.4 1,134 1/30/2021
5.0.3 539 1/18/2021
5.0.3-beta 287 1/12/2021
5.0.3-alpha 339 1/4/2021
5.0.2-alpha 317 1/4/2021
5.0.1-alpha 304 12/30/2020
1.0.1-alpha 352 9/14/2020
1.0.0.25 647 9/1/2020
1.0.0.24 517 8/18/2020
1.0.0.23 537 8/16/2020
1.0.0.6 498 6/20/2020
1.0.0.5 508 6/19/2020
1.0.0.4 471 6/11/2020

5.0.1-alpha

Increased support for HTML parsing using DTD entities and xhtml namespace, along with recompilation for the dotnet 5 framework.

1.0.1-alpha

     Significant updates to the Components namespace (removing the PDF prefix); support for the match='' style attribute; prioritizing style application based on selectors and complexity; direct parsing of XHTML; and support for styles based page breaking. With updated unit tests

     v1.0.0.25
     -----------------

     Updated support for html and markdown

     v1.0.0.24
     -----------------

     Release package for Nuget
     Updated support for missing images
     Added read me
     Updated for the page numbering fallback
     Updated for the code Page Numbering display format
     Updated for the Caching Provider, and the pages style
     Forcing the update to the PDFTemplateItemValue
     Template Parameters values and Placeholder templates
     Strongly typed parameter settings.
     Updated to the latest Scryber.Core with template item controller binding.
     Updated with new features in ForEach, With, If and Choose for the Value property
     Linked to the Scryber.Core of the same version.

     v1.0.0.5
           Significant updates to the Components namespace (removing the PDF prefix); support for the match='' style attribute; prioritizing style application based on selectors and complexity; direct parsing of XHTML; and support for styles based page breaking. With updated unit tests

     v1.0.0.25
     -----------------

     Updated support for html and markdown

     v1.0.0.24
     -----------------

     Release package for Nuget
     Updated support for missing images
     Added read me
     Updated for the page numbering fallback
     Updated for the code Page Numbering display format
     Updated for the Caching Provider, and the pages style
     Forcing the update to the PDFTemplateItemValue
     Template Parameters values and Placeholder templates
     Strongly typed parameter settings.
     Updated to the latest Scryber.Core with template item controller binding.
     Updated with new features in ForEach, With, If and Choose for the Value property
     Linked to the Scryber.Core of the same version.
     v1.0.0.5
     Updated for of the Core library with atomatic inclusion of the http namespace references, and also added the model extension methods