PDF/CSS transformation - width of images & borders
Post here questions and problems related to editing and publishing DITA content.
PDF/CSS transformation - width of images & borders
Hello,
In my customization of Oxygen's PDF/CSS transformation, the .css puts a border around all block images in fig elements:
For some images, the right border is rendered well to the right of the image, resulting in weird-looking white space. See the image in the pdf in the attached .zip.
The image is an svg, which is also in the attached zip. Here is the DITA markup for the fig/image:
How I can specify CSS that ensures the border does not include all the white space?
In my customization of Oxygen's PDF/CSS transformation, the .css puts a border around all block images in fig elements:
Code: Select all
*[class ~= "topic/fig"] *[placement="break"][class ~= "topic/image"]{
margin-top:0;
border: 1px solid black;
padding: 1em;
}
The image is an svg, which is also in the attached zip. Here is the DITA markup for the fig/image:
Code: Select all
<fig id="fig_rrx_wbq_m1c">
<title>RAM Mount</title>
<image placement="break" id="image_srx_wbq_m1c"
href="graphics/RAM-mount_install.svg">
<alt>Shows the RAM mount.</alt>
</image>
</fig>
- rendering-issue_svg-borders.zip
- (93.66 KiB) Downloaded 44 times
-
- Posts: 575
- Joined: Wed Oct 16, 2019 3:47 pm
Re: PDF/CSS transformation - width of images & borders
Post by julien_lacour »
Hello,
One solution could be to set the image width based on DITA-OT extracted image width:
Regards,
Julien
One solution could be to set the image width based on DITA-OT extracted image width:
Code: Select all
@namespace dita-ot url('http://dita-ot.sourceforge.net/ns/201007/dita-ot');
*[class ~= "topic/fig"] *[class ~= "topic/image"] {
margin-top: 0;
border: 1px solid black;
padding: 1em;
}
*[class ~= "topic/image"][dita-ot|image-width] {
width: attr(dita-ot|image-width px);
}
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