Skip to content

Support the visibility property on tables, rows and cells #436

Open

Description

@jakejackson1

visibility (hidden, printonly, screenonly) has no effect on <table>, <tr> or <td>/<th>. The content is drawn as if visible and no optional content group is written.

Checked on gravitypdf with core fonts, uncompressed, looking for the text inside /OC /OC3 BDC … EMC:

Markup Hidden?
<table style="visibility: hidden"> no
<tr style="visibility: hidden"> no
<td style="visibility: hidden"> no
<div style="visibility: hidden"> inside a cell yes
<span style="visibility: hidden"> inside a cell yes
<div style="visibility: hidden"> around a table yes

The manual only lists visibility for block elements, inline tags and <img> (supported CSS), so this is a gap rather than a regression. Only BlockTag reads VISIBILITY when a tag opens, plus the inline path in Mpdf::setCSS(). The table tags never pass it on to the cell's content or its background and borders.

Workaround: wrap the table, or a cell's content, in a <div> or <span> with the visibility.

What support would need:

Found while writing the snapshot for #416, where a cell with visibility was drawn in every case.

Activity

  1. added
    enhancement
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions