|
Rank: Newbie Groups: Member
Joined: 2/24/2014 Posts: 3
|
Just downloaded the demo version (EO.Totals....). 2 questions: 1) Can we use the EO.Web.dll (included on demo) in one of our apps to test it ? 2) If question 1 is Yes. Our test app fails whenever we execute ASPXToPDF1.RenderAsPDF(); It just displays a web page with 'Page not found'. But the downloaded demo works fine ! Note: Our test app is a Web app developed with VS 2013 using C#. We have added the ASPXToPDF control as per documentation but still fails after multiple tries !!!! What are we missing ???
Anyones response will be Greatly Appreciated !
Thanks !
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Yes. You can try to EO.Web.dll included in the demo. The purpose of the download is so that you can try everything.
We do not know why your app displays a "page not found" error. I would suspect that it has something to do with custom handlers in your web.config or some other code in your master page. So I would recommend you try the code from a blank test page without master page first. If that does not work, check if you have any other handler/module loaded in your web.config and comment those out temporarily to see if it works. You will also make sure NOT to RenderAsPDF from within an AJAX call. For example, if you have a Button inside an ASP.NET AJAX UpdatePanel and you trigger RenderAsPDF when you clicking that button, then it won't work either. The PDF creating request must be a regular HTTP request, not an AJAX request.
Hope this helps. Please let us know what you find.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/24/2014 Posts: 3
|
Thank you for your quick reply ! Unfortunately, we have tried a number of things but still no success ! Our test project is a web app with VS2013 (C#) .Net 4.5.1. We added a webform (Main.aspx) and made it the startup page. When we run the project with IE 11, after we click the button to invoke 'ASPXToPDF' a web page comes up where it says ' page not found'. If we use Google Chrome the web page that comes up is completely blank ! I am pretty sure there is something we are missing but we do not have a clue what. Here is the code for the main.aspx we are using : <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Main.aspx.cs" Inherits="TestPrint3.Main" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> </div> <asp:TextBox ID="TextBox1" runat="server" style="top: 74px; left: 10px; position: absolute; height: 21px; width: 435px"></asp:TextBox> <asp:Label ID="Label1" runat="server" style="top: 44px; left: 10px; position: absolute; height: 28px; width: 435px" Text="Test page for ASPX to PDF"></asp:Label> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" style="top: 114px; left: 10px; position: absolute; height: 26px; width: 196px" Text="Print this aspx page" /> <eo:ASPXToPDF ID="ASPXToPDF1" runat="server"> </eo:ASPXToPDF> </form> </body> </html>
I apologize for the lengthy email !
Thank you for your time !
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Can you send us the test project in zip format so that we can try to run it here? We will PM you as to where to send.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
This is just to let you know that we have received your test project but your test project works fine here. We have replied your email with further instructions. You can reply that email directly if you still have any questions.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We have received the screenshot. The error is because you do not have EO.Pdf.dll inside your app's bin folder. ASPXToPDF relies on EO.Pdf.dll to function (internally it calls HtmlToPdf.ConvertHtml). So please try to copy that DLL into your app's bin folder. After that it should work correctly for you.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/24/2014 Posts: 3
|
Thank you !!!!! That did the trick !
Best Regards.......
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
You are welcome. Please feel free to let us know if you have any more questions.
|
|