<html><head><meta http-equiv='content-type' content='text/html; charset=utf-8'><meta http-equiv='content-style-type' content='text/css'></head><body><table border=1 cellspacing=0 cellpadding=0><tr><th width=800>1</th><th width=200>2</th></tr></table></body></html>
QPrinter *printer=new QPrinter();printer->setOrientation(QPrinter::Landscape);printer->setPageSize(QPageSize(QPageSize::A4));printer->setPageMargins(QMarginsF(5,5,5,5),QPageLayout::Millimeter);this->docum=new QTextDocument();this->docum->setHtml(strHtml);
C++ (Qt)docum->setPageSize(QSizeF(printer->pageLayout().pageSize().size(QPageSize::Point))),