MvcPdfWriter 0.1.0

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

// Install MvcPdfWriter as a Cake Tool
#tool nuget:?package=MvcPdfWriter&version=0.1.0                

Render/ Create Pdf using mvc Razor view,  Html markup string or metadata elements with x,y & page number co-ordinations. MvcPdfWriter provide pdf writer a base controller "PdfController", you must inherit from PdfController to render view as a pdf document.

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
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
0.2.0 7,748 4/28/2014
0.1.0 1,439 4/20/2014

MvcPdfWriter has a  "PdfController" base controller, you must inherit from PdfController.
e.g.

 [AllowAnonymous]
   public class Test1Controller : PdfController
{
[HttpGet]
public ActionResult TestInvoice(int id)
{
var testModel = new
{
To = "Abc",
FAO = " test fao",
RefDate = DateTime.Now.ToShortDateString(),
Name = "Abc",
TradingName = "Xyz",
FunderAddress = "abc road, abc, AB12CD",
TotalCost = 1000,
VAT = 200,
CreditExpiryDate = DateTime.Now.AddMonths(1).ToShortDateString()
};
return ViewPdf(testModel);
}

[HttpGet]
public ActionResult TestInvoice2(int id)
{
var testModel = new
{
To = "Abc",
FAO = " test fao",
RefDate = DateTime.Now.ToShortDateString(),
Name = "Abc",
TradingName = "Xyz",
FunderAddress = "abc road, abc, AB12CD",
TotalCost = 1000,
VAT = 200,
CreditExpiryDate = DateTime.Now.AddMonths(1).ToShortDateString()
};
var metadatas = new List<ElementMetadata>{/*your meta data*/};
return ViewPdf("c:/Temp/InvoiceTemplate.pdf", metadatas, testModel, "c:/Temp/Output/Invoice-1.pdf");
}
}