dokuwiki-plugin-dw2pdf icon indicating copy to clipboard operation
dokuwiki-plugin-dw2pdf copied to clipboard

How to avoid pagebreaks in DW2PDF

Open ingof opened this issue 11 years ago • 5 comments

Hello,

I use the WRAP-Plugin to avoid pagebreaks on long tables in printpreview.

In printpreview it works fine but in the exported PDF-file with DW2PDF it wont work.

How can i prevent pagebreaks in DW2PDF. For excample for long tables or textblocks wich belongs together?

ingof avatar Sep 25 '13 22:09 ingof

Can you provide a sample of wiki content which demonstrates your situation?

Klap-in avatar Jan 06 '14 20:01 Klap-in

Hello Gerit,

I can not avoid pagebreaks in PDF-Files. The problems exist on larger tables or textblocks.

for example : ############################################################################################################# <WRAP nopagebreak> ===== Headline 1 ===== this is a very long textblock. </WRAP>

===== Headline 2 ===== this ist a very long text too. This whole textblock should placed on the next side if it won't fit complete on the first Page. But the problem ist that the pagebreak is in the textblock #############################################################################################################

I attached a PDF of this wikipage: http://ems-gateway.myds.me/dokuwiki/doku.php?id=wiki:ems:bootloader

the textblock with the headline "Flashen neuer Firmware" should start at the second page. in the PDF-file is only the second part on the second page.

In the printpreview of my firefox it works fine...

Best regards Ingo Fischer

Am 06.01.2014 21:46, schrieb Gerrit Uitslag:

Can you provide a sample of wiki content which demonstrates your situation?

— Reply to this email directly or view it on GitHub https://github.com/splitbrain/dokuwiki-plugin-dw2pdf/issues/75#issuecomment-31685304.

ingof avatar Jan 06 '14 22:01 ingof

the mail relay through github don't keep attachments.

Can you use the mail in my github profile. Please attach the original wiki page as well.

Klap-in avatar Jan 07 '14 11:01 Klap-in

The mpdf library used for building the pdf supports the page-break-inside: avoid upto a certain level of complexity. I don't find out sofar which stuff let struggle this library to parse it in our case.

The question about this case is at http://www.mpdf1.com/forum/discussion/2286/div-with-page-break-inside-avoid

Klap-in avatar Dec 16 '14 15:12 Klap-in

My understanding is that to avoid pagebreaks, you have to set at blocks the CSS instruction page-break-inside: avoid (in case of dokuwiki the blocks are the <p> elements, which surround every section of the text)

https://mpdf.github.io/paging/page-breaks.html

I guess it is not desired to add this instruction to every <p> element. So I don't know how to improve this case.

Klap-in avatar Dec 07 '17 19:12 Klap-in

I do not know how this in a convenient manner can be implemented. So therefore I propose to close this issue as wontfix.

Klap-in avatar Oct 12 '22 20:10 Klap-in