Skip to content

Commit

Permalink
Merge pull request #632 from veraPDF/table_row_span
Browse files Browse the repository at this point in the history
Fix calculating number of rows of table
  • Loading branch information
MaximPlusov authored and Git User committed Jan 12, 2024
1 parent 6398f75 commit c4981d5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ private Integer getNumberOfColumns(GFPDStructElem firstTR) {
private Integer getNumberOfRows(List<GFPDStructElem> listTR) {
int numberOfRows = 0;
for (GFPDStructElem TR : listTR) {
for (PDStructElem elem : TR.getStructuralSignificanceChildren()) {
List<GFPDStructElem> children = TR.getStructuralSignificanceChildren();
if (!children.isEmpty()) {
PDStructElem elem = children.get(0);
String type = elem.getstandardType();
if (TaggedPDFConstants.TH.equals(type) || TaggedPDFConstants.TD.equals(type)) {
numberOfRows += ((GFSETableCell)elem).getRowSpan();
Expand Down

0 comments on commit c4981d5

Please sign in to comment.