Welcome Guest Search | Active Topics | Sign In | Register

EO.PDF and MVC Razor Views Options
Nate
Posted: Thursday, March 22, 2012 9:18:35 AM
Rank: Newbie
Groups: Member

Joined: 3/22/2012
Posts: 5

Does the EO.Pdf.HtmlToPdf.ConvertUrl() function or any of the HTML to PDF functions work with MVC Razor views? If so, are there any code samples available. When I supply my working url to the function I receive the 'Failed to convert Url' error message. Any help would be appreciated. Thanks.
eo_support
Posted: Thursday, March 22, 2012 9:24:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

ConvertUrl works like a browser. What technology you use on the server side does not matter. So the error is caused by something else.

Please try to update to the latest build first and see if you still have problems. If you still have problems, post the full error message and stack trace and we will see what we can find.

Thanks!
Nate
Posted: Monday, March 26, 2012 11:45:38 AM
Rank: Newbie
Groups: Member

Joined: 3/22/2012
Posts: 5
I've made some progress. I'm able to create a .pdf, but the .pdf that is created is just a render of my application's log-in page, so I think there is an issue with authentication. I get the same result using both the ConvertURL and ConvertHtml functions. Do you have any advice for how to get around this in MVC 3?
eo_support
Posted: Monday, March 26, 2012 11:49:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

One way is to add an additional query string argument to bypass the authentication logic. See here for more details:

http://www.essentialobjects.com/forum/postst5528_How-to-convert-a-Web-page-that-requires-login-to-PDF.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.