Bug 695939 - page breaks ignored in ePub CSS
Summary: page breaks ignored in ePub CSS
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: epub (show other bugs)
Version: master
Hardware: Other All
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks: 695935
  Show dependency tree
 
Reported: 2015-04-18 05:14 UTC by Pablo Rodríguez
Modified: 2016-04-26 05:46 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo Rodríguez 2015-04-18 05:14:32 UTC
There are three page break properties in CSS: 'page-break-before', 'page-break-after' and 'page-break-inside' (http://www.w3.org/TR/CSS2/page.html#page-break-props).

'page-break-inside' only allows two values: auto (do nothing) or avoid (page breaks inside the element box).

'page-break-before' and 'page-break-after' allow more values:

    auto: neither force or forbid pagebreaks.

    always: force page breaks

    avoid: forbid page breaks

left and right are othe possible values, but they may be interpreted as always. I think this makes sense displaying ePub files.

Well, I’ afraid that mupdf-1.7 ignores any page break related property.

The parent issue (which is blocked by this one) contains the following code:

    .hidden>p {
        page-break-before: always;
        }

In the second page of the ePub file attached to the parent issue (the one being blocked by this issue and with the heading “Hidden Title”) each paragraph should have a page break before and it doesn’t.
Comment 1 Tor Andersson 2016-04-26 05:46:00 UTC
Fixed in commit 19282ec51201d749d7cbaed4cf76af54a467993e
Author: Tor Andersson <tor.andersson@artifex.com>
Date:   Mon Apr 11 16:58:20 2016 +0200

    epub: Support page-break-before/after: always, left and right.
    
    Does not support page-break-before/after: avoid.

Supporting 'avoid' is going to be much more difficult, and may need some architectural restructuring that won't happen until after we have added support for floats and tables.