Our.Umbraco.TemplateToPdf 1.0.10

dotnet add package Our.Umbraco.TemplateToPdf --version 1.0.10
NuGet\Install-Package Our.Umbraco.TemplateToPdf -Version 1.0.10
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="Our.Umbraco.TemplateToPdf" Version="1.0.10" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Our.Umbraco.TemplateToPdf --version 1.0.10
#r "nuget: Our.Umbraco.TemplateToPdf, 1.0.10"
#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 Our.Umbraco.TemplateToPdf as a Cake Addin
#addin nuget:?package=Our.Umbraco.TemplateToPdf&version=1.0.10

// Install Our.Umbraco.TemplateToPdf as a Cake Tool
#tool nuget:?package=Our.Umbraco.TemplateToPdf&version=1.0.10

TemplateToPdf.Demo

This is a demo applciation for Umbraco Template to Html

Backoffice Log in :

Username :admin@demo.com PassWord: Admin12345

What is this package for?

This package is desgined to convert Umbraco Cotnent into Pdf while you have a full control of what the pdf shall look like using confgration from Umbraco back office!

Getting Started

  1. 2.1 First Thing First: Download the package Using:

dotnet add package Our.Umbraco.TemplateToPdf

2.2 Adding The Core file you need to add a file called: wkhtmltopdf.exe this file is responsible for converting the Html inside of the template to Pdf. you can download it from here :

https://github.com/uppercuut/TemplateToPdf.Demo/tree/master/TemplateToPdf.Demo/wwwroot/TemplateToPdf

Life location must be: **“<YourApplicationName>/ wwwroot/TemplateToPdf/wkhtmltopdf.exe” ** if the folder “TemplateToPdf” is not there create one.

2.3 Configuring the Startup.cs add this line to the startup file and you are ready to go!

services.AddTemplateToPdf(_env);

like the Image Bellow:

image

Usage

This package is so simple to use : All you have to use is to create a Url and let the browser redirect to it. You can use b builder from the Package that will help you alot

var pdfUrl = new PdfUrlBuilder().UsingGetByIdMethod(<yourNodeId>).WithTemplateAlias("<yourTemplateAlias>").AddPdfFileName("<pdf file name>").Url(); this line will generate a url to be imbeded in any page or any where !

Untitled2

And this is how the Template looks like :

Untitled

and @model IPublishedContent to bind the page to a loose model

Thats it

Exmaple:

let me give an exmaple of how this package works and one of its usage! (we will walk a scenario from A to Z)

Using Umbraco Starter-kit, i added a button on the buttom of each one of those cool people to download thier resumes: 139023905-54d7e6db-5a46-41d6-96e1-b88a75369d71-min

Now! when you click on the button it will open up a pdf file took its content from UmbracoCms and the structure/style from a Template also in Umbraco!

This the template Used ⇒ 139024501-c26c9b75-4eeb-4b90-899a-def7ba3a783f-min

Now Lets see the Content : Here we got the details for each Person : 139024974-08b043db-cb2e-4ae8-b259-6d799ec514ff-min

Now lets check the Pdf! : 139025176-d4f964cb-14f0-432f-8027-17b83d201d2e-min

Now! Lets say we want to make his name on a different color and check a few lines on the objectve
Those are our changes we saved and published them: 139025595-3553ff95-2bc9-481a-9ed2-109e4b1e7bbf-min (1)

now to see the new pdf , All you have to do is refresh !! 139026247-3c7a6d9e-4a94-4fc4-aaa2-2e7ccaece65d-min

This is The Pretty much the TemplateToPdf Package

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)
Additional computed target framework(s)
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
1.0.10 1,090 4/8/2022
1.0.8 881 4/4/2022
1.0.6 1,098 10/27/2021