tag:blogger.com,1999:blog-5192407982178004818.post1324143660380525116..comments2023-11-03T14:10:09.641+01:00Comments on Follow the Yellow Brick Road: Rotativa, how to print PDF in Asp.Net MVCGiorgio Boziohttp://www.blogger.com/profile/17360372948342890640noreply@blogger.comBlogger67125tag:blogger.com,1999:blog-5192407982178004818.post-60481294988233089222013-01-03T09:37:14.129+01:002013-01-03T09:37:14.129+01:00Hi, if gif images are part of the html to convert ...Hi, if gif images are part of the html to convert they should be converted. Did you experience issues with this?Giorgio Boziohttps://www.blogger.com/profile/17360372948342890640noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-77676149536194274912012-12-28T11:07:57.623+01:002012-12-28T11:07:57.623+01:00Hi, does rotativa support .gif images?Hi, does rotativa support .gif images?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-1220736836839501232012-11-30T13:55:19.930+01:002012-11-30T13:55:19.930+01:00Hello Giorgio,
It is working well on my local mac...Hello Giorgio,<br /><br />It is working well on my local machine. But it is giving me unhandled exception on server. I am using 'SaveOnServerPath', where I am giving windows temp path to save the document. This is where I am getting the error.<br />at Rotativa.WkhtmltopdfDriver.Convert(String wkhtmltopdfPath, String switches, String html)<br />at Rotativa.AsPdfResultBase.CallTheDriver(ControllerContext context)<br />at Rotativa.AsPdfResultBase.ExecuteResult(ControllerContext context)Naresh Thanduhttps://www.blogger.com/profile/03732800573223630270noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-48285862654075011252012-10-12T21:52:12.228+02:002012-10-12T21:52:12.228+02:00It's a feature that was requested from several...It's a feature that was requested from several users and was relatively easy to implement, I'm really happy to be able to help my fellow programmers ;)<br />Ciao!Giorgio Boziohttps://www.blogger.com/profile/17360372948342890640noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-28286123775867145552012-10-12T21:50:37.936+02:002012-10-12T21:50:37.936+02:00To control page breaks you can use css: http://www...To control page breaks you can use css: http://www.w3schools.com/cssref/pr_print_pageba.aspGiorgio Boziohttps://www.blogger.com/profile/17360372948342890640noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-32133324554205659662012-10-12T18:24:30.911+02:002012-10-12T18:24:30.911+02:00Thank you again Giorgio. SaveOnServerPath works gr...Thank you again Giorgio. SaveOnServerPath works great for saving the pdf on the server. Thanks for adding it to the package. Cheers!Jelenahttps://www.blogger.com/profile/05244150319987886291noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-4505370948845334292012-10-12T08:02:49.006+02:002012-10-12T08:02:49.006+02:00if I have multiple views, how do I save it to beco...if I have multiple views, how do I save it to become a multiple pages pdf?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-14713718519231396702012-10-04T13:59:52.677+02:002012-10-04T13:59:52.677+02:00Grazie Jelena! ;)
You can use the new property Sav...Grazie Jelena! ;)<br />You can use the new property SaveOnServerPath. If it is set with a valid server file system path, it saves the pdf.<br /><br />Ciao,<br />GiorgioGiorgio Boziohttps://www.blogger.com/profile/17360372948342890640noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-76225735934058417282012-10-03T23:01:19.603+02:002012-10-03T23:01:19.603+02:00Grazie Gio!
ViewAsPdf works like a charm - no aut...Grazie Gio!<br /><br />ViewAsPdf works like a charm - no authentication issues.<br /><br />Do you have a suggestion how to use Rotativa to generate pdf on the server, so I can attach it to an email. Like invoice email with PDF attached.<br /><br />Great work. Cheers!Jelenahttps://www.blogger.com/profile/05244150319987886291noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-17659885071620709732012-10-03T10:02:11.431+02:002012-10-03T10:02:11.431+02:00Hi Jelena,
It should work without having to set th...Hi Jelena,<br />It should work without having to set the cookie name. If it doesn't you could think about using ViewAsPdf instead.<br />Ciao,<br />GiorgioGiorgio Boziohttps://www.blogger.com/profile/17360372948342890640noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-20047119684908702652012-10-03T10:00:24.986+02:002012-10-03T10:00:24.986+02:00Hi, just uploaded Rotativa 1.4 to nuget gallery. I...Hi, just uploaded Rotativa 1.4 to nuget gallery. It has a SaveOnServerPath property that, if set with a valid server file system path, saves the pdf. Sorry for taking more time then expected, hope it helps anyway.Giorgio Boziohttps://www.blogger.com/profile/17360372948342890640noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-5988688958612320912012-10-03T00:50:21.521+02:002012-10-03T00:50:21.521+02:00I'm having the redirect to login problem menti...I'm having the redirect to login problem mentioned earlier. I've tried setting FormsAuthenticationCookieName property on ActionAsPdf, but that didn't help. I'm using Forms authentication.<br /><br />Can you tell me how can I resolve this?<br /><br />Another question - can I save PDF on the server?<br /><br />Thanks!Jelenahttps://www.blogger.com/profile/05244150319987886291noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-79605708735680588922012-10-03T00:02:02.551+02:002012-10-03T00:02:02.551+02:00This comment has been removed by the author.Jelenahttps://www.blogger.com/profile/05244150319987886291noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-16514557767504297592012-09-25T08:10:54.884+02:002012-09-25T08:10:54.884+02:00How can we save this pdf to server???pls reply meHow can we save this pdf to server???pls reply meAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-71175496171677641752012-09-24T23:43:53.769+02:002012-09-24T23:43:53.769+02:00Found the way to get the cookie name:
FormsAuthen...Found the way to get the cookie name:<br /><br />FormsAuthentication.FormsCookieName<br /><br />However, I still get the login page instead of the actual authorized view, both whe I set FormsAuthenticationCookieName to ".ASPXAUTH" (the default name) or to FormsAuthentication.FormsCookieName. Not sure what's wrong there, cause on my development pc works fine.Hugonnehttps://www.blogger.com/profile/15901459733844224876noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-79353429713866223232012-09-24T18:33:56.429+02:002012-09-24T18:33:56.429+02:00Well, it worked. Thanks. Now I'm getting the i...Well, it worked. Thanks. Now I'm getting the issue mentioned a couple of comments above where my login page gets rendered instead of my content page, so as suggested I'm going to check the cookes. Funny thing is that I'm not using a specific cookie name, so I'm guessing it's something about IIS. <br /><br />Quick question. Is there a way I can programatically get the cookie name from my app? Thanks Giorgio.Hugonnehttps://www.blogger.com/profile/15901459733844224876noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-7873157582708968472012-09-24T17:28:51.420+02:002012-09-24T17:28:51.420+02:00Thanks for yuor quick reply. Then it's totally...Thanks for yuor quick reply. Then it's totally my bad. I have the Rotativa dll in my bin folder, but nothing else. I'm going to deploy the Rotativa folder as well. Do I need the dll file in the bin folder or juest the Rotative directory in the root? Thanks again.Hugonnehttps://www.blogger.com/profile/15901459733844224876noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-30383732444010674452012-09-24T16:50:21.151+02:002012-09-24T16:50:21.151+02:00Hi, ones you install the package no other configur...Hi, ones you install the package no other configuration should be needed. How did you deploy to production? You need the Rotativa folder in the root of the web app, or if different provide the path in web.config.Giorgio Boziohttps://www.blogger.com/profile/17360372948342890640noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-33604150368027139632012-09-24T16:27:01.895+02:002012-09-24T16:27:01.895+02:00Hi Giorgio. Great tool. I'm having a problem w...Hi Giorgio. Great tool. I'm having a problem when I deploy to production though. I'me getting an error that says "The directory name is invalid". It works great on my development machine. Are there any special folder the component uses that I should give permissions to? Thanks.Hugonnehttps://www.blogger.com/profile/15901459733844224876noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-6481667459187772222012-08-28T18:56:19.296+02:002012-08-28T18:56:19.296+02:00Glikoz, not sure I understood what you are trying ...Glikoz, not sure I understood what you are trying to do... You already can call another action, even on another route, and nobody will see the actual Url.Giorgio Boziohttps://www.blogger.com/profile/17360372948342890640noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-2459816488091090492012-08-28T18:44:47.682+02:002012-08-28T18:44:47.682+02:00Hi Amit, not that I know, sorry. What about simply...Hi Amit, not that I know, sorry. What about simply concatenate them in a "super" view?Giorgio Boziohttps://www.blogger.com/profile/17360372948342890640noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-74861039759416203202012-08-28T15:15:17.943+02:002012-08-28T15:15:17.943+02:00Hi, is there any way by which we can combine multi...Hi, is there any way by which we can combine multiple PDFs containing multiple views?amitthakkarhttps://www.blogger.com/profile/15142199677476407974noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-75028825101663708512012-08-26T17:01:32.573+02:002012-08-26T17:01:32.573+02:00How can I call Pdf from another controllers action...How can I call Pdf from another controllers action? (not-Authenticated secred action :) )glikozhttps://www.blogger.com/profile/17968491940767247564noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-27674330023226215442012-08-08T17:03:09.017+02:002012-08-08T17:03:09.017+02:00Brosto (or Giorgio)--I have the same issue as my d...Brosto (or Giorgio)--I have the same issue as my deployment is for an intranet that uses AD authentication. Now that I have built to the server, I am getting "Error: Authentication Required" when I attempt to execute an `ActionAsPdf`.<br /><br />I tried setting `FormsAuthenticationCookieName = ".ADAuthCookie"` but it didn't work. Any thoughts?<br /><br />Thanks,<br /><br />Mattmcashatthttps://www.blogger.com/profile/14513521778202988627noreply@blogger.comtag:blogger.com,1999:blog-5192407982178004818.post-71097779461835743032012-07-31T11:03:29.592+02:002012-07-31T11:03:29.592+02:00okokAnonymousnoreply@blogger.com