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

Workaround for Chrome printing problem #394

Merged
merged 3 commits into from
Nov 29, 2017
Merged

Workaround for Chrome printing problem #394

merged 3 commits into from
Nov 29, 2017

Conversation

kwkbtr
Copy link
Contributor

@kwkbtr kwkbtr commented Nov 29, 2017

  • When a top margin exists at the top of the page, it disappears when printed on Chrome. It is probably a Chrome bug.
  • To work around this bug, 1px top padding is added to bleed boxes, and page boxes are pulled back by position: relative and top: -1px.
  • With this change is applied, pages with vertical writing-mode are not printed correctly. To fix this problem the bottom padding of elements emulating page boxes is set to zero when printing.

- Set the bottom padding of elements emulating page boxes to zero when printing, preventing the elements to overflow physical pages
- This change was first made on daca604. It was once removed on f1668ac, but I add it back since it seems necessary with the change on 5b22b44 combined with vertical writing-mode.
@kwkbtr kwkbtr merged commit 52e907f into master Nov 29, 2017
@kwkbtr kwkbtr deleted the chrome_print_bug branch November 29, 2017 11:08
MurakamiShinyu added a commit that referenced this pull request Apr 1, 2019
…printing

This problem is a side effect of "Workaround for Chrome printing problem" #394. The `padding-top: 1px` added on the bleed box causes:
- The printable page content height becomes smaller
- Page breaking between the padding-top and the large image becomes possible, and because of `overflow:  hidden` the large image dissapears

This commit reverts (comment out) the old workaround and adds the new workaround:

```css
@media print {
    [data-vivliostyle-bleed-box] > div > div {
        column-count: 1;
    }
}
```
MurakamiShinyu added a commit that referenced this pull request Apr 2, 2019
…images to disappear

"Workaround for Chrome printing problem" #394 added `padding-top: 1px` on the bleed box, and causes side effects:
- The printable page content height becomes smaller
- Page breaking between the padding-top and the large image becomes possible, and because of `overflow:  hidden` the large image disappears

Another workaround needed.
MurakamiShinyu added a commit that referenced this pull request Jan 4, 2023
Remove the workaround code (#514 and #394) for Chrome printing problem which was already fixed and no longer necessary.

After this change the following problem that was a side effect of the old workaround code will be resolved:

- fix #660
MurakamiShinyu added a commit that referenced this pull request Jan 4, 2023
Remove the workaround code (#514 and #394) for Chrome printing problem which was already fixed and no longer necessary.

After this change the following problem that was a side effect of the old workaround code will be resolved:

- fix #600
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

Successfully merging this pull request may close these issues.

1 participant