Welcome Guest Search | Active Topics | Sign In | Register

EO PDF not honouring background colour in CSS Options
Alex Angas
Posted: Wednesday, July 11, 2012 4:37:29 AM
Rank: Newbie
Groups: Member

Joined: 6/5/2012
Posts: 3
Hello,

We are using EO.PDF 2012.0.23 to generate PDFs from ASP.NET pages we have developed. Unfortunately we are experiencing an issue where the converter is not honoring some CSS. We cannot reproduce the problem in the latest version of IE, Firefox or Chrome so it seems to be a problem with the converter.

The converter code is executed as follows:

Code: C#
var options = new HtmlToPdfOptions
	{
		UserName = /* set from config */,
		Password = /* set from config */,
		AutoFitX = HtmlToPdfAutoFitMode.ScaleToFit
	};
options.PageSize = new SizeF(PdfPageSizes.A4.Height, PdfPageSizes.A4.Width);
HtmlToPdf.ConvertUrl(url, stream, options);


The particular CSS that is not working uses a background image and colour. The background image is being correctly set. This image has a transparent background through which we are expecting to see the background colour. However we cannot see the background colour.

This is the CSS that does not work:

Code: CSS
.wbrt-programdata-lifecycle-osr-print-changed-question {background: #FFD800 url(response-changed.png) repeat;}
.wbrt-programdata-lifecycle-osr-print-changed-textbox {background: #FFD800 url(response-changed.png) repeat !important;}


However this CSS does work:

Code: CSS
.wbrt-programdata-lifecycle-osr-print-changed-checkbox {background: #FFD800 url(response-changed.png) repeat;display: inline-block;}
.wbrt-programdata-lifecycle-osr-print-changed-checkbox input[type="radio"] {margin-left: 3px;margin-right: 3px;margin-top: 4px;margin-bottom: 3px;}


The HTML between the two are different however - the major difference is that the former section that does not work is used inside fieldset tags.

There is a lot of HTML, CSS and images, with some business-sensitive text but if helpful I can e-mail this securely somewhere, along with our license details.

Thanks for any help!

Alex.
eo_support
Posted: Wednesday, July 11, 2012 2:05:29 PM
Rank: Administration
Groups: Administration

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

Thanks for posting in the forum. We are able to reproduce the problem but we still do not know the cause it. We will let you know as soon as we find out.

Thanks!
Alex Angas
Posted: Wednesday, July 11, 2012 7:38:20 PM
Rank: Newbie
Groups: Member

Joined: 6/5/2012
Posts: 3
We have done some more testing that may help. If we don't use the background image then the background colour does come through. The problem is using the two together.

Looking forward to hearing from you, thanks!
eo_support
Posted: Wednesday, July 11, 2012 9:10:43 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Yes. It does appear to be exactly like you said. Thanks for the additional information.
eo_support
Posted: Tuesday, July 17, 2012 4:41:50 PM
Rank: Administration
Groups: Administration

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

We have posted a new build that should fix this problem. Please see your private message for the download location.

Thanks!
Alex Angas
Posted: Tuesday, July 17, 2012 7:23:51 PM
Rank: Newbie
Groups: Member

Joined: 6/5/2012
Posts: 3
Thank you very much.

Unfortunately due to our tight deadlines we've needed to work around the issue and it's not easy for me to test this any more. However if the opportunity comes up I will test and post back here.

Thanks again!
eo_support
Posted: Tuesday, July 17, 2012 7:29:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
No problem. Feel free to let us know whenever you need anything.

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.