Welcome Guest Search | Active Topics | Sign In | Register

EO.PDF .Net - White Lines Options
Wesley
Posted: Thursday, June 25, 2015 4:21:27 AM
Rank: Newbie
Groups: Member

Joined: 6/25/2015
Posts: 1
Hi there,

I am trying to create a pdf with no margins using the code below. Thin white lines on the top and right sides of the pdf. The only way I can get the lines to disappear is if I use whole numbers for the PageSize/OutputArea which isn't a solution as we need the content to fit on standard paper sizes. Please help.

Thanks.

public static byte[] ConvertHtml(string html)
{

var stream = new MemoryStream();

var options = new HtmlToPdfOptions();
options.PageSize = new SizeF(8.3f, 11.8f);
options.OutputArea = new RectangleF(0.0f, 0.0f, 8.3f, 11.8f);
options.AutoFitX = HtmlToPdfAutoFitMode.ScaleToFit;

HtmlToPdf.ConvertHtml(html, stream, options);

return stream.ToArray();

}
eo_support
Posted: Friday, June 26, 2015 10:42:14 AM
Rank: Administration
Groups: Administration

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

Your code is fine. Most likely the line is caused by something in your HTML. So you will want to use a regular browser to load the HTML and see if you can find what's in the HTML that caused it.

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.