Welcome Guest Search | Active Topics | Sign In | Register

EO.Pdf.HtmlToPdf.ConvertUrl Options
Jim Peal
Posted: Friday, December 12, 2014 9:09:59 PM
Rank: Newbie
Groups: Member

Joined: 12/11/2014
Posts: 2
Hello,
I get this message displayed in the center of the converted PDF document:

The form cannot be displayed in the browser because
the use of session cookies has been disabled in the
current browser settings. In order to load the form,
session cookies must be allowed.


The PDF shows the navigation around the top and left but the InfoPath web form is not showing, shows the message where the form should be. Do you have any idea why only the InfoPath part of the page does not render?

All other aspects of the page seem to render fine. Here is the source:

protected void Button1_Click(object sender, EventArgs e)
{
var url = "https://sharepoint.domain.nam/path_to_list/editifs.aspx?ID=500";

HtmlToPdfOptions options = new HtmlToPdfOptions();
// Fiddler - attempt at reading header cookie - no good
// System.Net.Cookie cookie1 = new System.Net.Cookie("_InfoPath_Canary", "AELSAZT3NT4TYS4AME6NWTFMOLACML2MNFZXI4ZPINUGC3T
// HMVJGK4LVMVZXIL2JORSW2L3UMVWXA3DBORSS46DTNYUGQNRTMRTUIYLTJU2UOMSWGR4ECWDXJVVECWSFMVSFQTKVKNXUUSTZNRCGO2KLKJVQ");
// options.Cookies.Add(cookie1);

HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.ClearHeaders();
response.ContentType = "application/pdf";
options.SSLVerificationMode = SSLVerificationMode.None;
options.ZoomLevel = (float) .5; // this works
options.NoLink = false; // this works too
options.NoCache = true;
options.UserName = "domain\\User";

options.Password = "password";
//Convert to the output stream
EO.Pdf.HtmlToPdf.ConvertUrl(url, response.OutputStream,options);

response.End();

}
eo_support
Posted: Friday, December 12, 2014 9:31:42 PM
Rank: Administration
Groups: Administration

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

This has to do with InfoPath so we can not tell you exactly what it is. The root of the problem should be that you are missing some cookies that InfoPath is looking for. So you can use a traffic monitor (such as fiddler) to monitor the "normal" traffic while accessing your site with a browser. You can then compare this traffic with the traffic you see with EO.Pdf, that should tell you what's missing.

Thanks!
Jim Peal
Posted: Monday, December 15, 2014 9:08:18 AM
Rank: Newbie
Groups: Member

Joined: 12/11/2014
Posts: 2
Ok I think I understand. Your product, when used server-side to consume a specified URL, does not interact with the assigned web site the same way a client side web browser would. I have to assume that an exact rendering (in memory) of the page contents would be necessary to reproduce the contents to a PDF. We may have to wait until your product has the ability to replicate all aspects of browser rendering before we decide to use it for SharePoint, however it may be acceptable for static html pages.
eo_support
Posted: Monday, December 15, 2014 9:14:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Jim Peal wrote:
Your product, when used server-side to consume a specified URL, does not interact with the assigned web site the same way a client side web browser would.

This is incorrect. EO.Pdf has a WebKit based browser engine built-in and it works almost exactly the same way as a client browser. the only difference is EO.Pdf's built-in browser renders as PDF instead of a normal browser renders to screen. To resolve your issue, you will need to find out the cookies or whatever other information that your server needs/verify and supply that information to EO.Pdf.
Jim Peal
Posted: Monday, December 15, 2014 9:19:42 AM
Rank: Newbie
Groups: Member

Joined: 12/11/2014
Posts: 2
"almost" is a huge difference. You see, I never have to use fiddler to find cookies when I am using the application in my browser client, and I never see session errors. It is OK that your product is not completely compatible to SharePoint list forms right now, keep working on it - you are close.
eo_support
Posted: Monday, December 15, 2014 10:07:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
In that case you are welcome to try your luck elsewhere. Our browser engine is built directly from WebKit's source code and it's the same one Google Chrome browser and Apple Safari browser uses. We say "almost" because there are differences: A normal web browser has UI to interact with the end users, and our converter does not; A normal web browser runs on the user's client computer, and our converter runs on your server (you can't execute C# code on client's machine). While most of the time such differences do not matter, such differences can affect how your web server “sees” and interacts with the browser engine inside our converter and sometimes can manifest in various ways. We will work with you to help you to understand such difference and resolve your issue if you are willing to work with us. However if you just wish to rush to conclusion then we do not feel that we need waste our energy to convince you otherwise. We would encourage you to switch to other products on the market and we wish you good luck there.


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.