/razor-templ-engine

@Razor template turns into awesome HTML, PDF and images files.

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

What is Razor Template Engine

It is a engine that generates PDF and image files based on HTML template files.

How it works?

HTML to Razor

How to use?

Generating Files

Before build the project, it is necessary create a file that will contain the secret token to protect PDF files. This file must be in the root of user the profile.

Open up Powershell

cd $env:userprofile
new-item .RodStu-razor-secret

Set the password in the secret file

notepad.exe .\.RodStu-razor-secret

Open up the solution file Template Engine.sln in Visual Studio.

Change startup project to cmd and change the solution platform to x64, as the image below:

Project Setup

Build the project.

Generate files (pdf, html, jpg)

If in Visual Studio, just Run the cmd project with F5.

Or navigate to the bin folder:

cd ..\<project-folder>\cmd\bin\x64

To generate HTML, HTML with password, PDF and PDF with password, just do:

cmd.exe

How to create / build Razor views?

HOWTO: Building Razor Views