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
6
votes
4 answers

Rotativa file not found on server only

I am using Rotativa ActionasPDF() to generate a pdf from a view in my MVC4 project. It works flawlessly on my local instance, but I just copied the entire solution to my server and it does not work. I get the error "The system cannot find the file…
C.Coggins
  • 215
  • 9
  • 20
6
votes
3 answers

How to make Rotativa wait for javascript/jquery execution

I have a View that renders and some javascript/jquery that updates some fields. When I use Rotativa, it renders the view, but before the JS is executed to replace some field text. Is there a way to delay Rotativa or have it wait for JS/JQuery?
Loren.Dorez
  • 605
  • 1
  • 8
  • 11
6
votes
3 answers

Rotativa Download with SaveAs dialog

I am using Rotativa tool to display pdf. It works fine with the following code: public ActionResult PreviewDocument() { var htmlContent = Session["html"].ToString(); var model = new PdfInfo { Content = htmlContent, Name = "PDF Doc" }; …
Sachin Kumar
  • 974
  • 2
  • 13
  • 23
5
votes
0 answers

Rotativa gets 401.2 code status using windows authentication

I have an MVC 5 project which uses Windows authentication. In order of adding pdf export support, I try to set up Rotativa lib. The first try was Controller method public ActionResult PrintViewToPdf() { return new…
Laser42
  • 646
  • 2
  • 7
  • 24
5
votes
1 answer

Rotativa Pdf generation does not respect HTML character spacing

I am converting from MVC HTML to Pdf using Rotativa. In HTML everything looks good, but in Pdf format, the characters spacing is not well formatted, as it is too little. This reduces the readability of the documents considerably. In the following…
meJustAndrew
  • 6,011
  • 8
  • 50
  • 76
5
votes
2 answers

Rotativa pdf not working after deploying to IIS on server

I'm using Rotativa for converting html to pdf on my asp.net mvc website. It works fine locally, but after I deploy on the server, it just returns a text saying "Rotativa.ViewAsPdf", that is the method name I'm calling in my C# code. There's no…
sharath.g
  • 311
  • 5
  • 17
5
votes
4 answers

Rotativa ignoring Boostrap CSS when published to the server

Rotativa correctly shows and renders a PDF with my Bootstrap when hosted locally, but not once it is posted to the server. The rendered PDF shows some CSS, but no Bootstrap. I have seen other posts about this, but the suggestions did not work. The…
Rachel Ostrander
  • 184
  • 2
  • 14
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
1 answer

Pdf download using rotativa-taking long time in production

I am using rotativa in MVC3 for downloading multiple views in pdf format. Its working fine in my local system. But when I moved that to production its taking almost 2-3 min to download. Please suggest any option to make that faster in production. I…
Saritha.S.R
  • 800
  • 1
  • 6
  • 19
5
votes
6 answers

How do I intercept the output stream of the current actionresult in .NET MVC3?

Hi and thanks for looking! Background I am using the Rotativa pdf tool to read a view (html) into a PDF. It works great, but it does not natively offer a way to save the PDF to a file system. Rather, it only returns the file to the user's browser…
Matt Cashatt
  • 23,490
  • 28
  • 78
  • 111
4
votes
2 answers

BuildFile Error In Rotativa.aspnetcore

While converting a view as pdf in asp.net core 2.1 app with rotative it gives an error Value cannot be null. Parameter name: path1 Below is my Code var rpt = new ViewAsPdf(); //rptLandscape.Model = Model; …
Tanwer
  • 1,503
  • 8
  • 26
  • 41
4
votes
1 answer

Not found reference Rotativa

I want to used the Rotativa lib but not found it reference when it installed by Nuget. I have the App_browser and Rotativa folders , but not reference to Rotativa Why? add the reference to Rotativa.ddl but do not compile. I have this error The type…
4
votes
2 answers

Generate a pdf from multiple views using Rotativa?

I want to generate a single pdf using 2 views. My target is to generate the first page from the first View and the seconnd page from the second view. This is my current code: var actionPDF = new Rotativa.ActionAsPdf("DownloadDividendSummaryPdf", new…
Abhirup Ghosh
  • 135
  • 2
  • 13
4
votes
4 answers

Set .pdf name but prevent download with Rotativa

I need to set .pdf name before displaying it. I tried to set it like this return new ViewAsPdf(GetViewName(), "", reportVM) { PageSize = Size.Letter, FileName = GetViewName() + "-" + DateTime.Now.ToShortDateString() + ".pdf" }; , but in this…
Ioana Stoian
  • 146
  • 1
  • 10
4
votes
1 answer

save generated pdf on server

I'm generating pdf from view using ROTATIVA public ActionResult StandartPDF() { var makeCvSession = Session["makeCV"]; var something = new Rotativa.ViewAsPdf("StandartPDF", makeCvSession) { FileName = "cv.pdf" }; …
gsiradze
  • 4,583
  • 15
  • 64
  • 111
1
2
3
18 19