DrawPageAt Offset problem

General TRichView support forum. Please post your questions here
Post Reply
arm
Posts: 2
Joined: Wed Jan 07, 2009 11:51 am

DrawPageAt Offset problem

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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)
arm
Posts: 2
Joined: Wed Jan 07, 2009 11:51 am

Post by arm »

Thank you :), using SetViewPortOrgEx works perfectly (so far), assigning offsets to RVReportHelper.RichView.LeftMargin works too but with other bugs.
Post Reply