rod-stuchi / razor-templ-engine

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:GNU General Public License v3.0


Languages

Language:JavaScript 46.5%Language:C# 38.6%Language:HTML 11.1%Language:CSS 3.7%Language:Batchfile 0.0%