Scryber.Core 1.0.0.24

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

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

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 (1)

Showing the top 1 NuGet packages that depend on Scryber.Core:

Package Downloads
Scryber.Core.Mvc

The Mvc extensions for the Scryber.Core PDF creation engine - change the way you make documents. Scryber is an advanced PDF generation engine based around HTML templates with CSS styles and SVG drawing, or just code it. It includes full flowing pages, dynamic template binding on your object model and referenced external files, images, css and fonts. Easily create documents from your Apps, MVC sites, or Javascipt ajax calls. This framework is built entirely in .NET6 and Net Standard 2.0 and is released under the LGPL licence so you can use to it in commercial applications.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Scryber.Core:

Repository Stars
richard-scryber/scryber.core
Scryber.Core is a dotnet 6 html to pdf engine written entirely in C# for creating beautiful flowing documents from html templates including css styles, object data binding and svg drawing.
Version Downloads Last updated
6.0.4-beta 3,642 1/12/2024
6.0.3.2-beta 5,020 10/6/2023
6.0.3.1-beta 533 10/6/2023
6.0.3-beta 572 10/5/2023
6.0.2.1-beta 693 9/18/2023
6.0.2-alpha 2,874 5/4/2023
6.0.1.3-beta 556 9/18/2023
6.0.1-beta 7,786 3/24/2023
6.0.0.16-beta 1,646 3/1/2023
6.0.0.14-beta 10,913 1/1/2023
6.0.0.13-beta 1,042 12/6/2022
6.0.0.10-beta 960 10/6/2022
6.0.0.9-beta 2,401 9/30/2022
6.0.0.8-beta 1,827 9/23/2022
6.0.0.6-beta 702 9/23/2022
6.0.0.5-beta 920 9/16/2022
6.0.0.4-beta 851 9/16/2022
5.1.0.2-beta 8,692 8/31/2021
5.1.0.1-beta 1,679 7/27/2021
5.1.0-beta 1,075 7/19/2021
5.0.7 26,080 6/16/2021
5.0.7-alpha 756 4/29/2021
5.0.6.3 2,702 4/9/2021
5.0.6.2-beta 714 4/7/2021
5.0.6.1-beta 787 4/6/2021
5.0.6 907 3/30/2021
5.0.5.4 1,244 3/30/2021
5.0.5.3-beta 886 3/13/2021
5.0.5.2-beta 825 3/12/2021
5.0.5.1 1,324 3/5/2021
5.0.5 1,264 2/26/2021
5.0.5-beta 843 2/21/2021
5.0.4 1,787 1/30/2021
5.0.3 1,171 1/18/2021
5.0.3-beta 833 1/12/2021
5.0.3-alpha 926 1/4/2021
5.0.1-alpha 965 12/30/2020
1.0.2-alpha 817 12/15/2020
1.0.1-alpha 897 9/14/2020
1.0.0.25 2,454 9/1/2020
1.0.0.24 1,426 8/18/2020
1.0.0.23 1,288 8/16/2020
1.0.0.5 1,200 6/19/2020
1.0.0.3 1,336 6/10/2020
1.0.0.1 1,114 5/23/2020
0.9.0 1,114 5/23/2020

1.0.0.24
-------------------
Package for release to Nuget Public
Updated for the allow missing images option and fixed height and width for 0 resolution
Added the xsd files to the root of the components project
Added a readme.txt file
Added column-widths to the components and styles, with support for varable widths.
Page numbering falls back to the page number format set on the page if not explicitly set.

Removed the Page number prefix instead only supprting the page number display format

Updated to add the static cache provider service

Added the template property to the Placeholder, and support for updating templates to parameters

Stronger typing on the parameters and object parameter, and support for XML pararmeters as XPath or XNode values.

Passing any controller to the template generation so that it can be used to bind to events in templates.

Updated the data components for ForEach, With, If, Choose:When to be able to use xpath and object binding expressions on the value property.

Updated the PDFUser Component to use Params not Items

Updated the bindings and Params. Autobind on the document defaults to true.

Added the binding expressions as default in the parsing options

Fixed the query string overrides on the item native values

PDFDocument fix for remote references.


1.0.0.5

Fixes for path mapping on Mac / Unix / Windows when loading reference paths. Updated for the schema references and scrybersettings.json in the Scryber.Core.Schemas package

Added the default namespaces to the ParsingOptions, and updated version to match MVC and OpenType