trichview.support
Re: RVPrint to TRVReportHelper |
Author |
Message |
Sergey Tkachenko |
Posted: 11/28/2003 18:29:30 Yes, page numbers are indexed from 1, so you need to call with (i+1). SavePageAsRVF is undocumented, but it's ok to use it. It saves one page in RVF stream But... 1) rvrh.RichView.LoadRVFFromStream deletes all previous contents of rvrh.RichView, so you can get only one (last) page. You can use rvrh.RichView.InsertRVFFromStream(... rvrh.RichView.ItemCount ...); 2) Headers and footers are not saved by SavePageAsRVF. You need to load them in separate ReportHelpers and draws them specially, like in the demo Demos\Delphi\Assorted\Printing\ReportHelper\ 3) You still cannot get the same page formatting ub rvrh like in RVPrint. After this code you need to format text using rvrh.Init, and if canvas resolution and page width specified as parameters of this method will be different from resolution and width used by RVPrint, result will be different. What do you want to do? To create exact equal copies on paper and in PDF? > I want to transfer the RVPrint (including a header and footer, i.e. not just > RVPrint.rv) to a TRVReportHelper for later transfer to a PDF. > > I try this: > > for i := 0 to RVPrint.PagesCount -1 do > begin > Stream.Clear; > RVPrint.SavePageAsRVF(Stream, i); > Stream.Position := 0; > rvrh.RichView.LoadRVFFromStream(Stream); > end; > > I get exception EListError, List Index out of bounds (-1). > I thought it might have something to do with the page number so i tried > SavePageAsRVF(Stream, i+1); > And then it pass along happily but I get no data at all when I later > transfer the rvrh to the PDF. (IlPDFLib) > > What am I doing wrong? > Or is there an easier way to transfer what I have in RVPrint to a PDF? > > |
Powered by ABC Amber Outlook Express Converter