splitbrain / dokuwiki-plugin-dw2pdf

A fork of Luigi Micco's PDF export plugin for DokuWiki
http://www.dokuwiki.org/plugin:dw2pdf
55 stars 68 forks source link

How to avoid pagebreaks in DW2PDF #75

Closed ingof closed 2 years ago

ingof commented 11 years ago

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?

Klap-in commented 10 years ago

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

ingof commented 10 years ago

Hello Gerit,

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

for example : #############################################################################################################

===== Headline 1 ===== this is a very long textblock. ===== 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.

Klap-in commented 10 years ago

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 commented 9 years ago

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 commented 6 years ago

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 commented 2 years ago

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