Project

General

Profile

Bug #1726

WPdfRenderer: incorrect table layout when using colspan

Added by Nathan Ridge over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/28/2013
Due date:
% Done:

0%

Estimated time:

Description

When I render the following HTML using WPdfRenderer:

Title

Item

Description

Quantity

The resulting table's first row is not correctly centered (see attachment "screenshot of WPdfRenderer output"). I would expect it to look the way it does in a browser (see "screenshot of browser rendering").


Files

wt-layout-bad.png (13.4 KB) wt-layout-bad.png screenshot of WPdfRenderer output Nathan Ridge, 02/28/2013 03:58 AM
wt-layout-good.png (7.12 KB) wt-layout-good.png screenshot of browser rendering Nathan Ridge, 02/28/2013 03:58 AM
#1

Updated by Koen Deforche over 7 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.3.0
#2

Updated by Koen Deforche over 7 years ago

  • Status changed from InProgress to Resolved

Oops :

diff --git a/src/Wt/Render/Block.C b/src/Wt/Render/Block.C
index b753157..6c1e60a 100644
--- a/src/Wt/Render/Block.C
+++ b/src/Wt/Render/Block.C
@@ -1113,7 +1113,7 @@ void Block::tableRowDoLayout(double x, PageState &ps,

       double width = 0;
       for (unsigned j = col; j < col + colSpan; ++j)
-       width += widths[col];
+       width += widths[j];

       width += (colSpan - 1) * cellSpacing;

I guess we were testing this with equal sized columns ? :-)

Regards,

koen

#3

Updated by Koen Deforche over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF