I am using abcPdf to convert an HTML report into a pdf file. The pdf has to be a single landscape A4 page.
Do you know if there is any way to tell abcPdf to scale th
This might be a bit simpler
///
/// Calculate the height of given html
///
///
///
public int CalculateHeight(string html)
{
int id = _Document.AddImageHtml(html);
int height = (int)(_Document.GetInfoInt(id, "ScrollHeight") * PixelToPointScale);
_Document.Delete( id );
return height;
}
[edit] Well scrollHeight fails with ver8 this works though
private int AddImageHtml(string html)
{
try
{
return _Document.AddImageHtml("" + html + "");
}
catch (Exception ex)
{
throw new Exception(html, ex);
}
}
private double GetElementHeight(int id)
{
abcpdf.XRect[] tagRects = _Document.HtmlOptions.GetTagRects(id);
string[] tagIds = _Document.HtmlOptions.GetTagIDs(id);
for (int i=0;i