Bug 80308

Summary: poppler_structure_element_get_table_{row,column}_span() apply to cell elements; not table elements
Product: poppler Reporter: Joanmarie Diggs <jdiggs>
Component: glib frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium CC: apinheiro
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 64813    
Attachments: proposed patch

Description Joanmarie Diggs 2014-06-20 19:30:14 UTC
Created attachment 101452 [details] [review]
proposed patch

As per the PDF spec, cell elements (TD and TH) have row and column spans. But poppler_structure_element_get_table_row_span() and poppler_structure_element_get_table_column_span() each expect a table element -- which of course has no span attributes defined and thus the default value of 1 (as per the spec) is always returned by these methods. (Unless of course you ask for the spans of a cell in which case you get an error.)
Comment 1 Carlos Garcia Campos 2014-06-23 15:46:38 UTC
(In reply to comment #0)
> Created attachment 101452 [details] [review] [review]
> proposed patch
> 
> As per the PDF spec, cell elements (TD and TH) have row and column spans.
> But poppler_structure_element_get_table_row_span() and
> poppler_structure_element_get_table_column_span() each expect a table
> element -- which of course has no span attributes defined and thus the
> default value of 1 (as per the spec) is always returned by these methods.
> (Unless of course you ask for the spans of a cell in which case you get an
> error.)

hmm, it seems other table elements have the same problem:

  - poppler_structure_element_get_table_headers: This attribute may apply to header cells (TH) as well as data cells (TD)

  - poppler_structure_element_get_table_scope: This attribute shall only be used
when the structure type of the element is TH

Could you please fix those too?
Comment 2 GitLab Migration User 2018-08-21 10:45:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/360.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.