Correct PageXmlTextExporter's Height and Width

This commit is contained in:
BobLd
2019-10-08 12:00:04 +01:00
parent d939be1b9c
commit eb5400e01b

View File

@@ -98,8 +98,8 @@ namespace UglyToad.PdfPig.Export
/// <returns></returns>
private string PointToString(PdfPoint point, decimal height)
{
decimal x = point.X * scale;
decimal y = (height - point.Y) * scale;
decimal x = Math.Round(point.X * scale);
decimal y = Math.Round((height - point.Y) * scale);
return (x > 0 ? x : 0).ToString("0") + "," + (y > 0 ? y : 0).ToString("0");
}
@@ -175,8 +175,8 @@ namespace UglyToad.PdfPig.Export
// }
//},
ImageFilename = "unknown",
ImageHeight = (int)page.Height,
ImageWidth = (int)page.Width,
ImageHeight = (int)Math.Round(page.Height * scale),
ImageWidth = (int)Math.Round(page.Width * scale),
//PrintSpace = new PageXmlPrintSpace()
//{
// Coords = new PageXmlCoords()