CSS-based PDF - Cannot put page breaks 1st level titles and toc
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 18
- Joined: Fri Dec 02, 2016 7:34 pm
CSS-based PDF - Cannot put page breaks 1st level titles and toc
Hi,
I have Oxygen XML editor version 20.1, build 2018061313.
I’m using pdf transformation scenario based on HTML5 and CSS.
I am struggling with page breaks… I cannot manage to remove page breaks before the 1st level titles and after the toc.
In my customization file, I’ve tried:
Thanks
I have Oxygen XML editor version 20.1, build 2018061313.
I’m using pdf transformation scenario based on HTML5 and CSS.
I am struggling with page breaks… I cannot manage to remove page breaks before the 1st level titles and after the toc.
In my customization file, I’ve tried:
Code: Select all
*[class ~= "topic/title"] {
page-break-before: avoid;
}
*[class ~= "topic/title1"] {
page-break-before: avoid;
}
h1 {
page-break-before: avoid;
}
@media print {
*[class ~= "map/topicref"] {
page-break-after: avoid;
page-break-inside: avoid;
}
}
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: CSS-based PDF - Cannot put page breaks 1st level titles and toc
Hi Julie,
By design, we decided that each chapter should start a new page sequence, so we've added a custom property (an oXygen extension) for that.
You could overwrite this behavior by using in your customization CSS:
Regarding the page break after the Table Of Contents, things are a bit more complicated.
There are different pages used in different parts of the publication (for example, the preface, the TOC, the chapters, the Index, have their own dedicated pages).
The CSS rules are matching for instance the TOC and associate the page named "table-of-contents" to that structure. This is different from the following pages, and will cause a page break. Any switch between different pages are causing page breaks.
Given this, there is no easy way to remove the page breaks between different named-pages.
Regards,
Costin
By design, we decided that each chapter should start a new page sequence, so we've added a custom property (an oXygen extension) for that.
You could overwrite this behavior by using in your customization CSS:
Code: Select all
*[class ~= "topic/topic"][is-chapter] {
-oxy-page-group:auto;
}
There are different pages used in different parts of the publication (for example, the preface, the TOC, the chapters, the Index, have their own dedicated pages).
The CSS rules are matching for instance the TOC and associate the page named "table-of-contents" to that structure. This is different from the following pages, and will cause a page break. Any switch between different pages are causing page breaks.
Given this, there is no easy way to remove the page breaks between different named-pages.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service