-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
When printing mixed page sizes, the page size before and after the page including the table may become the default size. #1233
Labels
Comments
@mochimochiki Thanks for discovering this bug! I'm working on fixing it. |
MurakamiShinyu
added a commit
that referenced
this issue
Nov 6, 2023
@MurakamiShinyu Thank you for the correction! <html>
<head>
<style>
@page Landscape { size: A5 landscape; }
@page Landscape2 { size: A6 landscape; }
#landscape { page: Landscape; }
#landscape2 { page: Landscape2; }
</style>
</head>
<body>
<div id="landscape">
<h1>A5 landscape</h1>
<table>
<thead><tr><th>Column 1</th><th>Column 2</th><th>Column 3</th></tr></thead>
<tbody>
<tr><td>Row 1, Cell 1</td><td>Row 1, Cell 2</td><td>Row 1, Cell 3</td></tr>
<tr><td>Row 2, Cell 1</td><td>Row 2, Cell 2</td><td>Row 2, Cell 3</td></tr>
<tr><td>Row 3, Cell 1</td><td>Row 3, Cell 2</td><td>Row 3, Cell 3</td></tr>
<tr><td>Row 4, Cell 1</td><td>Row 4, Cell 2</td><td>Row 4, Cell 3</td></tr>
<tr><td>Row 5, Cell 1</td><td>Row 5, Cell 2</td><td>Row 5, Cell 3</td></tr>
<tr><td>Row 6, Cell 1</td><td>Row 6, Cell 2</td><td>Row 6, Cell 3</td></tr>
<tr><td>Row 7, Cell 1</td><td>Row 7, Cell 2</td><td>Row 7, Cell 3</td></tr>
<tr><td>Row 8, Cell 1</td><td>Row 8, Cell 2</td><td>Row 8, Cell 3</td></tr>
<tr><td>Row 9, Cell 1</td><td>Row 9, Cell 2</td><td>Row 9, Cell 3</td></tr>
<tr><td>Row 10, Cell 1</td><td>Row 10, Cell 2</td><td>Row 10, Cell 3</td></tr>
<tr><td>Row 11, Cell 1</td><td>Row 11, Cell 2</td><td>Row 11, Cell 3</td></tr>
<tr><td>Row 12, Cell 1</td><td>Row 12, Cell 2</td><td>Row 12, Cell 3</td></tr>
<tr><td>Row 13, Cell 1</td><td>Row 13, Cell 2</td><td>Row 13, Cell 3</td></tr>
<tr><td>Row 14, Cell 1</td><td>Row 14, Cell 2</td><td>Row 14, Cell 3</td></tr>
<tr><td>Row 15, Cell 1</td><td>Row 15, Cell 2</td><td>Row 15, Cell 3</td></tr>
<tr><td>Row 16, Cell 1</td><td>Row 16, Cell 2</td><td>Row 16, Cell 3</td></tr>
</tbody>
</table>
</div>
<div id="landscape2">
<h1>A6 landscape</h1>
<table>
<thead><tr><th>Column 1</th><th>Column 2</th><th>Column 3</th></tr></thead>
<tbody>
<tr><td>Row 1, Cell 1</td><td>Row 1, Cell 2</td><td>Row 1, Cell 3</td></tr>
<tr><td>Row 2, Cell 1</td><td>Row 2, Cell 2</td><td>Row 2, Cell 3</td></tr>
<tr><td>Row 3, Cell 1</td><td>Row 3, Cell 2</td><td>Row 3, Cell 3</td></tr>
<tr><td>Row 4, Cell 1</td><td>Row 4, Cell 2</td><td>Row 4, Cell 3</td></tr>
<tr><td>Row 5, Cell 1</td><td>Row 5, Cell 2</td><td>Row 5, Cell 3</td></tr>
<tr><td>Row 6, Cell 1</td><td>Row 6, Cell 2</td><td>Row 6, Cell 3</td></tr>
<tr><td>Row 7, Cell 1</td><td>Row 7, Cell 2</td><td>Row 7, Cell 3</td></tr>
<tr><td>Row 8, Cell 1</td><td>Row 8, Cell 2</td><td>Row 8, Cell 3</td></tr>
<tr><td>Row 9, Cell 1</td><td>Row 9, Cell 2</td><td>Row 9, Cell 3</td></tr>
<tr><td>Row 10, Cell 1</td><td>Row 10, Cell 2</td><td>Row 10, Cell 3</td></tr>
<tr><td>Row 11, Cell 1</td><td>Row 11, Cell 2</td><td>Row 11, Cell 3</td></tr>
</tbody>
</table>
</div>
</body>
</html> |
Sorry, it seems the fix #1234 was incomplete. Reopen. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When building HTML that includes page size specifications using @page, the pages before and after the table may revert to the default page size. This seems to occur more often when the table is involved in page break processing.
To Reproduce
Build the following index.html using
vs build index.html
and check the generated PDF:Expected behavior
The content inside the div specified as A5 landscape should be rendered entirely in A5 landscape mode.
Screenshots
Desktop (please complete the following information):
Additional context
I discovered this issue while attempting to build a PDF with mixed page sizes, referencing #751. The primary goal was to output a wide table in landscape orientation pages, which led to the observation of this issue.
The text was updated successfully, but these errors were encountered: