Questions tagged [razorpdf]

RazorPDF for MVC is a package that uses the Razor View Engine to create iTextXML which in turn is used to produce PDF files. RazorPDF is basically a port of the PDF feature of Spark View Engine.

RazorPDF for MVC is, according to its website, a package that uses the Razor View Engine to create iTextXML which in turn is used to produce PDF files. RazorPDF is basically a port of the PDF feature of Spark View Engine.

32 questions
5
votes
1 answer

how to set image on Header or Footer in Rotativa PDF

I need to insert some image on Header or Footer using Rotativa PDF. I'm using C# MVC4 with Razor I already tried: CustomSwitches = "--print-media-type --header-center \"text\""
5
votes
2 answers

RazorPDF save pdf file to server directory in MVC4

I am currently assembling and displaying a PDF using RazorPDF in MVC4 and would like to save the PDF file to the file system at the same time I return the view. The following line of code in the controller action is calling the view: return new…
Dan Aschmann
  • 91
  • 1
  • 5
5
votes
1 answer

Where can I find an iText xml reference?

I am evaluating the use of RazorPDF as our reporting solution. For some reason, I cannot find any iText XML reference, beside a few examples. There are plenty of example for the Java or C# API, but nothing regarding the XML itself. Does such…
Pierre-Alain Vigeant
  • 22,635
  • 8
  • 65
  • 101
4
votes
1 answer

Could not load type 'iTextSharp.text.html.HtmlParser' from assembly 'itextsharp, Version=5.5.3.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca'

I am new to asp.net mvc 4. I have done a simple application using RazorPDF. Application is to display a normal page in PDF format. I have created a new application and it is running fine .But the same thing when i am implementing in my project it…
Binay Kumar
  • 279
  • 6
  • 23
4
votes
2 answers

razorPDF - automatic page numbering

Using C# MVC I am creating a report by passing a HTML partial view through PdfResult. This provides exactly what is needed except for the lack of page numbers. The GetDetails simply calls a service that returns a list of results. The printlist view…
J-Man
  • 179
  • 1
  • 7
3
votes
3 answers

Adding watermark to razorpdf mvc

I am using the following code to generate pdf in mvc using itext with razorpdf producer @model myModel.Models.Examform @{ Layout = null; } Hello This code works…
3
votes
2 answers

PDF force download as opposed to open in browser

I am using RazorPDF and I would like to force download the PDF as opposed to open in browser tab. How do I do this? Thanks public ActionResult Index() { return View(); } [HttpPost] public ActionResult Index(string Id) { return…
dotnet-practitioner
  • 13,968
  • 36
  • 127
  • 200
3
votes
6 answers

Could not load file or assembly 'itextsharp' or one of its dependencies

Trying to follow this tutorial for RazorPDF, and I don't know why am I getting the following error message: Very frustrated and tired. Error Message: Could not load file or assembly 'itextsharp' or one of its dependencies. The located assembly's…
dotnet-practitioner
  • 13,968
  • 36
  • 127
  • 200
2
votes
1 answer

Could not load type 'iTextSharp.text.html.HtmlParser' from assembly 'itextsharp, Version=5.5.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca'

see this link converting html to pdf I got this version error in webconfig let some genius find and solve the qustion. My Model public class Customer { public int CustomerID { get; set; } public string FirstName { get; set; } public…
Dhasarathan T
  • 99
  • 1
  • 3
  • 14
2
votes
2 answers

need to render html from mvc, only displaying htmls tags not text

I am using razorpdf to generate a pdf report in my mvc 4 application. each time I generate the pdf, the description field will display a bunch of html tags and fields that are not supposed to be shown, i just want the plain text from the description…
adandrea808
  • 109
  • 11
2
votes
2 answers

how to use css in razorpdf

I'm using mvc4,here I'm using razorpdf to convert my view to pdf, but I'm getting an error - Unable to cast object of type iTextSharp.text.Paragraph to type iTextSharp.text.Table. This is the sample code I'm using: @{ Layout =…
coder
  • 656
  • 3
  • 8
  • 22
1
vote
1 answer

Error while creating and downloading PDF using ItextSharp in c#

I have tried to make Pdf from razor views.But it always error me. I have used Visual studio 2013, .net framework 4.5 & asp.net mvc5. For creating i have used to install RazorPdf version 1.0.0.0 package & itextsharp 5.5.2.0 version. Code…
shuvo sarker
  • 881
  • 11
  • 20
1
vote
2 answers

Create pdf with RazorPDF

I want to create a simple pdf with RazorPDF. I installed it from Nuget Package. (itexsharp and razorpdf appear in reference) Here's my controller: public ActionResult Index() { return new RazorPDF.PdfResult(); } And, I have a simple view that…
1
vote
1 answer

razor pdf is coming blank in mvc4

I am simply trying to generate pdf in my application using razor pdf. I followed http://www.c-sharpcorner.com/UploadFile/riyazakt/create-pdf-using-razorpdf-in-Asp-Net-mvc/ example for generating this in my application. I followed every step as it is…
user3163213
  • 703
  • 4
  • 15
  • 37
1
vote
1 answer

Error converting MVC4 view to PDF with Rotativa or RazorPDF

I am trying to convert a MVC4 view to Pdf. after a few minutes searching I found https://www.nuget.org/packages/Rotativa/ and https://www.nuget.org/packages/RazorPDF both give me the same problem that will be explained below: I installed Rotativa…
mmilan
  • 1,738
  • 8
  • 31
  • 57
1
2 3