|
Rank: Newbie Groups: Member
Joined: 7/28/2012 Posts: 2
|
I am getting the error message "ASP_0219_:_80004005|Invalid_LCID" when I pull a page that works when run directly - into the HTML to PDF using EO.PDF tool. The message is from the weblogs, the client code merely says ~500 error from web server~.
After researching, I believe the issue is from a lack of "culture" information passed to the web server from the tool. The page in question is one with several calls to format currency and dates based on "current culture" from the client (a british user would see dates one way, while US would another).
How do I either pass culture settings like a normal brower would OR configure my server to a default culture (not my preference). I would rather pass the info that assign a default.
Or am I completely misdiagnosing the issue.
Thx
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, You can specify the language by adding an additional header. For example, the following code will pull the Danish Google site:
Code: C#
//Set the language to "da" --- danish
HtmlToPdf.Options.AdditionalHeaders = new string[]
{
"Accept-Language: da",
};
//Now run the converter, this will pull the Danish Google homepage
HtmlToPdf.ConvertUrl("www.google.com", "danish_google_homepage.pdf");
You can find the complete language code list here: http://www.w3schools.com/tags/ref_language_codes.aspHope this helps. Please let us know if this works for you. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/28/2012 Posts: 2
|
Thank you, but I am afraid it did not. I get the same response.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
In that case you may want to look into your code and see what it is looking for. Accept-Language is the "standard" way of passing the browser's language preference. Of course, if it is looking for something else, then you need to pass it something else --- the bottom line is whatever you need you just pass it through AdditionalHeaders. If you do not know the corresponding header entry that your code is looking for, try to create a small test app/page to demonstrate the problem and we will find it out for you.
Thanks!
|
|