Welcome Guest Search | Active Topics | Sign In | Register

EO.Pdf Not making image full page Options
Martin
Posted: Tuesday, July 18, 2017 11:15:18 AM
Rank: Newbie
Groups: Member

Joined: 7/18/2017
Posts: 1
I'm creating a PDF from an HTML & CSS document. The HTML document has cover sheet which is an <img> that should cover the whole of the first page.

I'm setting the size of the img like this in CSS:

Code: CSS
img.cover {
   width: 8.5in;
   height: 11in;
}


When I create the PDF I'm setting the page size like this:

Code: C#
HtmlToPdf.Options.PageSize = new SizeF(8.5, 11);
HtmlToPdf.Options.OutputArea = new RectangleF(0, 0, 8.5, 11);


However when I generate the PDF there is a small stripe down the right of the page and across the bottom the same colour as the page.

I have tried making the image smaller using the CSS and this works making the stripes bigger, however if I make the image bigger than the page using CSS it still shows the stripes. Any ideas how to solve this?
eo_support
Posted: Tuesday, July 18, 2017 1:17:16 PM
Rank: Administration
Groups: Administration

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

Please try to use pixels size and see if it works. You can multiply inch width to your DPI value (usually 96) to get the pixel width. So in your case the pixel size would be 816 by 1056.

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.