trichview.support
Re: RVPrint to TRVReportHelper |
Author |
Message |
Tobias Thörn |
Posted: 12/01/2003 11:36:29 > What do you want to do? To create exact equal copies on paper and in PDF? Yes. That is what I want to do. When I print a document I allso want to make a PDF of the document so that I later can get back and print an exakt copy of the same document. It is required for quality assurance and later export to another environment. I can't find a straitforward way to do this. Demos\Delphi\Assorted\Printing\ReportHelper\ : Just print to the printer. and http://www.trichview.com/resources/llpdflib/rvll_rtf2pdf.zip assumes you have an rtf file. "Sergey Tkachenko" <svt@trichview.com> skrev i meddelandet news:3fc775f9$1@support.torry.net... > 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. > > > 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