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

Page Break when exporting to PDF #2646

Closed
EnableITmike opened this issue Mar 19, 2021 · 4 comments
Closed

Page Break when exporting to PDF #2646

EnableITmike opened this issue Mar 19, 2021 · 4 comments

Comments

@EnableITmike
Copy link

It would be really useful if there were some way of marking within the page as to where Page Breaks should occur when exported to PDF.

At present I have to use new line/paragraph whitespacing in order to push text down to a point where it "scrolls" onto the next page when exported to PDF.

Whilst this works, it then makes the original document look untidy and having what appears as "unnecessary" whitespace throughout the document.

@ssddanbrown
Copy link
Member

Thanks for the request @EnableITmike.

I'm hesitant to bring exporting controls into the main editor, as the in-app view is the core focus and it can be a slippery slope to adding loads of extra items.

There's currently a horizontal rule item in the editor, do you use this at all? If not I might be able to put together and share a tweak that would re-purpose those for your desired use-case.

@EnableITmike
Copy link
Author

EnableITmike commented Mar 22, 2021 via email

@ssddanbrown
Copy link
Member

Thanks for confirming. Again, Bit of a hack but, Add the below code to your "Custom HTML head content" setting. By default the horizonal line it's just a horizontal line to visually break up content but this code will hide it normally, show it as a dotted line in the editor, and should cause the pdf export to page break at it's position.

<style>
.page-content hr {
    page-break-before: always;
    margin: 0 !important;
    height: 0px;
    background: transparent;
}
.mce-content-body.page-content hr {
    margin: 16px 0 !important;
    border-bottom: 2px dotted #ddd;
    background: transparent;
}
</style>

This button in the editor:

image

@ssddanbrown
Copy link
Member

Since a potential workaround was provided, and there's been no follow-up afterwards, I'll close this off.

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

No branches or pull requests

2 participants