TRVReportHelper::PagesCount Problem

General TRichView support forum. Please post your questions here
Post Reply
hacqing
Posts: 7
Joined: Tue Apr 29, 2014 10:05 am

TRVReportHelper::PagesCount Problem

Post by hacqing »

hi, i use follow code to get page counts:

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);
    }
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. :)
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Can you send me a simple project to reproduce the problem?
To richviewgmailcom.
hacqing
Posts: 7
Joined: Tue Apr 29, 2014 10:05 am

Post by hacqing »

I sent an email with the details.

Thank you very much!
Post Reply