Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long table column overruns the page #509

Closed
bsccara opened this issue Sep 22, 2017 · 1 comment
Closed

Long table column overruns the page #509

bsccara opened this issue Sep 22, 2017 · 1 comment

Comments

@bsccara
Copy link

bsccara commented Sep 22, 2017

Is there any CSS that can be applied to allow reliably breaking long table columns ? The HTML below is being rendered over and across the bottom of a single generated page, clipping the rest of the content.

<!DOCTYPE html><html lang="en" itemscope="" itemtype="http://schema.org/Article"><head></head>
<body class="gc-documentation develop guide" style="color: black; line-height: 18px;">
<style>p#break {break-after: always}</style>
<table><thead><th>Configuration</th><th>Qualifier Values</th><th>Description</th></thead>
    <tbody>
    <tr id="SmallestScreenWidthQualifier">
      <td>smallestWidth</td>
      <td><code>sw&lt;N&gt;dp</code><br><br>
        Examples:<br>
        <code>sw320dp</code><br>
        <code>sw600dp</code><br>
        <code>sw720dp</code><br>
        etc.
      </td>
      <td>
        <p>The fundamental size of a screen, as indicated by the shortest dimension of the available
screen area. Specifically, the device's smallestWidth is the shortest of the screen's available
height and width (you may also think of it as the "smallest possible width" for the screen). You can
use this qualifier to ensure that, regardless of the screen's current orientation, your
application has at least <code>&lt;N&gt;</code> dps of width available for its UI.</p>
        <p>For example, if your layout requires that its smallest dimension of screen area be at
least 600 dp at all times, then you can use this qualifer to create the layout resources, <code>res/layout-sw600dp/</code>. The system will use these resources only when the smallest dimension of
available screen is at least 600dp, regardless of whether the 600dp side is the user-perceived
height or width. The smallestWidth is a fixed screen size characteristic of the device; <strong>the
device's smallestWidth does not change when the screen's orientation changes</strong>.</p>
        <p>The smallestWidth of a device takes into account screen decorations and system UI. For
example, if the device has some persistent UI elements on the screen that account for space along
the axis of the smallestWidth, the system declares the smallestWidth to be smaller than the actual
screen size, because those are screen pixels not available for your UI. Thus, the value you use
should be the actual smallest dimension <em>required by your layout</em> (usually, this value is the
"smallest width" that your layout supports, regardless of the screen's current orientation).</p>
        <p id="break">Some values you might use here for common screen sizes:</p>
        <ul>
          <li>320, for devices with screen configurations such as:
            <ul>
              <li>240x320 ldpi (QVGA handset)</li>
              <li>320x480 mdpi (handset)</li>
              <li>480x800 hdpi (high-density handset)</li>
            </ul>
          </li>
          <li>480, for screens such as 480x800 mdpi (tablet/handset).</li>
          <li>600, for screens such as 600x1024 mdpi (7" tablet).</li>
          <li>720, for screens such as 720x1280 mdpi (10" tablet).</li>
        </ul>
        <p>When your application provides multiple resource directories with different values for
        the smallestWidth qualifier, the system uses the one closest to (without exceeding) the
device's smallestWidth. </p>
        <p><em>Added in API level 13.</em></p>
        <p>Also see the <code>android:requiresSmallestWidthDp</code> attribute, which declares the minimum smallestWidth with which
your application is compatible, and the <code>smallestScreenWidthDp</code> configuration field, which holds the
device's smallestWidth value.</p>
        <p>For more information about designing for different screens and using this
qualifier, see the Supporting
Multiple Screens developer guide.</p>
      </td>
    </tr>
</tbody></table>
</div></body></html>

I've tested this with version 0.40, with the command line 'python -m weasyprint 039.html 039.pdf'

@liZe
Copy link
Member

liZe commented Oct 1, 2017

Thanks for taking the time to report this issue. It's actually a duplicate of #36.

@liZe liZe closed this as completed Oct 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants