Welcome Guest Search | Active Topics | Sign In | Register

Strange scale problem Options
CHIEN
Posted: Wednesday, February 26, 2014 6:24:52 PM
Rank: Member
Groups: Member

Joined: 9/4/2013
Posts: 18
Dear Support Team,

We have a html chart that need to convert to PDF,
every thing is OK if we set HtmlToPdf.Options.PageSize 12.34 x6.44 inch.

but when we change the PageSize to 12.34 x 5.44 inch. (only decrease height by 1 inch)
the html chart become very small on PDF and not fit to page anymore.
so we thing there maybe some kind bug in scale.

you can check our sample file and screen shot on this link

https://www.dropbox.com/sh/pbrgwe4j9xw1vtp/UMfHpqYCxk#/

this is our code

static void TestConvertHtml()
{

float w = 12.34F;
float h = 5.44F; //if we change 5.44 to 6.44 than every thing is OK

HtmlToPdf.Options.PageSize = new System.Drawing.SizeF(w, h);
HtmlToPdf.Options.OutputArea = new System.Drawing.RectangleF(0F, 0F, w, h);
HtmlToPdf.Options.AutoFitX = HtmlToPdfAutoFitMode.ScaleToFit;
HtmlToPdf.Options.AutoFitY = HtmlToPdfAutoFitMode.ScaleToFit;
HtmlToPdf.Options.MinLoadWaitTime = 1000;
string htmlFile = "ScaleError.html";

//using ConvertHtml to get PDF
PdfDocument pdfDoc = new PdfDocument();
string text = System.IO.File.ReadAllText(htmlFile);
HtmlToPdf.ConvertHtml(text, pdfDoc);
pdfDoc.Save("scale_error.pdf");
}

Best Regards,
Chien Chih

eo_support
Posted: Thursday, February 27, 2014 10:12:19 PM
Rank: Administration
Groups: Administration

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

We have posted a new build that should fix this issue. You can download the new build from our download page.

Thanks!
CHIEN
Posted: Friday, February 28, 2014 1:04:26 AM
Rank: Member
Groups: Member

Joined: 9/4/2013
Posts: 18
The new build work!!! thank you very much.
eo_support
Posted: Friday, February 28, 2014 10:13:15 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Great. Thanks for confirming 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.