Scryber.Core.Mvc 1.0.0.25

There is a newer version of this package available.
See the version list below for details.
dotnet add package Scryber.Core.Mvc --version 1.0.0.25                
NuGet\Install-Package Scryber.Core.Mvc -Version 1.0.0.25                
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="1.0.0.25" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Scryber.Core.Mvc --version 1.0.0.25                
#r "nuget: Scryber.Core.Mvc, 1.0.0.25"                
#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=1.0.0.25

// Install Scryber.Core.Mvc as a Cake Tool
#tool nuget:?package=Scryber.Core.Mvc&version=1.0.0.25                

scryber.core

The dotnet core scryber pdf creation library

Scryber PDF Library

The scryber library is an advanced, complete, pdf creation library for dotnet core. It supports the easy definition of documents, pages, content, shapes and images either by xml templates or simple code.

With a styles based layout it is easy to create good looking and flowing documents. Binding in xml allows you to quickly load data from many sources 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' ?>
      <pdf:Document xmlns:pdf='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>
          <pdf:String-Param id='Title' value='Hello World'  />
        </Params>
        <Styles>
          <styles:Style applied-type='pdf:Page'>
            <styles:Font family='Arial' size='14pt' />
          </styles:Style>

          <styles:Style applied-class='heading' >
            <styles:Fill color='#FF7777'/>
            <styles:Text decoration='Underline'/>
          </styles:Style>
      
        </Styles>
        <Pages>

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

            </Content>
          </pdf:Page>
        </Pages>

      </pdf:Document>

From your application code.


      //using Scryber.Components

      static void Main(string[] args)
      {
          using(var doc = PDFDocument.ParseDocument("[input template].pdfx"))
          {
              doc.Params["Title"] = "Hello World from Scryber";
              var page = doc.Pages[0] as PDFPage;
              page.Contents.Add(new PDFLabel(){ Text = "My Content" });
              doc.ProcessDocument("[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 = PDFDocument.ParseDocument("[input template].pdfx"))
          {
              doc.Params["Title"] = title;
              var page = doc.Pages[0] as PDFPage;
              page.Contents.Add(new PDFLabel(){ 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 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
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

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