Welcome Guest Search | Active Topics | Sign In | Register

HtmlToPdf right side being cut off Options
brixer
Posted: Tuesday, October 18, 2016 11:58:08 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2016
Posts: 3
HtmlToPdf seems to be trimming off roughly 20 - 25 pixels from the right side of the page. This is preventing fullscreen output onto the the PDF as you can see from the screenshot shown below. Using the classic engine does not have the same issue.

I've experimented by increasing the ZoomLevel, but this still cuts off the content by same amount of space.

Could someone have a look at the code that I am using below and see if there are any issues with it that would be causing this effect or if it is actually a bug in the generator.

The version I am using is v16.2.37.0.

Code: C#
var pdfStream = new MemoryStream();
var pdfOption = new HtmlToPdfOptions
{
    NoScript = true,
    OutputArea = new RectangleF(0, 0, PdfPageSizes.A4.Height, PdfPageSizes.A4.Width),
    PageSize = new SizeF(PdfPageSizes.A4.Height,  PdfPageSizes.A4.Width),
    ZoomLevel = 1.312f
};
HtmlToPdf.ConvertHtml(html, pdfStream, pdfOption);


Using inbuilt EO.Pdf engine


Using UseClassicEngine through EO.Pdf.Classic

eo_support
Posted: Wednesday, October 19, 2016 8:30:28 AM
Rank: Administration
Groups: Administration

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

Your code looks fine. Can you try to isolate the problem into a test project and send the test project to us?

https://www.essentialobjects.com/forum/test_project.aspx

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.