Page Break when exporting to PDF #2164

Closed
opened 2026-02-05 03:10:21 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @EnableITmike on GitHub (Mar 19, 2021).

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.

Originally created by @EnableITmike on GitHub (Mar 19, 2021). 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.
Author
Owner

@ssddanbrown commented on GitHub (Mar 20, 2021):

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.

@ssddanbrown commented on GitHub (Mar 20, 2021): 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.
Author
Owner

@EnableITmike commented on GitHub (Mar 22, 2021):

Hi Dan,

I have to admit to possibly not being fully aware of all the
functionality available in the editor and am not aware of the horizontal
rule item.
Does this somehow convert into a page break on creation of PDF? If it's
possible to do that, I believe that would certainly be a solution to my
problem, which would be most welcome.

Kindest Regards,

Avatar https://www.linkedin.com/company/enableservices/

Mike Gee
Solutions Configuration and Applications Specialist

T. +44 (0) 1473 618 980
A. 38 Anson Rd, Martlesham Heath,
Martlesham, Ipswich IP5 3RG https://bit.ly/2S3fR2u
W. www.enable.services https://enable.services

https://enable.services

facebook https://www.facebook.com/enabletechnologies/
linkedin https://www.linkedin.com/in/enableitmike/
twitter https://twitter.com/EnableITmike
youtube https://www.youtube.com/channel/UCynVvWidTeKNN960YXZGJIA

On 19/03/2021 22:00, Dan Brown wrote:

Thanks for the request @EnableITmike https://github.com/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.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/BookStackApp/BookStack/issues/2646#issuecomment-803158457,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKAOTXLW6TTAX3CEB52BVYDTEPCQJANCNFSM4ZOVVD6Q.

@EnableITmike commented on GitHub (Mar 22, 2021): Hi Dan, I have to admit to possibly not being fully aware of all the functionality available in the editor and am not aware of the horizontal rule item. Does this somehow convert into a page break on creation of PDF? If it's possible to do that, I believe that would certainly be a solution to my problem, which would be most welcome. Kindest Regards, Avatar <https://www.linkedin.com/company/enableservices/> Mike Gee Solutions Configuration and Applications Specialist T. +44 (0) 1473 618 980 A. 38 Anson Rd, Martlesham Heath, Martlesham, Ipswich IP5 3RG <https://bit.ly/2S3fR2u> W. www.enable.services <https://enable.services> <https://enable.services> facebook <https://www.facebook.com/enabletechnologies/> linkedin <https://www.linkedin.com/in/enableitmike/> twitter <https://twitter.com/EnableITmike> youtube <https://www.youtube.com/channel/UCynVvWidTeKNN960YXZGJIA> On 19/03/2021 22:00, Dan Brown wrote: > > Thanks for the request @EnableITmike <https://github.com/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. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/BookStackApp/BookStack/issues/2646#issuecomment-803158457>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AKAOTXLW6TTAX3CEB52BVYDTEPCQJANCNFSM4ZOVVD6Q>. >
Author
Owner

@ssddanbrown commented on GitHub (Mar 23, 2021):

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 commented on GitHub (Mar 23, 2021): 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. ```html <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](https://user-images.githubusercontent.com/8343178/112063289-12482400-8b59-11eb-8892-aa5aac56f8d8.png)
Author
Owner

@ssddanbrown commented on GitHub (May 8, 2021):

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

@ssddanbrown commented on GitHub (May 8, 2021): Since a potential workaround was provided, and there's been no follow-up afterwards, I'll close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2164