Welcome Guest Search | Active Topics | Sign In | Register

aspxtoPdf not using style in Production server Options
Tiago Silva
Posted: Wednesday, October 26, 2011 12:17:25 PM
Rank: Newbie
Groups: Member

Joined: 10/26/2011
Posts: 1
Hi,

In my development server while using ASPXtoPDF I get the pdf file exactly as expected.
My problem appeared when Ipublished my solution to a production server, where I noticed that the styles where not applied to the page before the rendering.

I have tried using HtmlToPdf.Options.BAseUrl but the styles are not applied.

What am I doing wrong?

Thank you.

Tiago Silva
eo_support
Posted: Wednesday, October 26, 2011 12:29:17 PM
Rank: Administration
Groups: Administration

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

This usually occurs when your domain name is not correctly resolved on the server itself. For example, if you have a page "www.yourdomain.com/Page1.aspx" that uses style file "www.yourdomain.com/Styles.css" but "www.yourdomain.com" is not correctly resolved on your production server, then the PDF file will lose styles because it can not get Styles.css.

To verify whether this is the problem, log into your server and try to access the page you are trying to convert locally from your server with the same Url you use from outside. If that works, then the converter should work. If that does not, then you can modify your host file on your server to make sure it resolves to itself correctly.

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.