Problem with Tables and Heading Row (table disapear in part)

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Problem with Tables and Heading Row (table disapear in part)

Post by sylvainl »

Hi,

I have a problem with my tables and the TScaleRichViewEdit (v6).
I use "HeadingRowCount :=1" for the tables, it's typical quotation tables with products, quantities and prices.

But the problem is my tables disapear if they are to close from the bottom of a page (and I don't see them on the next page)

If I dontt use the heading rows (HeadingRowCount := 0), there is no problem, the table is cut as expected (start on the 1st page and continue on the next).

I join my example RVF file (you can open with the ActionTestUni demo executable) :
http://we.tl/3Vwr4sKYZA
(The table problem is in red on my example)

Can you help me, or maybe already fixed in the next release ?

Again, thanks for your help

++
SylvainL
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, there is a problem with tables containing one heading row and one non-heading row. We already fixed it in our working version, but not uploaded it yet. We plan to upload fixed version for registered users tomorrow.
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl »

Great news, thanks
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Fixed in SRV 6.1.2, available for registered users.
You can download the installer from the same location as the previous version.
You can find links in the private "ScaleRichView" forum (I opened protected forums for you).
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl »

Thanks Sergey, now problem anymore with the new verison :)

++
SylvainL
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl »

Hi Sergey,

I have another problem now, still with HeadingRow>0 (and SRV 6.1.2).

This is the context :
Page 1 : a big table (5 cols and 10 rows) at the end of the page, with HeadingRow=1, only 2 rows on the page (the rest on page2)
Page 2 : the headingRow is here ok and the rows.

But...
When I generate metafiles (SRVE.DrawMetafile) the metafile of page 2, with the HeadingRow, is incorrect (seems to have headingrow AND the first row of the table) drawn in the metafile.

The problem is visible when you generate PDF file with the metafiles.

Am I doing something wrong ?
The code I use to make metafiles from my SRVE Pages :

Code: Select all

function MakePageMetafileFromSRVE(SRVE: TSRichViewEdit; APageNo, AWidth, AHeight: Integer): TMetafile;
var
  savTextDraw: Boolean;
begin
  Result := nil;
  savTextDraw := ScaleRichViewTextDrawAlwaysUseGlyphs;
  ScaleRichViewTextDrawAlwaysUseGlyphs := False;

  Result := TMetafile.Create;
  Result.Width := aWidth;
  Result.Height := aHeight;
  srve.CanUpdate := False;
  srve.UseDrawHyperlinksEvent := True;
  srve.DrawMetafile(aPageNo, Result, False, False, False);

  ScaleRichViewTextDrawAlwaysUseGlyphs := savTextDraw;
  srve.CanUpdate := True;
  srve.UseDrawHyperlinksEvent := False;
end;

Thanks for your help

Best regards,
SylvainL
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I cannot reproduce this problem (it looks very strange to me, because the same procedure is used for drawing a metafile and a page in TSRichViewEdit).
Please send your document to rvf file and send to me richviewgmailcom

PS: do not change ScaleRichViewTextDrawAlwaysUseGlyphs. The default value is now false; true caused too many problems
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl »

Ok, thanks for your help,
I'll send you my RVF file via email now.

SylvainL
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl »

Thank you, Sergey
With the fix you sent me, I have no more the metafile problem.

SylvainL
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Fixed in SRV 6.1.3
It was more PDF problem than metafile problem, because unnecessary drawing was clipped in metafiles.
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl »

Thank you, it works perfectly.

SylvainL
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl »

Hi guys,

I have same kind of problem, but at the end of 1st page now (last time it was the begining of 2nd page), when I generate metafile from a RVF file (2 tables separated by a pagebreak)

Here is my RVF file :
https://userscloud.com/cxjjawrf4q5e

The metafile generated looks fine (when I open with paint for example), but when I use them to generate PDF file, there is unnecessary informations at the end of the 1st page (drawing first row of page 2).

Ans still, the problem is visible when you generate PDF file with the metafiles.

Could you help me to fix that pbm ?
Thanks in advance

++
SylvainL
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Quick fix:

Open SclRView.pas, find

Code: Select all

      if PageStartTableItem[Result] >= 0 then
        PageEndItemNo[Result - 1] := PageStartTableItem[Result]
      else
change to:

Code: Select all

      if PageStartTableItem[Result] >= 0 then begin
        if PageStartTableRow[Result] = 0 then
          PageEndItemNo[Result - 1] := PageStartTableItem[Result]-1
        else
          PageEndItemNo[Result - 1] := PageStartTableItem[Result];
      end else
sylvainl
Posts: 26
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl »

Big thanks, Sergey.
No more the problem, with this fix.

++
SylvainL
Post Reply