Questions tagged [rotativa]

Rotativa is an ASP.NET MVC library providing a means to render HTML to PDF from an MVC Controller.

Rotativa is an ASP.NET MVC library providing a means to render HTML to PDF from an MVC Controller. Rotativa is based on wkhtmltopdf. It can be easy integrated in an ASP.Net MVC project, providing methods to return the views converted to pdf as a simple MVC project returns the views as plain HTML.

272 questions
4
votes
1 answer

Rotativa PDF export - unable to display inline and having a filename at the same time

I found Rotativa as an easy way to export to PDF (works almost perfectly except CSS3 doesn't seem to be supported, maybe in a future version) ... but I wonder how to handle the FileName option. When I return new Rotativa.ViewAsPdf("myViewName",…
outofmind
  • 1,430
  • 1
  • 20
  • 37
4
votes
2 answers

Rotativa ActionAsPdf() Very Slow

Using Rotativa 1.6.4 from NuGet and have noticed the following issue using the code below. ActionAsPdf hangs randomly for indeterminate amount of time. Code below that is hanging: var pdfResult = new ActionAsPdf("Report", new {id =…
SouthPlatte
  • 297
  • 2
  • 7
  • 17
4
votes
1 answer

Save PDF file as a byte array or stream using Rotativa

I'm trying to convert an HTML to a PDF using Rotativa but I want to save it as a byte array or a stream so I can easily attach it to a mail or something. I found a solution here but the file can't be opened by any PDF reader because it's not a…
Ibrahim Amer
  • 1,147
  • 4
  • 19
  • 46
4
votes
2 answers

Rotativa generated PDF doesn't render correctly - page break/element break

I've been turning the web upside down for the past hour or so but can't seem to find the solution for my rendering problem. I'm using Rotativa (1.6.4) as the PDF creation library which was capable to reproduce the HTML I threw at it with almost 100%…
wegelagerer
  • 3,600
  • 11
  • 40
  • 60
4
votes
3 answers

RotativaPDF css not working on server

I have one reports, and it usually works in localhost with css. But when I put on the server does not load css with bundle. code : public ActionResult ParseSendPDF() { var result = Session["Search"] as List; ViewAsPdf pdf = new…
4
votes
1 answer

Rotativa PDF in model - ControllerContext

I'm using Rotativa to generate PDFs from actions/views and it works great. However is it possible to use it inside of models or can you purely use it in controllers? The issue is that the function wants to use a ControllerContext which models…
HenrikP
  • 844
  • 5
  • 16
  • 37
4
votes
5 answers

Boostrap minimum scale with rotativa PDF

I have a problem when using rotativa, that my bootstrap page always scales to minimum when printed. Is there any way I can set viewport size for my view, so it wont scale bootstrap to minimum for PDF generation? Controller…
oakjim
  • 101
  • 1
  • 9
4
votes
3 answers

Rotativa images and css works fine on localhost but is ignored in live server

Working locally the css and images are loaded in pdf correctly. But as soon as i migrate code on the server, these are not loaded in the generated pdf. I am using ViewAsPDF(). There are some partial views in my code so I cannot use Server.Map. Would…
Abhishek
  • 41
  • 4
4
votes
2 answers

All pages with header excluding first page - RotativaPDF

I'm trying to create a exportable/printable page with RotativaPDF where those pages must have a small section with some data from a customer, tables with customer credits and payments, and every page must have a footer and a header (excluding the…
Ninita
  • 1,209
  • 2
  • 19
  • 45
3
votes
3 answers

asp.net core 3 rotativa startup.cs env problem

Im try to use Rotativa ım follow this guide in start.cs in configure function ım add this code RotativaConfiguration.Setup(env); Severity Code Description Project File Line Suppression State Error CS1503 Argument 1: cannot convert…
Mehmet Başaran
  • 77
  • 2
  • 10
3
votes
0 answers

Rotativa and wkhtmltopdf memory issues

I'm having issues with Rotativa and wkhtmltopdf memory leaks/management. As you can see in the screenshot, the memory rise is when the PDFs are generated, every spike basically corresponds to single PDF being generated. Single document is roughly…
drajvver
  • 374
  • 1
  • 2
  • 16
3
votes
3 answers

Rotativa.Netcore works locally but not after deployment

I am using the latest Rotativa.NetCore assembly in a ASP.NET Core 2.1.1 project. The NuGet (https://www.nuget.org/packages/Rotativa.AspNetCore v. 1.0.6) does not work on deployment (win2016) but works locally (win10). IIS on deployment gives 404 and…
Sha
  • 2,185
  • 1
  • 36
  • 61
3
votes
1 answer

Rotativa ViewAsPdf not executing jquery

I'm using Rotativa (v1.6.4) for converting an MVC view into a PDF. I have used jQuery in the View to show/hide certain text content. When I render the View, I see that jQuery is working, but when I render viewaspdf, the jquery is not working. I…
popat
  • 69
  • 1
  • 7
3
votes
0 answers

Rotativa will only create PDF with 53 (11 pages) records or less

I have an MVC app that is using this code: return new Rotativa.ViewAsPdf("EmployeePrintPDF", GetModelForView(fileName)) { CustomSwitches = "--page-offset 0 --footer-center [page] --footer-font-size 8" …
D Kyle
  • 41
  • 2
3
votes
1 answer

Using rotativa in Asp.net Core 1.0 app but not Working

I want to use Rotativa in my application, but when I include "Rotativa in my project.json file. The package console shows Restoring packages failed and the error is: The Dependency Rotativa 1.6.4 does not support framework…
Fahad
  • 128
  • 1
  • 3
  • 12
1 2
3
18 19