How to avoid PDF page break when inserting images into ol/ul lists?
Post here questions and problems related to editing and publishing DITA content.
How to avoid PDF page break when inserting images into ol/ul lists?
When I add images, notes or other elements in the unordered or ordered list, and apply to DITA Map PDF-based on HTML5&CSS, the PDF will break the page even there is much space like this:
However, when I add a outputclass parameter to avoid this ordered list to break the page like this:
<ol id="ol_icl_5bh_fdc" outputclass="page-break-avoid">
The PDF output result will show some contents hidden.
Even I added page-break-avoid parameter to image element in my css file, this still does not solve the problem.
There are much cases like this, may I know if any parameter can reduce the space when output as PDF?
However, when I add a outputclass parameter to avoid this ordered list to break the page like this:
<ol id="ol_icl_5bh_fdc" outputclass="page-break-avoid">
The PDF output result will show some contents hidden.
Even I added page-break-avoid parameter to image element in my css file, this still does not solve the problem.
There are much cases like this, may I know if any parameter can reduce the space when output as PDF?
-
- Posts: 596
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to avoid PDF page break when inserting images into ol/ul lists?
Post by julien_lacour »
Hello,
Using <oXygen/> XML Editor 26.1, build 2024091606 and the following sample:
I did get the correct output:
Could you indicate which version of Oxygen you are using?
Have you tried to run the default DITA Map PDF - based on HTML5 & CSS scenario? Did the problem occur?
Regards,
Julien
Using <oXygen/> XML Editor 26.1, build 2024091606 and the following sample:
Code: Select all
<topic id="topic">
<title>Topic</title>
<body>
<ol id="ol_icl_5bh_fdc" outputclass="page-break-avoid">
<li>Turn on the device.<image placement="break" href="images/start.png" id="image_wth_2xm_jdc"/></li>
</ol>
</body>
</topic>
- image.png (16.51 KiB) Viewed 315 times
Have you tried to run the default DITA Map PDF - based on HTML5 & CSS scenario? Did the problem occur?
Regards,
Julien
Re: How to avoid PDF page break when inserting images into ol/ul lists?
Sorry for my not clarify my problem. Yes after adding the page-break-avoid statement, the picture will not break but it cause the new problem that the pictures will not display normally when the size is over the page. It looks like there is not any limit or configuration to recognize the page edge to generate the page break intelligently.julien_lacour wrote: ↑Thu Nov 14, 2024 12:05 pm Hello,
Using <oXygen/> XML Editor 26.1, build 2024091606 and the following sample:I did get the correct output:Code: Select all
<topic id="topic"> <title>Topic</title> <body> <ol id="ol_icl_5bh_fdc" outputclass="page-break-avoid"> <li>Turn on the device.<image placement="break" href="images/start.png" id="image_wth_2xm_jdc"/></li> </ol> </body> </topic>
image.png
Could you indicate which version of Oxygen you are using?
Have you tried to run the default DITA Map PDF - based on HTML5 & CSS scenario? Did the problem occur?
Regards,
Julien
-
- Posts: 596
- Joined: Wed Oct 16, 2019 3:47 pm
Re: How to avoid PDF page break when inserting images into ol/ul lists?
Post by julien_lacour »
Hello,
This is normal as you have added the outputclass="page-break-avoid" on the list, as explained in our user-guide:
Regards,
Julien
This is normal as you have added the outputclass="page-break-avoid" on the list, as explained in our user-guide:
If you remove this outputclass, the image will be displayed on the following page.page-break-avoid
Use this to avoid page breaks inside the marked element.
Regards,
Julien
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