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

Table overflows right edge of page when converting to PDF #1968

Closed
WatsonMC opened this issue Sep 15, 2021 · 1 comment
Closed

Table overflows right edge of page when converting to PDF #1968

WatsonMC opened this issue Sep 15, 2021 · 1 comment

Comments

@WatsonMC
Copy link

Hello,

I've found a problem when creating some especially finicky tables.

I have not pinpointed the exact causal conditions, and which are superfluous, but when creating a table where:

  • The first row spans all columns
  • The second row first column spans two rows
  • The second row last column spans two rows
  • The second row second column cell spans two columns
  • All rows from three onward have the second column cell spanning two columns

The table will flow over the right edge of the page when converting to PDF. Highlighted in 'red cross' on image.
image

The issue is not present in the Visual Studio Code preview view. In that view, the table appears formatted correctly.

I can prevent the issue by ensuring at least one of the rows from three onward does not have a two-column spanning cell in column 2. This is marked with the green tick in image.

Asciidoc text below:

This table will format over the edge of the page when turned to PDF.

.Failure table
[cols="2,1,1,2"]
|===
4+h| Product Label Requirements
.2+h| Parameter
2+h| Value
.2+h| Comment

h| Type 1
h| Type 2

//table guts
| Column 1, row 1 2+| |
| Column 1, row 2 2+| | All rows have some merging, vertical or horizontal
| Column 1, row 3 2+| |
| Column 1, row 4 2+| |
| Column 1, row 5 2+| |
|===

This Table will not format over the edge of the page when turned to PDF.

.Success table
[cols="2,1,1,2"]
|===
4+h| Product Label Requirements
.2+h| Parameter
2+h| Value / Quantity
.2+h| Comment

h| LPA Type 1
h| LPA Type 2

//table guts
| Column 1, row 1 2+| |
| Column 1, row 2 |Populated |Columns | row with all 4 columns and no vertical or horz merging
| Column 1, row 3 2+| |
| Column 1, row 4 2+| |
| Column 1, row 5 2+| |
|===
Test1.adoc.txt

@mojavelinux
Copy link
Member

This is a known issue and a duplicate of #1368.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants