Welcome Guest Search | Active Topics | Sign In | Register

EO.Pdf: HTML footer wider than OutputArea Options
anders.ekdahl
Posted: Friday, March 16, 2012 5:31:37 AM
Rank: Member
Groups: Member

Joined: 3/16/2012
Posts: 14
Hi!
We use EO.Pdf to convert HTML files to PDF, and it's working nicely, but in the latest version the HTML footer is wider than the OutputArea we specify. It worked correctly in 3.0.79.2, but in 3.0.120.2 the footer is about half a centimeter too wide.

/Anders
eo_support
Posted: Friday, March 16, 2012 12:01:14 PM
Rank: Administration
Groups: Administration

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

We tested this and it worked fine for us. Can you post a some test code to demonstrate the problem?

Thanks!
anders.ekdahl
Posted: Monday, March 19, 2012 3:03:31 AM
Rank: Member
Groups: Member

Joined: 3/16/2012
Posts: 14
Hi!
Sure, here is a sample where the blue footer is a few mm wider than the red body.
Code: C#
HtmlToPdf.Options.PageSize = EO.Pdf.PdfPageSizes.A4;
var html = @"<body style=""background:red"">";
for (var i = 0; i < 1000; i++)
{
    html += "testing ";
}
html += @"&lt;/body&gt;";
HtmlToPdf.Options.FooterHtmlFormat = @"&lt;div style=""background:blue""&gt;footer&lt;/div&gt;";
HtmlToPdf.Options.FooterHtmlPosition = HtmlToPdf.Options.PageSize.Height - 0.90f;
HtmlToPdf.Options.OutputArea = new RectangleF(0.8f, 0.5f, HtmlToPdf.Options.PageSize.Width - 1.00f, HtmlToPdf.Options.PageSize.Height - 1.40f);

var tempFile = "test.pdf";
HtmlToPdf.ConvertHtml(html, tempFile);


And here's what the actual PDF looks like:
http://speedy.sh/REaGj/test.pdf

/Anders
eo_support
Posted: Monday, March 19, 2012 11:18:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Thanks for the test code. We have confirmed this to be a bug and will provide you an update build as soon as possible.
eo_support
Posted: Monday, March 19, 2012 2:50:55 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!
anders.ekdahl
Posted: Tuesday, March 20, 2012 2:51:29 AM
Rank: Member
Groups: Member

Joined: 3/16/2012
Posts: 14
Hi,
It worked great, thanks!

/Anders
eo_support
Posted: Tuesday, March 20, 2012 7:28:12 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Great. Thanks for confirming the fix!
katie
Posted: Monday, March 26, 2012 8:44:16 AM
Rank: Member
Groups: Member

Joined: 12/7/2007
Posts: 21
Is it possible to get a copy of this new build please, I have the same problem. Thanks
SarahH
Posted: Friday, May 4, 2012 9:54:22 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2012
Posts: 6
I also have this issue - where can I get a hold of the new build?

Thanks
Sarah
eo_support
Posted: Friday, May 4, 2012 9:58:18 AM
Rank: Administration
Groups: Administration

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

Please download it from our download page.

Thanks
SarahH
Posted: Friday, May 4, 2012 10:35:41 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2012
Posts: 6
Thank you - this has solved the fix


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.