Welcome Guest Search | Active Topics | Sign In | Register

Problem in PDF on server Options
Sandy
Posted: Thursday, June 7, 2012 8:48:23 AM
Rank: Newbie
Groups: Member

Joined: 6/7/2012
Posts: 1
HI,

I have used Eo.pdf to generate the pdf the PDF is generating fine on local system but on uploading the build on server the styles and css on the page is not coming.
My Code is following.

protected void ToPDF_BeforeRender(object sender, EventArgs e)
{
HtmlToPdf.Options.PageSize = PdfPageSizes.A4;
HtmlToPdf.Options.BaseUrl = Convert.ToString(ConfigurationManager.AppSettings["MailURL"]);
HtmlToPdf.Options.AllowLocalAccess = true;
HtmlToPdf.Options.NoScript = false;
HtmlToPdf.Options.MaxLoadWaitTime = 1000000;
}

protected void btnGeneratePDF_Click(object sender, EventArgs e)
{
//ASPXToPDF1.RenderAsPDF();
datalistMap.Visible = true;
ActiveMapType = "1";
odsGetActiveIncidentRecordForDispatchMap.DataBind();
datalistMap.DataBind();
ToPDF.RenderAsPDF();
}
eo_support
Posted: Thursday, June 7, 2012 8:58:34 AM
Rank: Administration
Groups: Administration

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

Your code looks fine. Please try to create a minimum test page to test with an external CSS file and see if it works. For example, you can try to link to "http://www.essentialobjects.com/EOWebSite.css" and see if any of styles in this file is applied.

If external CSS are applied but CSS files on your server are not, then most likely it has to do with permissions. You can check whether your CSS file can be accessed anonymously. If your CSS file requires login, you can also download the latest build from our download page and update to that build. That build will automatically use your current login cookies to authenticate CSS file for you.

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.