TRVReportHelper::PagesCount Problem
Posted: Mon May 12, 2014 1:57 am
hi, i use follow code to get page counts:
i puts text to RichViewEdit, *pages and *curPageNo is right. but i put any size picture to RichViewEdit, *pages and *curPageNo always is 1.
is RichViewEdit bug? can you help me? thanks.
Code: Select all
int imageWidth = 0, imageHeight = 0;
imageWidth = editContext->param.pageWidth;
imageHeight = editContext->param.pageHeight;
if ((imageWidth == 0)) {
return ;
}
rvh->RichView->LeftMargin = 0;
rvh->RichView->TopMargin = 0;
rvh->RichView->RightMargin = 0;
rvh->RichView->BottomMargin = 0;
rvh->RichView->WordWrap = true;
rvh->Init(this->Canvas, imageWidth);
while (rvh->FormatNextPage(imageHeight));
*pages = rvh->PagesCount;
if (rve != NULL) {
*curPageNo = rvh->GetPageNo(rvh->RichView->RVData, rve->CurItemNo, rve->OffsetInCurItem);
}
is RichViewEdit bug? can you help me? thanks.