|
Rank: Newbie Groups: Member
Joined: 7/28/2011 Posts: 8
|
I am producing an empty pdf document when I convert a html URL to Pdf using the HtmlToPdf.ConvertUrl method. This problem only exists on the test site which has a host name that is only 1 sub-domain lower than the main domain that EO.Web is licensed for.
The problem does NOT exist in the development environment and PDFs are created just fine.
I am attaching the license both at runtime and as a license file in the bin directory and I made sure that the proper DLL's are located in the bin directory of the test site.
Any help is much appreciated!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You will want to check your web server log and see if you can find anything there. For example, if for any reason your web server decides to send an empty page as a response to the Url request, then you will get an empty page. The HTML to PDF converter should always generate output unless the input is indeed an empty page.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/28/2011 Posts: 8
|
Hi,
I am able to access the html page directly by its specific URL. But let me give a little more detail about the problem. The html page that is used in the Pdf conversion is created dynamically as a temporary html file after which it is supposed to be used to by Pdf converter to create a pdf version of the html page. I can see that the html file is generated properly by my own methods and is accessible by its URL.
Can you think of any licensing issues that would cause this?
I have the standard license for EO.Web and EO.Pdf version 2011. And as i mentioned in my original post, the software seems to be working properly on dev.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
No. This is unlikely to be anything related to the converter at all. When you have a blank output, you have a blank input. It should be as straight forward as that.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/28/2011 Posts: 8
|
I have the following as a test case:
HtmlToPdf.ConvertUrl("http://www.google.com", Server.MapPath("~") & "testPdf.pdf")
This produces a Pdf on the dev machine and does not produce a pdf on the web server and produces the following exception in the event viewer:
Exception information: Exception type: HtmlToPdfException Exception message: Convertion failed. Failed to initialize conversion.
Also this Error:
The description for Event ID 0 from source EO Debug Message cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Code = 6. hr = 80131604
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Please check if you have more error messages. This error message just means the conversion failed because it couldn't initialize correctly (usually due to permission issues). In your previous post you didn't mention there was an exception so we assumed that the conversion successfully completed with no error but only produces PDF files with blank pages.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/28/2011 Posts: 8
|
Just performing a simple conversion by
HtmlToPdf.ConvertUrl("http://www.google.com", Server.MapPath("~") & "testPdf.pdf")
produces 1 warning and 3 errors:
Warning: Thread ID: 5 Thread account name: IIS APPPOOL\(My_Site) Is impersonating: False Stack trace: at EO.Pdf.HtmlToPdfException.b(Exception A_0) at EO.Pdf.Internal.kq.a() at EO.Pdf.Internal.kq.b() at EO.Pdf.HtmlToPdf.a(kq A_0) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName) at (My_Page).__Render__control1(HtmlTextWriter __w, Control parameterContainer) in (My_URL):line 24 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The errors are the following:
1. The description for Event ID 0 from source EO Debug Message cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Code = 6. hr = 80131604
2. The description for Event ID 0 from source EO Debug Message cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Code = 6. hr = 80131604
3. The description for Event ID 0 from source EO Debug Message cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Code = 6. hr = 80131604
which seem to be identical i guess.
In my original post I had not checked the event viewer. It should be noted that this does not produce any file at all, not even a blank PDF!
Thanks for you help.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Please try to run the current version and see if it works or give you a different message. This problem is usually caused by security issues. Our old version always assumed that the code would be granted sufficient permission, and when the permission is not granted, it throws an exception and give up. Our new version works much better on this, it can detect different security context and tries to accommodate them, and if not, it supposes to give you a better error message. Also when you use the current version, we will be able to match the stack trace with our source code (we can't do that for old build since we do not maintain a build environment for each past build).
Note that while the new version may solve the problem for you, your current license will not work with the new version. When you purchase our product, you will receive free upgrade for one year. Yours has already expired in last July. As such in order to use the new version in production, you will need to place an upgrade order. The upgrade order price is the price difference + 15% of the full price. However if the newer version gives you a better error message which can help us to find a workaround for you with your version, then you can choose whether to upgrade or not.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/28/2011 Posts: 8
|
Before installing the older version, I installed the new one and I ran into problems on my dev environment where I was getting the following error:
System.Exception: License 3763522085 is not valid for this build
So unless you can issue me a temporary 2012 license I don't believe that I would be able to test the same scenario with the new version.
Thanks,
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You need to test the new version WITHOUT applying the license key. It will add a license banner to the bottom of each page but should not affect anything else.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/28/2011 Posts: 8
|
I installed the 2012 version on dev and deployed the 2012 version to my web server. The conversion happens on Dev with the banner at the bottom but I still get errors in web server. I did take out licenses on both dev and web server.
Here are the warning and errors in the event viewer: Event code: 3005 Event message: An unhandled exception has occurred. Event time: 3/13/2013 4:06:02 PM Event time (UTC): 3/13/2013 11:06:02 PM Event ID: 0178330949354f87877fbf48a6c1d9fd Event sequence: 101 Event occurrence: 5 Event detail code: 0 Application information: Application domain: /LM/W3SVC/3/ROOT-1-130076887561273684 Trust level: Full Application Virtual Path: / Application Path: D:\Test sites\TestSite\ Machine name: WEB1 Process information: Process ID: 3804 Process name: w3wp.exe Account name: IIS APPPOOL\(My_test_website_url) Exception information: Exception type: HtmlToPdfException Exception message: Convertion failed. Failed to initialize conversion (1). Request information: Request URL: (My_test_website_url) Request path: (My_test_website_url) User host address: 192.168.1.1 User: Is authenticated: False Authentication Type: Thread account name: IIS APPPOOL\(My_test_website_url)
Thread information: Thread ID: 13 Thread account name: IIS APPPOOL\(My_test_website_url) Is impersonating: False Stack trace: at EO.Pdf.Internal.lp.a(hi A_0) at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName) at ASP.niexecutivereports_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\Test sites\TestSite\TestPage.aspx:line 24 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
And 3 identical copies of the following error:
The description for Event ID 0 from source EO Debug Message cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Code = 5. hr = 8000ffff
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 7/28/2011 Posts: 8
|
A quick update:
I changed the setting "Load User Profile" to True in IIS7 for my specific app pool and that seems to have fixed the problem for the 2012 version at least. I am in the process of rolling back to the 2011 version to confirm whether this fix also works for the old version.
Thanks,
|
|
Rank: Newbie Groups: Member
Joined: 7/28/2011 Posts: 8
|
The fix seems to have worked for both the 2011 and 2012 version.
Thank you for your help. Cheers!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Ah. Thank you very much for sharing the solution. We would have not thought about that!
|
|