Page 1 of 1

DrawPageAt Offset problem

Posted: Wed Jan 07, 2009 12:48 pm
by arm
Hi,

I've been trying to use TRVReportHelper.DrawPageAt to draw on Canvas (TRichViewPdf) with an specific offset, it works for all the text in the rtf document but all borders/tables remain with no offset.

Creating RTF with TRichView:
Image
Canvas drawn with TRVReportHelper.DrawPageAt (offset):
Image
Canvas drawn with TRVReportHelper.DrawPage (no offset):
Image

Any suggestion? solution?

Posted: Thu Jan 08, 2009 1:19 pm
by Sergey Tkachenko
Clearly, TRichViewPDF does not support offsets (implemented in DrawPageAt using SetWindowOrgEx function) properly.
Workarounds:
- asking TRichViewPDF developer to fix this problem;
- trying using DrawPage + SetViewPortOrgEx, may be it will be supported better;
- (the simplest workaround) assign offsets to RVReportHelper.RichView.LeftMargin and RVReportHelper.RichView.TopMargin (before calling RVReportHelper.Init; the Init parameter must be increased by horizontal offset)

Posted: Thu Jan 08, 2009 4:13 pm
by arm
Thank you :), using SetViewPortOrgEx works perfectly (so far), assigning offsets to RVReportHelper.RichView.LeftMargin works too but with other bugs.